Search

Clear filter

#InterSystems IRIS for Health

2K Posts11 Followers

#InterSystems IRIS FAQ

0 Posts0 Followers
Announcement
Kristina Lauer · Aug 25, 2022

Dive into InterSystems technologies

In the August Learning Services newsletter, see how you can get hands-on with healthcare analytics tools, Embedded Python, and InterSystems Package Manager. If you're new to InterSystems ObjectScript, try out a learning path to get started!
Article
Piyush Adhikari · Feb 24, 2023

InterSystems IRIS in Containers

InterSystems has also released IRIS as containerized deployments. This post is to demonstrate how InterSystems IRIS and applications those rely on IRIS a backend can be packaged into an image and be run in other machines in containers and how simple it is to do that. A container runs image/s which have all the necessary executables, binary code, libraries, and configuration files. And the images can be moved from one machine to another, and an images repository like Docker Hub can simplify that process. I have used an application from Open Exchange for this demo. Demo video: https://www.loom.com/share/93f9a760b5f54c0a8811b7a212387b9d The image for IRIS Data Platform Community Edition can be found at the InterSystems Container Registry: https://containers.intersystems.com/contents In order to use a containerized instance of IRIS in a host machine, it shall be pulled during runtime. For that, the Dockerfile needs to have following commands like shown below: Dockerfile: Dockerfile ARG IMAGE=intersystemsdc/irishealth-community ARG IMAGE=intersystemsdc/iris-community ARG IMAGE=intersystemsdc/iris-community:preview FROM $IMAGE RUN iris start IRIS \ && iris merge IRIS /tmp/merge.cpf \ && iris stop IRIS quietly These are the base commands that make a Dockerfile written to build an image which has instructions for containerized IRIS. The commands to also run installation of other dependencies required for the application that is running alongside the containerized instance of IRIS can be added. Given are the Docker commands that tag and push an image that carries IRIS instance into Docker Hub, and subsequently pull and run that image in another host machine. Commands docker build -t image_name filepath docker tag image_name dockerhub_username/repository_name:tag_name docker push dockerhub_username/repository_name:tag_name Commands docker pull dockerhub_username/repository_name:tag_name docker run --name test -p host_8080:52773 padhikar/irisincontainer:main Application used in demo: https://openexchange.intersystems.com/package/iris-geo-map Creating InterSystems IRIS images: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=ADOCK#ADOCK_iris_creating Just for clarification, the lines starting with `ARG IMAGE = ` replace each other. Only the last one is actually used. I'm not sure why the others are left in there but I think its so users will know what worked before. So you can simplify the Dockerfile to: ARG IMAGE=intersystemsdc/iris-community:preview FROM $IMAGE RUN iris start IRIS \ && iris merge IRIS /tmp/merge.cpf \ && iris stop IRIS quietly
Question
Jon Jensen · Sep 26, 2017

InterSystems IRIS group?

Is there a group for InterSystems IRIS? If not, can you create it? Hi, Jon!InterSystems IRIS group is introduced.
Announcement
Anastasia Dyubaylo · May 16, 2022

InterSystems Software Developer

We're looking for InterSystems IRIS developer.
Article
Evgeny Shvarov · Jan 19, 2016

InterSystems Community Manager

Hi everyone! I’m the new InterSystems Community Manager and responsible for everything within the InterSystems Developer Community itself including Community Events, Content and Projects etc. Please feel free to point all the criticism to me along with suggestions of course! Our team is working now on fixing some evident and annoying UI problems to make this place comfortable for all the InterSystems customers and new developers to discuss InterSystems related problems, questions, techology and projects. My duty is to make you happy with InterSystems Community Portal and gain maximum value from it! Thanks for the introduction. I'm looking forward to annoying you providing lots of feedback! Bravo - thank you Evgeny :)
Question
Carina Mueler · Jul 8, 2018

InterSystems Platform Functions

Hi, I have general question regarding the InterSystems Platform.Which features does the platform have, that the other similar platforms doesn't have? what product/component are you interested in?IRISENSEMBLEHEALTHSHARECACHÉTRAKiKNOWDEEPSEE.....and others is as wide as the whole software industryplease be more specific What is the difference for example between Ensemble and IRIS ans Cache? reply posted as an answer As by your concrete questionCachéInterSystems Caché® is a high-performance database that powers transaction processing applications around the world. It is used for everything from mapping a billion stars in the Milky Way, to processing a billion equity trades in a day, to managing smart energy grids. EnsembleInterSystems Ensemble® is a seamless platform for rapid connectivity and the development of new connectable applications. Ensemble users typically complete projects twice as fast compared to previous generations of integration products. InterSystems IRISInterSystems IRIS Data Platform™ sets a new level of performance for rapidly developing and deploying important applications. All of the needed tools and capabilities are provided in a reliable, unified platform spanning data management, interoperability, transaction processing, and analytics.more
Article
Robert Cemper · Aug 26, 2017

