#InterSystems IRIS

19 Followers · 5.5K Posts

InterSystems IRIS is a Complete Data Platform
InterSystems IRIS gives you everything you need to capture, share, understand, and act upon your organization’s most valuable asset – your data.
As a complete platform, InterSystems IRIS eliminates the need to integrate multiple development technologies. Applications require less code, fewer system resources, and less maintenance.

Article Gevorg Arutiunian · Sep 20, 2018 2m read

This code snippet determines the day of the week associated with a date. The class method "test" takes a date as a string in "mm/dd/yyyy" format, and returns an integer corresponding to a day of the week:


Class cartertiernan.getDayfromDate Extends %RegisteredObject
{
	classmethod test(date) as %Integer {
		//Set date = $ZDATE(date) //  Looks like: mm/dd/yyyy
    Set monthList = $LISTBUILD(0,3,3,6,1,4,6,2,5,0,3,5) // (Jan,Feb,Mar,Apr,...)
    Set centuryList = $LISTBUILD(6,4,2,0) // first two digits divisiable by 4, then subsequent centuries. EX (2000, 2100, 2200, 2300)
    Set dayList = $LISTBUILD("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") // Index goes from 0-6
     
    Set day = $PIECE(date,"/",2) // get the day 
    Set monthVal = $LIST(monthList,($PIECE( date,"/",1 ))) // get the month value
    Set first2DigsYear = $PIECE( date,"/",3 ) \ 100 // get the last 2 digits of the year
    Set last2DigsYear = $PIECE( date,"/",3 ) # 100 // get the first 2 digits of the year
     
    // Used for DEBUG perpouses
    /*write !,"day: ",day
    write !,"Month: ",monthVal
    write !,"last2: ",last2DigsYear
    write !,"first2: ",first2DigsYear
    write !,"cen Val: ",$LIST(centuryList,(first2DigsYear # 4) + 1),!!*/
     
    // Look here for formula explination (its the "Basic method for mental calculation")
    // http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
    Set dayOfWeekVal = ( day + monthVal + last2DigsYear + (last2DigsYear\4) + $LIST(centuryList,(first2DigsYear # 4) + 1 ) ) # 7
 
    Quit dayOfWeekVal
}

}

Here's a link to the code on GitHub

(originally posted to CODE by Carter Tiernan, 6/18/14)

1
1 1165
Question Galena Teneva · Jul 5, 2018

Hi,
it is possible to convert a csv file to json file?

I want to stream json files and output the data as it comes in from the files. So my files are "csv" type and I want to convert these files to "json" type.


I can read csv file as follows:

ClassMethod ReadFile()
{
    set stream = ##class(%Stream.FileCharacter).%New()
    set sc = stream.LinkToFile("*.csv")
    do stream.Rewind()
    while'stream.AtEnd {
        set line=stream.ReadLine()
        write line,!
}
What should I add to convert it to "json" and read it again?

Thank you

7
1 1854
Question Carina Mueler · Sep 7, 2018

Hey guys,
I need your help.
I am writing a code in Python and I want to create a database and some properties and then to send json files (data) to this database. (I use client-server-model for loading the data into IRIS)
I use curl methods and convert it in Python code with:

curl.trillworks.com/#python

My code so far:
 

15
0 490
Article Gevorg Arutiunian · Sep 6, 2018 1m read

This code snippet allows for a file on the web to be saved into the file system. Specify the server and GET request, as well as the directory the file should be saved to. The class method "test" runs the code:


Class objectscript.saveFileHTTP Extends %RegisteredObject
{
	classmethod test() {
		Set httprequest = ##class(%Net.HttpRequest).%New()
		Set httprequest.Server = "docs.intersystems.com"
		Do httprequest.Get("documentation/cache/20172/pdfs/GJSON.pdf")
    Do $System.OBJ.Dump(httprequest.HttpResponse)
	 
	Set stream=##class(%FileBinaryStream).%New()
	Set stream.Filename="c:\test.pdf"

	Write stream.CopyFrom(httprequest.HttpResponse.Data)
	Write stream.%Save()
}

}

Here's a link to the code on GitHub

0
1 1071
Article Gevorg Arutiunian · Sep 4, 2018 11m read

I already talked about GraphQL and the ways of using it in this article. Now I am going to tell you about the tasks I was facing and the results that I managed to achieve in the process of implementing GraphQL for InterSystems platforms.

What this article is about

  • Generation of an AST for a GraphQL request and its validation
  • Generation of documentation
  • Generation of a response in the JSON format
2
2 1253
Article Yuri Marx · Sep 3, 2018 3m read

Companies today face serious problems in managing their data and delivering strategic value to them. The structure and business logic of data is fragmented into different solutions, architectures and technology platforms. In addition, different project teams, one for each solution, impose their views on the business, limiting the business to which each of these solutions are able to do. The database becomes a simple repository of processed data under the partial view delivered by each application, process, analysis, message and integration.

4
1 1016
Announcement Steve Brunner · Jun 5, 2018

InterSystems is pleased to announce the release of InterSystems IRIS Data Platform 2018.1.1

This is our first follow up to InterSystems IRIS 2018.1.0, released earlier this year.  InterSystems IRIS is a unified data platform for building scalable multi-workload, multi-model data management applications with native interoperability and an open analytics platform.  As a reminder, you can learn more about InterSystems IRIS Data Platform from these Learning Services resources.

Hundreds of fixes have been made in this release:

12
0 918
Question Chris George · Jul 18, 2018

My understanding is that IRIS is a new technology and does not replace Cache or Ensemble and to that end is more of a modernization than a repackaging. Is that accurate?

Is IRIS and HealthShare heavily penetrated in the payer space of primarily dominate in the provider space? What is the trajectory for InterSystems to penetrate the payer landscape?

1
0 494
Announcement Evgeny Shvarov · Apr 11, 2018

Hi, Community!

Continuous Delivery is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time. It aims at building, testing, and releasing software faster and more frequently. The approach helps reduce the cost, time, and risk of delivering changes by allowing for more incremental updates to applications in production.

Join us at 07:00 UTC, April 24th for a webinar with a live demo "Git flows and Continuous Delivery" by @Eduard Lebedyuk 

The language of the webinar is Russian.

Also, see the related articles on DC.

1
0 568
Question Stefan Cronje · Aug 4, 2018

Hey folks,

I am new to IRIS and cloud platforms. I've done the InterSystems IRIS Experience on the learning site and read a lot of the online documentation. What I am unable to figure out is which type of package or option you will use on the cloud provider.

AWS for example, has AWS EC2, Elastic Beanstalk and some other products geared towards Docker containers.
Azure has Kubernetes and some other options.

5
0 712
Question Tuan Minh Do · Jul 16, 2018

Hello,

I have imported my data with the following code (%DocDB).

set filename = "/home/student/Dokumente/convertcsv.json"

IF $SYSTEM.DocDB.Exists("Fitabase1") { 

SET db = ##class(%DocDB.Database).%GetDatabase("Fitabase1")

}

ELSE {

SET db = ##class(%DocDB.Database).%CreateDatabase("Fitabase1") 

}

set arr = ##class(%DynamicAbstractObject).%FromJSON(filename)

SET jstring = arr.%ToJSON()

//SET doccount = db.%Size()

DO db.%FromJSON(jstring) 

Now I have data sets like 

2
0 497