发布新帖

Rechercher

文章
· 一月 13, 2022 阅读大约需 4 分钟

How to find the dataset you need?

Hey community! How are you doing?

I hope to find everyone well, and a happy 2022 to all of you!

Over the years, I've been working on a lot of different projects, and I've been able to find a lot of interesting data.

But, most of the time, the dataset that I used to work with was the customer data. When I started to join the contest in the past couple of years, I began to look for specific web datasets.

I've curated a few data by myself, but I was thinking, "This dataset is enough to help others?"

4 Comments
讨论 (4)1
登录或注册以继续
文章
· 一月 10, 2022 阅读大约需 4 分钟

12 Medical Datasets along with 43 tables dynamically created by using all-new LOAD DATA SQL functionality

 

Application to import 12 Datasets along with 43 tables dynamically by using  LOAD DATA command which loads data from a source into an IRIS SQL table. 
List of Datasets

Features

  • Dynamically creation of table based on the CSV file data.
  • Import dataset by using LOAD DATA functionality by Terminal or by web application.
  • Remove dataset programmatically by terminal or by Web Application.
  • Dynamically view Imported Data from Web Application.
  • Functionality to Import data into CSV, Excel or PDF Format.
  • Responsive web application to view the status of Dataset.
  • Any or All datasets can be install or Remove with single command.
  • Use of %SQL_Diag.Result and %SQL_Diag.Message tables with LOAD DATA

It is recommended to read related documentations LOAD DATA (SQL).

 

How to install or remove any Dataset from Terminal

Use below command to import particular Dataset by passing it's ID or pass 999 to import all DataSets

do ##class(dc.data.medical.utility).ImportDS(1)

Below is the main script to create table dynamically and load data by using LOAD DATA functionality. Please note that table is created dynamically 

//Get file name 
SET filename=tRS.Get("Name")
//Remove .csv from the file name
SET tableName=$REPLACE("dc_data_"_ds_"."_tRS.Get("ItemName"),".csv","") 
//Get columns based on the header row of csv file
Do ##class(dc.data.medical.utility).GetColTypes(filename,.coltype) 
//Dynamically create table based on tablename and column types
SET qry = "CREATE TABLE "_tableName_" ("_coltype_")"
SET rset = ##class(%SQL.Statement).%ExecDirect(,qry)
//Check if table created successfully
IF rset.%SQLCODE
{
   WRITE "ERROR : ",rset.%Message,!    
}
ELSE
{
  //Dynamically construct LOAD DATA statement
  SET qry = "LOAD DATA FROM FILE  '"_filename_"' INTO "_tableName_ " "_"USING {""from"":{""file"":{""header"":""1""}}}"
  SET rset = ##class(%SQL.Statement).%ExecDirect(,qry)
  // Check result set sqlcode, In case of error write resultset message
  IF rset.%SQLCODE
  {
   WRITE "ERROR Table : " _tableName_" IMPORT FAILED: ",rset.%Message,!
  }
  ELSE
  {
  WRITE "SUCCESS table : " _tableName_" created and "_rset.%ROWCOUNT_" Rows Imported Successfully",!
  }
}

Use below command to remove particular Dataset by passing it's ID or pass 999 to remove all DataSets
 

do ##class(dc.data.medical.utility).RemoveDS(1)

 

Below is the main script to remove table dynamically

//Get file name
SET filename=tRS.Get("Name")
//Remove .csv from file name
SET tableName=$REPLACE("dc_data_"_ds_"."_tRS.Get("ItemName"),".csv","")
//Drop table
SET qry = "DROP TABLE "_tableName
SET rset = ##class(%SQL.Statement).%ExecDirect(,qry)
//Check if table deleted successfully
IF rset.%SQLCODE
{
  WRITE "ERROR : ",rset.%Message,!          
}
ELSE
{
  WRITE "Table "_tableName_" deleted successfully",!
}

 

How to install or remove any Dataset from Web Application

Navigate to http://localhost:52773/csp/datasets/index.csp  application dashboard

If Dataset is not installed then install DataSet button will be visible and if Dataset is installed then Remove Dataset button will be visible.

Just press the desire button to install or remove any data set

 

How to view and export data from Dataset

Navigate to http://localhost:52773/csp/datasets/datasets.csp  View DataSets page.

Select particular dataset and then table from the list. Press Excel, CSV, PDF file button to export the data.

 

Thanks

2 Comments
讨论 (2)1
登录或注册以继续
问题
· 一月 4, 2022

How to make HL7 ORM message wait in Iris until an acknowledgement is received from the EMR system?

We will receive an ORM message in Business Service in Iris. From that ORM, an ADT^A31 message will be generated and sent out to the EMR before the ORM message is sent out. The ORM message has to wait until Iris receives an acknowledgement from the EMR indicating the ADT message was received. Then, the ORM message will be sent to the EMR. What do I need to set up to hold the ORM message until the acknowledgement is received? 

Thank you!

Patty Aguirre-Romero

11 Comments
讨论 (11)5
登录或注册以继续
文章
· 十二月 30, 2021 阅读大约需 1 分钟

Did you know that IRIS Terminal could do this?!?! History and Aliases!

Hi all,

When is a Developer Community post not a Developer Community post? When it's just a few sentences wrapped around a link to InterSystems documentation! And what better way to finish up 2021 than by telling you about something cool that's been available since v2020.3? As the ball drops in Times Square, curl up with this:

Repeating Previous Commands

I think it will bring you joy! Post your favorite aliases below. Happy New Year!

31 Comments
讨论 (31)9
登录或注册以继续
公告
· 十二月 22, 2021

Enhancement Requests, Ideas and Innovations

Just wanted to give visibility to a place in GitHub where everybody can publish Enhancement Requests, Ideas and Innovations that would be great to have in our InterSystems Technology ecosystem.

If you want to add your enhancement request, or take a look and see if there is already there and vote for it, contribute, etc..., click on this link. That doesn't guarantee that Product Management decides to go on that direction, they have to balance many things to decide our products roadmap, but having the direct input from our Community is invaluable.

Come on! Go for it and make your suggestions!

1 Comment
讨论 (1)2
登录或注册以继续