From The Roots to InterSystems

This is a rather personal view of the history before Caché.It is in no sense meant to compete with the excellent books from Mike Kadow discussed in an earlier article.We have different histories and so this is meant to create a different perspective of the past. The whole story started in 1966 at MGH (Mass.General Hospital) on a PDP-7 Ser.#103with 8K of memory (18-bit words) [ today = 18K byte ] as a spare system. "Serial Number 103 - was located in the basement of the now demolished Thayer Building,currently [2014] the site of the Cox Cancer Center at MGH.""Neil Papparlardo and Curt Marble under the guidance of Octo Barnett developed and releasedthe initial software on this machine." They named it MUMPS. (source) PDP-7 The language itself was rather close to old-style Basic.But there were remarkable improvements over other programming languages: The big idea was to store and retrieve persistent data without the need to deal with a file system. This was an enormous step forward at that time compared to other systems where storing and reading persistent data could easily take 30%+ of your available memory and no idea if sorting, indexing, .... No strong data types anymore or data types imposed by names (ALGOL, FORTRAN, ..) an endless source for formal errors and conversions. Dynamic (sparse) arrays without frozen structure and pre-allocated half-empty space in memory Indexing persistent data with variable-length structured indices (subscripts) allowing easy sorting, grouping, subgrouping,.. You may want to compare it to old code in COBOL, FORTRAN or PL/1 to estimate the dimension of that revolution.The new software took its way along fast-moving hardware development until it reached PDP-11and was finally known as MUMPS 4b. 1978 was a remarkable year:- InterSystems was founded by Terry Ragon- DEC rolled out its first VAX-11 Cluster (at Carnegie Mellon ?)- DEC completed DSM-11 (Digital Standard Mumps) : Besides following the rather fresh standard it had new Global Module that improved storage performance radically. It easily outperformed any other DataBase named product by magnitudes. The author of this Global module was a brilliant engineer with international experience: Terry Ragon.- I myself joined DEC also in 1978 as Sales and Support Engineer for DSM-11 meeting Terry at the first support training in Maynard. DEC at that time was completely high with the new VAX-11 and the VAX-Cluster.The new high-performing DB was ignored and its power totally misunderstood.All requests from software developers to have DSM native on VAX to take advantage of the new box were ignored. This persistent ignorance of customer requests was the base to encourage a customer of mine to invite me:"If they don't do it join us and we will do it !" [How often have you got the offer to write an OS like this from scratch?]I just couldn't resist and I joined and we wrote it up from point zero on bare-boned VAX-750.The OS was named VISOS and lived as long as the supported VAX models existed. Some time later DEC presented DSM as a layered product on top of VMS.In the beginning, performance was dictated by the underlying RMS and didn't reflect the gain in processing power. It moved out of my scope and I didn't care about it anymore.Years later the best on my opinion that DEC did was: They sold its unloved product DSM to InterSystems.Not too long before they were sold themselves. When I joined InterSystems 20 years later I found in Caché again so many details I had implemented myself.So I could enjoy a very warm feeling of being at home. Caché is today far far away from all its predecessors but still source compatible.The power of Globals is still there. There might be only a few constellations where youcan't outperform a competing DB. My favorite example out of many others: GAIA Project run by European Space Agency (ESA) This is obviously a quite personal perspective into technologic history and part of a personal story.If you have questions or feel the need to correct me you are welcome.With my location in Vienna (Austria) I always had the impression to watchdecisions in Cambridge, Maynard, Boston from far far away at the border of the Milky Way. Thanks for a nice story :)I myself got familiar with those nice PDP-11 computers on 1977. I wrote programs with FAS language that was developed in Finland at VTKK (The Computer Center of the State).Then later, maybe late 1986 we started the move to MUMPS using ISM-11 and ISM-11+ on a PDP-11/44.Then there were times with some VAX/VMS-clusters with Intersystems' M(umps) and Caché technology and now I'm working with Caché and Ensemble on aix, Windows and RHL.We are also still using also the good old VA's Kernel as well as the FileMan filesystem.I find myself privileged because I have had the opportunity to work with such a company that InterSystems has been an still is.Now I'm already at "the cooling stage", working only three days a week and only until the end of this year 2017. Thank you Heikki,I have passed this "cooling" too and missed the "heat." So my mind is back and the body stays at home Robert,Great history lesson! I have a question for you though. As you were there at the begining or close to it perhaps you might have some insight. I came from a background in MultiValued databases (aka PICK, Universe, Unidata) joining InterSystems in 2008 when they were pushing Cache's ability to migrate those systems. From the beginning I was amazed at the parallel evolution of both platforms. In fact when I was preparing for my first interviews, having not heard of Cache before, I thought it was some derivative of PICK. Conceptually both MUMPS and PICK share a lot of commonality. Differing in implementation of course. I have long harbored the belief that there had to be some common heritage. Some white papers or other IP that influenced both. Would you have any knowledge on the how the original developers of MUMPS arrived at the design concepts they embraced? Does the name Don Nelson ring a bell?Thanks again for the history. Hi Rich,I remember we met several times @internal meetings and @Devcon / Summit.The common branch of M and MV might be The Ubiquitous B-Tree - 1979 by Dougles Comer.On the other hand mid 60ties it was time to have something new to support creative and faster development.So they might quite well taken ideas from each other.So as you find many lingual constructs that are pretty similar to Java.Don Nelson didn't pass my way. But I have a personal gap from '85 to '99 where I was on a complete different road. Hi Robert, thank you for sharing with the rest of us this great piece of computer history. They say life is making circles. I believe it's about time for MUMPS to make history again in database management and database modeling with Associative Semiotic Hypergraph engine build on top of Intersystems Cache globals and a powerful OOP API in Python for data analytics. Stay tuned, I am fond of old pioneers of computer technology and I do respect a lot their efforts and strangle of their time. We build powerful meaningful relationships easily ;-) Thank you Athanassios! I see these cycles everywhere. Almost every relational DB today has its B-tree index. Well known here since DSM-11.Similar when I did an evaluation of HBase and scratched a little bit under the surface : I found a tiny Global structurewith limited subscripts.You are right there is a lot of power left for new development on this base. And have you noticed that what ever the model and data structure we cannot escape from the fundamental principle of managing data allocation space with references, i.e. pointer based logic, memory addressing ? Isn't this the fundamental mechanism of programming languages too ? The problem I see with all these modern nosql databases, especially graph databases is that they provide a higher level abstraction for the end developer but they hide and lock completely the access to the low level storage and retrieval mechanism including indexes. Even in key-value stores you cannot see or understand the sorting of indexes, you cannot easily reference data values.Transparency in computer science is a huge issue. Wizards and pioneers of computer hardware and software, have created multiple abstraction layers and here comes the next generation that is asked to program the machine without understanding what is going on underneath. And even if there is such a desire, the environment, the language and the tools, DO NOT help towards this direction. Intersystems cache does make the difference from many aspects. There is a built-in database with subscripted arrays and multi-dimensional keys similar to the variables used by most programming languages to access main memory.Let me repeat this, a programming language MUMPS-Cache objectscript with a built-in database. I think this is a fundamental aspect that they have been missing when others invented new programming languages. They are missing the innate common characteristic that both databases and programming languages share which is the pointer, reference based logic. So I believe it's time to return back and fix this for new generation databases AND post-modern programming languages too. What do you think ;-0 You hit the point:Transparency is important.Not be forced to use it but as an offer to developers to make the underlying mechanics visible Let me repeat this, a programming language MUMPS-Cache objectscript with a built-in database. I think this is a fundamental aspect that they have been missing when others invented new programming languages. They are missing the innate common characteristic that both databases and programming languages share which is the pointer, reference based logic. So I believe it's time to return back and fix this for new generation databases AND post-modern programming languages too.This is a core part of the QEWD.js project: to make JavaScript a first-class language for Global Storage databases - and therefore give JavaScript a built-in database. The cache.node module provides the high-performance in-process connection needed to allow the intimate relationship between JavaScript and the Cache database engine. The ewd-document-store module aims to provide the JavaScript equivalent of the ^ in COS (ie blurring the distinction between in-memory and on-disk JavaScript objects). JavaScript's dynamic, schemaless objects are a perfect fit with the dynamic, schemaless nature of Global Storage, making it an ideal modern substitute language instead of COS. For more information see the online tutorial at http://docs.qewdjs.com/qewd_training.html - specifically parts 17 - 27 Hi Rob, thank you for the update on your QEWD project. One of the main reasons I chose Python as the binding language for Cache in our project instead of Javascript is that in data analysis, data science area the first is already well established, extremely popular and there is big momentum on developing further a vast collection of tools and libraries that extent the language. But the second clearly wins the battle in web platform development. I am sure I will definitely re-visit your project and perhaps ask you to collaborate when I reach the stage of developing the front end and/or another client API. For our readers I must also mention that your article on a universal NoSQL engine using Globals is a must read for anyone that wants to understand the power of multi-dimensional, schema-free, hierarchically structured, sparse, dynamic arrays, i.e. Global Storage databases. And for the history it appeared right at the birth (re-birth) of NoSQL movement back in 2010 ;-) Robert Cemper is a great example of how to reinvent yourself and always be in line with technological trends, without forgetting the lessons of the past. His articles and applications on this DC are my favorites. It's great to always be able to enjoy his great and continuous contribution here. Robert is our GOAT. @Yuri.Gomes thank you.! To some extent, I'm an actor too and enjoy pleasing my audience Congrats, @Robert.Cemper1003 ! BTW, how come this article is shown as new and came in April's digest? I see comments from 2017 It is from 2017During the Quality Assurance of the article it was updated Great to discover your article after 6 years @Robert.Cemper1003, thanks to a QA update! 😉
Article
Dmitry Maslennikov · Nov 5, 2018

Abnormal programming with InterSystems

I bet that not everyone familiar with InterSystems Caché knows about Studio extensions for working with the source code. You can actually use the Studio to create your own type of source code, compile it into interpretable (INT) and object code, and sometimes even add code completion support. That is, theoretically, you can make the Studio support any programming language that will be executed by the DBMS just as well as Caché ObjectScript. In this article, I will give you a simple example of writing programs in Caché Studio using a language that resembles JavaScript. If you are interested, please read along. If you go to the SAMPLES namespace, you will find an example of working with user-defined file types. The example suggests opening a document of the “Example User Document (.tst)” type, and there is only one file of this type called TestRoutine.TST, which, in fact, is generated on the go. The class required for working with this file type is called Studio.ExampleDocument. Let’s not get into this example too deeply and create our own instead. The ".JS" file type is already being used in the Studio and JavaScript that we want to support is not exactly the original JavaScript. Let’s call it CacheJavaScript and the file type will be ".CJS". To start off, create a %CJS.StudioRoutines class as a subclass of the %Studio.AbstractDocument class and add the support of the new file type to it. /// The extension name, this can be a comma separated list of extensions if this class supports more than one Projection RegisterExtension As %Projection.StudioDocument(DocumentDescription = "CachéJavaScript Routine", DocumentExtension = "cjs", DocumentIcon = 1, DocumentType = "JS"); DocumentDescription — displayed as the type description in the open file window in the list of filters;DocumentExtension — the extension of the files that will be processed by this class;DocumentIcon — the icon number starts from zero; the following icons are available: DocumentType — this type will be used for code and error highlighting; the following types are available:INT — Cache Object Script INT codeMAC — Cache Object Script MAC codeINC — Cache Object Script macro includeCSP — Cache Server PageCSR — Cache Server RuleJS — JavaScript codeCSS — HTML Style SheetXML — XML documentXSL — XML transformXSD — XML schemaMVB — Multivalue Basic mvb codeMVI — Multivalue Basic mvi code We will now implement all the necessary methods for supporting the new source code type in the Studio. ListExecute and ListFetch methods are used for obtaining a list of files available in the namespace and for showing them in the open file dialogue. ClassMethod ListExecute(ByRef qHandle As %Binary, Directory As %String, Flat As %Boolean, System As %Boolean) As %Status { Set qHandle=$listbuild(Directory,Flat,System,"") Quit $$$OK } ClassMethod ListFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = ListExecute ] { Set Row="",AtEnd=0 If qHandle="" Set AtEnd=1 Quit $$$OK If $list(qHandle)'=""||($list(qHandle,4)=1) Set AtEnd=1 Quit $$$OK set AtEnd=1 Set rtnName=$listget(qHandle,5) For { Set rtnName=$order(^rCJS(rtnName)) Quit:rtnName="" continue:$get(^rCJS(rtnName,«LANG»))'=«CJS» set timeStamp=$zdatetime($get(^rCJS(rtnName,0)),3) set size=+$get(^rCJS(rtnName,0,«SIZE»)) Set Row=$listbuild(rtnName_".cjs",timeStamp,size,"") set AtEnd=0 set $list(qHandle,5)=rtnName Quit } Quit $$$OK } We will store the description of the programs in the ^rCJS global, and the ListFetch method will traverse this global to return strings containing the following: name, date, and size of the found file. In order for the results of being displayed in the dialogue, you need to create an Exists method that checks whether a file with such a name exists. /// Return 1 if the routine 'name' exists and 0 if it does not. ClassMethod Exists(name As %String) As %Boolean { Set rtnName = $piece(name,".",1,$length(name,".")-1) Set rtnNameExt = $piece(name,".",$length(name,".")) Quit $data(^rCJS(rtnName))&&($get(^rCJS(rtnName,«LANG»))=$zconvert(rtnNameExt,«U»)) } The TimeStamp will return the date and time of the program. The result is also shown in the file open dialogue. /// Return the timestamp of routine 'name' in %TimeStamp format. This is used to determine if the routine has /// been updated on the server and so needs reloading from Studio. So the format should be $zdatetime($horolog,3), /// or "" if the routine does not exist. ClassMethod TimeStamp(name As %String) As %TimeStamp { Set rtnName = $piece(name,".",1,$length(name,".")-1) Set timeStamp=$zdatetime($get(^rCJS(rtnName,0)),3) Quit timeStamp } We will now need to load the program and save the changes in the file. The text of the program, line by line, is stored in the same ^rCJS global. /// Load the routine in Name into the stream Code Method Load() As %Status { set source=..Code do source.Clear() set pCodeGN=$name(^rCJS(..ShortName,0)) for pLine=1:1:$get(@pCodeGN@(0),0) { do source.WriteLine(@pCodeGN@(pLine)) } do source.Rewind() Quit $$$OK } /// Save the routine stored in Code Method Save() As %Status { set pCodeGN=$name(^rCJS(..ShortName,0)) kill @pCodeGN set @pCodeGN=$ztimestamp Set ..Code.LineTerminator=$char(13,10) set source=..Code do source.Rewind() WHILE '(source.AtEnd) { set pCodeLine=source.ReadLine() set @pCodeGN@($increment(@pCodeGN@(0)))=pCodeLine } set @pCodeGN@(«SIZE»)=..Code.Size Quit $$$OK } Here comes the most interesting part: compilation of our program. We will compile into INT code and therefore have full compatibility with Caché. This article is just an example, which is why I used just a small fraction of the capabilities of CachéJavaScript: declaration of variables (var), reading (read), and data output (println). /// CompileDocument is called when the document is to be compiled /// It has already called the source control hooks at this point Method CompileDocument(ByRef qstruct As %String) As %Status { Write !,«Compile: „,..Name Set compiledCode=##class(%Routine).%OpenId(..ShortName_“.INT») Set compiledCode.Generated=1 do compiledCode.Clear() do compiledCode.WriteLine(" ;generated at "_$zdatetime($ztimestamp,3)) do ..GenerateIntCode(compiledCode) do compiledCode.%Save() do compiledCode.Compile() Quit $$$OK } Method GenerateIntCode(aCode) [ Internal ] { set varMatcher=##class(%Regex.Matcher).%New("[ \t]*(var[ \t]+)?(\w[\w\d]*)[ \t]*(\=[ \t]*(.*))?") set printlnMatcher=##class(%Regex.Matcher).%New("[ \t]*(?:console\.log|println)\(([^\)]+)\)?") set readMatcher=##class(%Regex.Matcher).%New("[ \t]*read\((.*)\,(.*)\)") set source=..Code do source.Rewind() while 'source.AtEnd { set tLine=source.ReadLine() set pos=1 while $locate(tLine,"(([^\'\""\;\r\n]|[\'\""][^\'\""]*[\'\""])+)",pos,pos,tCode) { set tPos=1 if $zstrip(tCode,"*W")="" { do aCode.WriteLine(tCode) continue } if varMatcher.Match(tCode) { set varName=varMatcher.Group(2) if varMatcher.Group(1)'="" { do aCode.WriteLine($char(9)_«new „_varName) } if varMatcher.Group(3)'=“» { set expr=varMatcher.Group(4) set expr=..Expression(expr) do:expr'="" aCode.WriteLine($char(9)_«set „_varName_“ = „_expr) } continue } elseif printlnMatcher.Match(tCode) { set expr=printlnMatcher.Group(1) set expr=..Expression(expr) do:expr'=“» aCode.WriteLine($char(9)_«Write „_expr_“,!») } elseif readMatcher.Match(tCode) { set expr=readMatcher.Group(1) set expr=..Expression(expr) set var=readMatcher.Group(2) do:expr'="" aCode.WriteLine($char(9)_«read „_expr_“,»_var_",!") } } } } ClassMethod Expression(tExpr) As %String { set matchers($increment(matchers),«matcher»)="(?sm)([^\'\""]*)\+[ \t]*(?:\""([^\""]*)\""|\'([^\']*)\')([^\'\""]*)" set matchers(matchers,«replacement»)="$1_""$2$3""$4" set matchers($increment(matchers),«matcher»)="(?sm)([^\'\""]*)(?:\""([^\""]*)\""|\'([^\']*)\')[ \t]*\+([^\'\""]*)" set matchers(matchers,«replacement»)="$1""$2$3""_$4" set matchers($increment(matchers),«matcher»)="(?sm)([^\'\""]*)(?:\""([^\""]*)\""|\'([^\']*)\')([^\'\""]*)" set matchers(matchers,«replacement»)="$1""$2$3""$4" set tResult=tExpr for i=1:1:matchers { set matcher=##class(%Regex.Matcher).%New(matchers(i,«matcher»)) set replacement=$get(matchers(i,«replacement»)) set matcher.Text=tResult set tResult=matcher.ReplaceAll(replacement) } quit tResult } You can view the generated INT code for each compiled program or class. To do that, you will need to write a GetOther method. It’s pretty simple — its purpose is to return a comma-delimited list of programs that were generated for the source code. /// Return other document types that this is related to. /// Passed a name and you return a comma separated list of the other documents it is related to /// or "" if it is not related to anything. Note that this can be passed a document of another type /// for example if your 'test.XXX' document creates a 'test.INT' routine then it will also be called /// with 'test.INT' so you can return 'test.XXX' to complete the cycle. ClassMethod GetOther(Name As %String) As %String { Set rtnName = $piece(Name,".",1,$length(Name,".")-1)_".INT" Quit:##class(%Routine).%ExistsId(rtnName) rtnName Quit "" } We implemented a method of blocking a program so that just one developer at a time could edit a program or class on the server. Don’t forget about writing a method for deleting programs. /// Delete the routine 'name' which includes the routine extension ClassMethod Delete(name As %String) As %Status { Set rtnName = $piece(name,".",1,$length(name,".")-1) Kill ^rCJS(rtnName) Quit $$$OK } /// Lock the current routine, default method just unlocks the ^rCJS global with the name of the routine. /// If it fails then return a status code of the error, otherwise return $$$OK Method Lock(flags As %String) As %Status { Lock +^rCJS(..Name):0 Else Quit $$$ERROR($$$CanNotLockRoutine,..Name) Quit $$$OK } /// Unlock the current routine, default method just unlocks the ^rCJS global with the name of the routine Method Unlock(flags As %String) As %Status { Lock -^rCJS(..Name) Quit $$$OK } All right, we have written a class that allows us to work with our type of programs. However, we cannot write such a program just yet. Let’s fix it. The Studio enables you to define templates and there are 3 ways of doing it: a simple CSP file of a particular format, a CSP class inherited from the %CSP.StudioTemplateSuper class, and, finally, a ZEN page inherited from %ZEN.Template.studioTemplate. In our case, we will use the last option for simplicity. Templates can be of 3 types as well: for creating new objects, just code templates, and add-ins, which generate no output. In our case, we will need a template for creating new objects. Let’s make a new class called %CJS.RoutineWizard. Its content is pretty simple – you will need to describe a field for entering the program’s name, then describe the name of the new program and its mandatory content for the Studio in the %OnTemplateAction method. /// Studio Template: /// Create a new Cache JavaScript Routine. Class %CJS.RoutineWizard Extends %ZEN.Template.studioTemplate [ StorageStrategy = "" ] { Parameter TEMPLATENAME = "Cache JavaScript"; Parameter TEMPLATETITLE = "Cache JavaScript"; Parameter TEMPLATEDESCRIPTION = "Create a new Cache JavaScript routine."; Parameter TEMPLATETYPE = "CJS"; /// What type of template. Parameter TEMPLATEMODE = "new"; /// If this is a TEMPLATEMODE="new" then this is the name of the tab /// in Studio this template is dispayed on. If none specified then /// it displays on 'Custom' tab. Parameter TEMPLATEGROUP As STRING; /// This XML block defines the contents of the body pane of this Studio Template. XData templateBody [ XMLNamespace = "http://www.intersystems.com/zen" ] { } /// Provide contents of description component. Method %GetDescHTML(pSeed As %String) As %Status { Quit $$$OK } /// This is called when the template is first displayed; /// This provides a chance to set focus etc. ClientMethod onstartHandler() [ Language = javascript ] { // give focus to name var ctrl = zenPage.getComponentById('ctrlRoutineName'); if (ctrl) { ctrl.focus(); ctrl.select(); } } /// Validation handler for form built-into template. ClientMethod formValidationHandler() [ Language = javascript ] { var rtnName = zenPage.getComponentById('ctrlRoutineName').getValue(); if ('' == rtnName) { return false; } return true; } /// This method is called when the template is complete. Any /// output to the principal device is returned to the Studio. Method %OnTemplateAction() As %Status { Set tRoutineName = ..%GetValueByName("RoutineName") Set %session.Data("Template","NAME") = tRoutineName_".CJS" Write "// "_tRoutineName,! Quit $$$OK } } That’s it. You can now create your first program written in Caché JavaScript in the Studio. Let’s call it “hello”. The source code in CachéJavaScript can look like this, for example: // hello console.log('Hello World!'); var name=''; read('What is your name? ', name); println('Hello ' + name + '!'); Let's save it. After save and compile we will see that int code was generated compiled as well successfully, in the output: Compilation started on 11/04/2018 12:57:00 with qualifiers 'ck-u' Compile: hello.CJS Compiling routine : hello.int Compilation finished successfully in 0.034s. Let's look at another source. We can now run it in the terminal USER>d ^hello Hello World! What is your name? daimor Hello daimor! This is how you can describe any language (to a certain extent, of course) that you like and use it to code the server-side business logic for the Caché/IRIS Data platform. There definitely will be problems with code highlighting if this language is not supported by the Studio. This example demonstrates the work with programs, but can definitely create Caché classes the same way. The possibilities are nearly limitless: you just need to write a lexical parser, a syntax parser, and a full-fledged compiler, then come up with the right mapping between all Caché system functions and specific constructs in the new language. Such programs can also be exported and imported with compilation, as it is done with any other programs in Caché. Anyone willing to do it at home can download the source codes here in udl or xml. Just curious is anybody already uses such feature in their work or looking to use? The title looks "scary" )Dmitry, does your approach need Caché Studio only? Could it be used for Eclipse or Visual Studio Code? At this time, it is supported only with Studio. I can easily add support to VSCode, not sure how it will be possible for Eclipse Atelier. That's amazing, Dmitry. Thanks for the introduction.About the parts of lexical parser, syntax, parse, and full-fleged compiler.... how should that be done, and integrated into the framework once they are done? Oh, I missed them in your post. I think that is what you were referring in the method CompileDocument(). Alternatively you could use proper JavaScript via Node.js and the cache.node / iris.node interface :-)
Article
Sylvain Guilbaud · Sep 25, 2023

InterSystems IRIS trainings

Hi Community, to learn quickly and in total autonomy on IRIS, I offer you some links which can help you in this beautiful bicycle ride rich in discoveries: InterSystems Developer Hub​​​​​​ Full Stack Tutorial Build the IT infrastructure for a company that roasts and sells coffee. See how InterSystems IRIS can serve as your IT architecture backbone REST + Angular Application Build a simple URL bookmarking app using InterSystems IRIS, REST service engine, and the Angular web framework Apply Machine Learning Create, train, validate and use prediction models for hospital readmissions based on a publicly available historical database InterSystems Interoperability Test drive our integration framework for connecting systems easily and developing interoperable applications. Getting Started with InterSystems ObjectScript Developing in ObjectScript with Visual Studio Code Building a Server-Side Application with InterSystems Getting Started with InterSystems IRIS for Coders Managing InterSystems IRIS for Developers InterSystems IRIS Management Basics Predicting Outcomes with IntegratedML in InterSystems IRIS Writing Applications Using Angular and InterSystems IRIS Writing Python Applications with InterSystems Configuring InterSystems IRIS Applications for Client Access Connecting Java Applications to InterSystems Products Connecting .NET Applications to InterSystems Products Connecting Node.js Applications to InterSystems Products Analyzing Data with InterSystems IRIS BI Building Business Integrations with InterSystems IRIS Building Custom Integrations If you want to get started with your own local IRIS instance, I recommend using our templates available at OpenExchange : intersystems-iris-dev-template iris-interoperability-template iris-embedded-python-template iris-fullstack-template iris-analytics-template Thanks @Sylvain.Guilbaud This is pretty useful. This is a great list of resources for the beginners! I think would be great to expand the first link, which contains 4 interactive in-browser tutorials Thanks for the advice @Dmitry.Maslennikov I added direct links to the 4 subsections wow! amazing guide for beginners 🤩 thank you, @Sylvain.Guilbaud!!

#InterSystems Demo Olympics

0 Posts0 Followers
Announcement
Anastasia Dyubaylo · Apr 23, 2020

InterSystems IRIS Tech Talks: Upcoming Webinars for InterSystems Developers

Hi Community, We're pleased to invite you to join the “InterSystems IRIS Tech Talks”, a new series of webinars presented by InterSystems product managers. The webinars will take deep dives into the latest features of InterSystems IRIS 2020.1 from a developer’s perspective. They’ll go beyond the high-level overviews and kick the tires on the very best and latest technologies we’ve released. Please have a look at the list of webinars planned for May and June: ✅ API-First DevelopmentDate: May 5, 2020Time: 10:00 AM EDT ✅ Integrated Development EnvironmentsDate: May 19, 2020Time: 10:00 AM EDT ✅ DevOpsDate: June 2, 2020Time: 10:00 AM EDT So, dear developers! You're very welcome to join the upcoming InterSystems Tech Talks! ➡️ REGISTRATION IS ALREADY OPEN! Hope you enjoy the new webinars! And please find the first webinar recording on Data Science, Machine Learning & Analytics here: WATCH NOW Stay tuned!
Article
Tony Coffman · Feb 6, 2020

Connecting to InterSystems Caché and InterSystem IRIS with BridgeWorks VDM

Hello Community, Thank you all for your continued feedback and support of our ad hoc reporting platform, VDM. There's been some questions around setting up a non-ODBC connection for InterSystems platforms. We published a new YouTube video showing the steps necessary to connect to InterSystems Caché and InterSystem IRIS with BridgeWorks VDM. jQuery(document).ready(function ($){$("#youtubeNtH5w4AzmMY").css("height",$("#youtubeNtH5w4AzmMY").css("width").replace(/[^0-9]/gim,"")/(560/315));$(window).resize(function(){ $("#youtubeNtH5w4AzmMY").css("height",$("#youtubeNtH5w4AzmMY").css("width").replace(/[^0-9]/gim,"")/(560/315));});});
Announcement
Jeff Fried · Dec 10, 2019

InterSystems IRIS and InterSystems IRIS for Health 2019.4 released

The 2019.4 versions of InterSystems IRIS, InterSystems IRIS for Health, and InterSystems IRIS Studio are now Generally Available! These releases are available from the WRC Software Distribution site, with build number 2019.4.0.383.0. InterSystems IRIS Data Platform 2019.4 has many new capabilities including: New Automatic Configuration Customization System security, performance, and efficiency enhancements including node tables ICM support for Tencent Cloud List Class available in the Native API for Java and .Net Container and Cloud Deployment improvements SQL enhancements InterSystems IRIS for Health 2019.4 includes all of the enhancements of InterSystems IRIS. In addition, this release includes FHIR searching with chained parameters (including reverse chaining) and minor updates to FHIR and other health care protocols. These are detailed in the documentation: InterSystems IRIS 2019.4 documentation and release notes InterSystems IRIS for Health 2019.4 documentation and release notes InterSystems IRIS Studio 2019.4 is a standalone development image supported on Microsoft Windows. It works with InterSystems IRIS and InterSystems IRIS for Health version 2019.4 and below, as well as with Caché and Ensemble. As this is a CD release it is only available in OCI (Open Container Initiative) a.k.a. Docker container format. The platforms on which this is supported for production and development are detailed in the Supported Platforms document. Hi Jeff! Thanks! When the new release will be available on Docker Hub? These are now available! docker pull store/intersystems/iris-community:2019.4.0.383.0 docker pull store/intersystems/irishealth-community:2019.4.0.383.0 Thanks, Steve! Hi Jeff, Is there a distinct Health Connect build? I'm upgrading from 2017.1 Kind regards, Stephen Hi Stephen - Sorry for the slow response on this. We are not releasing the quarterly CD releases for Health Connect, so there isn't a 2019.4 available for it. The most recent version is 2019.1.1. But we'll have a 2020.1 out shortly (there's a preview available now if you want to work with it). Since you are moving from 2017.1, you should be aware that the underlying technology has changed (from being based on Ensemble to being based on InterSystems IRIS) , so technically this is an in-place conversion. Please look at the in-place conversion guide ahead of your move, and if you follow the steps it should go quite smoothly. -jeff