検索

Article
· Mar 12, 2023 1m read

Create FHIR REST Client

Add a credential to login the FHIR REST interface - in this case only consider a basic authentication

 

 

Add Service Registry  - in this case only consider a basic authentication

- setup a HTTP service

- input the Path to the FHIR Server

- input the URL to the FHIR service

- use the credential profiled
 

 

Add a "HS.FHIRServer.Interop.HTTPOperation"

Choose the Service Name

 

Test the FHIR Client

 

Trace the test result

6 Comments
Discussion (6)4
Log in or sign up to continue
Article
· Mar 8, 2023 5m read

Keep your docker iris images in shape ;)

iris-docker-multi-stage-script

A python script to keep your docker iris images in shape ;)

Witout changing your dockerfile or your code you can reduce the size of your image by 50% or more !

TL;DR

Name the builder image builder and the final image final and add this to end of your Dockerfile:

Modify your Dockerfile to use a multi-stage build:

ARG IMAGE=intersystemsdc/irishealth-community:latest
FROM $IMAGE as builder

Add this to end of your Dockerfile:

FROM $IMAGE as final

ADD --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} https://github.com/grongierisc/iris-docker-multi-stage-script/releases/latest/download/copy-data.py /irisdev/app/copy-data.py

RUN --mount=type=bind,source=/,target=/builder/root,from=builder \
    cp -f /builder/root/usr/irissys/iris.cpf /usr/irissys/iris.cpf && \
    python3 /irisdev/app/copy-data.py -c /usr/irissys/iris.cpf -d /builder/root/ 

Boom! You're done!

11 Comments
Discussion (11)4
Log in or sign up to continue
Announcement
· Mar 7, 2023

InterSystems au Hacking Health Camp 2023 !

Salut la Communauté !

Je suis exaltée à vous annoncer qu'InterSystems va prendre part dans le Hacking Health Camp 2023 - la 10ème édition, le plus grand hackathon santé au monde !

Hacking Health Camp est un événement d’innovation en santé numérique qui permet de transformer les idées pour répondre aux problématiques du quotidien en prototypes fonctionnels en 3 jours.

📅 Dates: vendredi 24 mars à partir de 13h jusqu’au dimanche 26 mars vers 18h

📌 Lieu : Faculté de médecine de Strasbourg (4 rue kirschleger, 67000 Strasbourg)

Un programme de 3 jours avec :

  • Conférences inspirantes sur le futur de la santé.
  • Formations et interviews : en format de 25 minutes, dans les domaines : technologique, juridique, médical, design, … 
  • Hackathon : permet de transformer les idées innovantes en prototypes fonctionnels en 50h

Le programme du Hackathon :

VENDREDI

18:00 - LANCEMENT DU HACKATHON

18:40 - PRÉSENTATION DES COACHS

18:45 - PITCHS DES PROJETS : 1min pour présenter votre projet !

19:30 - CONSTITUTION DES ÉQUIPES : Assistance en direct aux porteurs de projets pour lancer les appels à compétences et constituer les équipes. 

20:00 - DINER

21:00 - DÉMARRAGE DES PROJETS

SAMEDI

9:00 – 12:00 - RENCONTRE AVEC LES COACHS : Séance de travail en groupe avec les coachs

10:00 – 11:40 - TRAVAIL EN ÉQUIPE

11:40 – 13:40 - DÉJEUNER

13:40 – 16:30 - TRAVAIL EN ÉQUIPE, INTERVIEWS LIVE

16:10 – 16:20 - PAUSE GOÛTER

16:20 – 20:00 - TRAVAIL EN ÉQUIPE

20:00 - DINER 

21:00 … - NUIT DE CODE 

DIMANCHE

9:00 – 12:00 - TRAVAIL EN ÉQUIPE, DEMO CLINICS : Séances d’entrainement au pitch avec les coachs

12:00 – 13:45 - DÉJEUNER

14:00 – 17:00 - PRÉSENTATION DES PROTOTYPES : 3′ de démo + 2′ de questions réponses

17:00 – 18:00 - DÉLIBÉRATION DU JURY

18:00 - REMISE DES PRIX, CLOTURE

 
Un petit goût pour vous :

✅ Inscrivez-vous ici 

On espère de vous y voir pour cette folie créative de 50 heures pour inventer la santé de demain ! Restez à l'écoute pour plus d'infos.

A bientôt !

------------------------------------------

NB. On a 10 billets gratuits à offrir aux équipes de participants qui envisagent de réaliser des projets basés sur les technologies InterSystems ! Répondez simplement dans les commentaires ou envoyez-moi un message.

4 Comments
Discussion (4)4
Log in or sign up to continue
Article
· Mar 2, 2023 4m read

Tutorial - Streams in Pieces

This tutorial is a follow on to Working with %Query    
It was displaying the content of the input stream chopped in fixed-size chunks.
But often those streams are structured and have well-defined separators (e.g HL7)
So as a side subject of this tutorial, this chapter shows how to break a stream into PIECES.

It is exactly the same idea as the $PIECE() function for strings with some add-ons.


The query takes these input parameters:

  • idfrom = first ID to show
  • idto = last ID to show - missing shos al higher IDs available
  • maxtxt = maximum size of output text from the stream. Default = 25
  • separator = characters as know from $Piece function 
  • startpiece = first piece to display
  • endpiece = last piece to display - if missing only the first is displayed
  • grouped = number of pieces in output text.  limited by maxtxt - default = 1
  • before = number of characters before the limiter from the previous piece

Implementation

The base for the Query was shown in the previous chapters.
Again the Source Object is kept local while processing the related Stream.
And as for the fixed-sized chunks also the Stream Object is kept while
processing the resulting output lines.

To find the pieces and count them method FindAt() scans the whole Stream
as a first action and builds a list of start points. It is used when the pieces
are collected into their groups by line.
The Streàm-Function used is ReadSQL(start, end). It is somewhat sensitive
and honors unprecise values with no result or ERROR. So besides locating all
pieces correctly composing precise and meaningful limits is the major challenge
for this part of the exercise.
It is all packaged in the method Piece() of the example code 

To enable multiple reentrances in the Fetch method all parameters are kept in
the common JSON object of the customized Query.

Here are some examples

  • Record #3 was deleted
  • Record#4 has no stream
  • PieceCnt shows the total pieces in the first row and number of pieces following
  • PieceId shows the number of the first Piece displayed

Some variations to the previous Tutorials:

  • the common variable qHandle that hat holds all requirements changed its name to qj to demonstrate independence from docu and for less typing.
  • the layout of the output in ROWSPEC is changed to also show the number of the starting piece, the total number of pieces in the first row, and the number of pieces in the following rows.

The first example shows objects 1..5 with max 33 chars
separated by || pieces 2..4  grouped by 2  with 3 previous characters

 

[SQL]USER>>call rcc.Q3(1,5,33,'||',2,4,2,3)
7.     call rcc.Q3(1,5,33,'||',2,4,2,3)

Dumping result #1
ID      City    Name    Age     pcCnt   PieceId PieceTxt
1       Bensonh Kovalev 16      52      2       ty.||Scope ||An AmAn LoIcA On
_       _       _       _       2       4        On||Iso
2       Queensb Yeats   15      52      2       00.||LoI||IesMorphSy
_       _       _       _       2       4       hSy||Re Uni
4       Newton  Evans   61      0       2
5       Hialeah Zemaiti 47      52      2       ks.||TwoToLy Wa||LoGraphIc Theti
_       _       _       _       2       4       eti||Ism LoToTri AticViaOpOp
 
7 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0064s/2159/18029/0ms
          execute time(s)/globals/lines/disk: 0.0060s/186/21480/0ms
                          cached query class: %sqlcq.USER.cls86
---------------------------------------------------------------------------

Next example:
All records from 5 to end, maximum 33 characters, separated with || pieces 50 ..55 and 1 by line

USER>>call rcc.Q3(5,,33,'||',50,55,1)
9.     call rcc.Q3(5,,33,'||',50,55,1)

Dumping result #1
ID      City    Name    Age     pcCnt   PieceId PieceTxt
5       Hialeah Zemaiti 47      52      50      ||LoOp Am TriAmGeo LookMuch ReAble
_       _       _       _       1       51      ||AnIAn I GeoIc Ly Copter A IcA
_       _       _       _       1       52      ||***Done***
6       Elmhurs Jenkins 29      52      50      ||Re PhotoTech Ies
_       _       _       _       1       51      ||A
_       _       _       _       1       52      ||***Done***
7       Islip   Drabek  61      52      50      ||Thetic Status Cycle AmAm To Tech
_       _       _       _       1       51      ||Ly SoundCo CoCo AmCo Am ToRePus
_       _       _       _       1       52      ||***Done***
8       Islip   Kovalev 88      52      50      ||IcGeoType PhysicalLyIsm Ies To T
_       _       _       _       1       51      ||ComI An GeoRange On AnOnTo Two P
_       _       _       _       1       52      ||***Done***
 
12 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0065s/2158/18091/0ms
          execute time(s)/globals/lines/disk: 0.0082s/245/28753/0ms
                          cached query class: %sqlcq.USER.cls103
---------------------------------------------------------------------------

Just a reminder:
All test data are generated using the System method %Populate
So your output will be different. I suggest you run our tests also with other parameters
than the shown examples to get the full power of this tool.

The full code example is again available on GitHub  

The Video is available now. See section Streams in Pieces 

For immediate access, you can use Demo Server WebTerminal  
and the related system Management Portal on Demo Server SMP

I hope you liked it so far and I can count on your votes.

1 Comment
Discussion (1)1
Log in or sign up to continue
Article
· Mar 2, 2023 5m read

Tutorial - Working with %Query #3

My previous article introduced you to the COS based Custom Class Query.
There were some features missing like more lines of the stream displayed
and numbered.

The basic idea is the same.
A new input parameter chunks is introduced that sets a limit of displayed
pieces of our stream.

/// pack all params into qHandle
/// called only once at start
ClassMethod Q2Execute(
	ByRef qHandle As %Binary,
	idfrom As %Integer = 1,
	idto As %Integer = 0,
	maxtxt As %Integer = 25,
	chunks As %Integer = 1) As %Status
{
  set qHandle={}
  set qHandle.id=0
  set qHandle.idfrom=idfrom
  set qHandle.idto=idto
  set qHandle.obj=0
  set qHandle.stream=0
  set qHandle.maxtxt=maxtxt
  set qHandle.chunks=chunks
  set qHandle.chcnt=1
  Quit $$$OK
}
  • I now have a limit and a counter of displayed chunks default is 1 chunk
  • the Stream Object is kept open in qHandle to avoid reload
  • once the stream is empty I jump to the next available object.

and it looks like that:
 

[SQL]USER>>call rcc.Q2(1,,,3)
11.     call rcc.Q2(1,,,3)

Dumping result #1
ID      City    Name    Age     chunk   Stream
1       Bensonh Kovalev 16      1       Building shareholder valu
_       _       _       _       2       e by delivering secure di
_       _       _       _       3       stributed devices and med
2       Queensb Yeats   15      1       Spearheading the next gen
_       _       _       _       2       eration of high-performan
_       _       _       _       3       ce genetic virtualized in
4       Newton  Evans   61      1
5       Hialeah Zemaiti 47      1       Resellers of premise-base
_       _       _       _       2       d secure XML services for
_       _       _       _       3        social networks.||TwoToL
6       Elmhurs Jenkins 29      1       Enabling individuals and
_       _       _       _       2       businesses to manage ente
_       _       _       _       3       rprise models for social
7       Islip   Drabek  61      1       Building shareholder valu
_       _       _       _       2       e by delivering open crow
_       _       _       _       3       d-sourced voice-enabled c
8       Islip   Kovalev 88      1       Experts in standards-base
_       _       _       _       2       d distributed voice-enabl
_       _       _       _       3       ed services for social ne
 
19 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0069s/2022/14949/0ms
          execute time(s)/globals/lines/disk: 0.0025s/48/5520/0ms
                          cached query class: %sqlcq.USER.cls82
---------------------------------------------------------------------------

for shorter streams it terminates when stream ends

[SQL]USER>>call rcc.Q2(,4,70,20)
22.     call rcc.Q2(,4,70,20)
 
Dumping result #1
ID      City    Name    Age     chunk   Stream
1       Bensonh Kovalev 16      1       Building shareholder value by delivering secure distributed devices an
_       _       _       _       2       d media for the Health Care community.||Scope ||An AmAn LoIcA On||Iso|
_       _       _       _       3       |PlasmA||Atic CoLoIO||IcOpIon An Lo||Re||Ies Tw||Lo Dyna I||Atic To Ly
_       _       _       _       4       ||Ecto O||AticL||Ism IAn Look||Plasm ||A||A Cop||Two IRe ||Two ||I||Dy
_       _       _       _       5       na Much LoN||Ion AmQuoAn Ec||OpOc||IcTwoCycl||A ComRe||I||GeoPedeLo ||
_       _       _       _       6       Pus EndoPyro||IesIsoIsmCom Te||A||Pyro||I On An I Tr||Syn AIcA||Gyro P
_       _       _       _       7       ho||AmCo UniTe||AScope ComQuo IH||Two A Ect||Graph ||A ||Pyro Heli AnR
_       _       _       _       8       eAn||Muc||Range IcTri||IonIsoIonAnC||A Wave Lo I||PusAt||To||Able ||Lo
_       _       _       _       9       Ati||A||Quo||Ly LyIc||***Done***
2       Queensb Yeats   15      1       Spearheading the next generation of high-performance genetic virtualiz
_       _       _       _       2       ed instruments for the Fortune 500.||LoI||IesMorphSy||Re Uni ||CoQuoEc
_       _       _       _       3       to||Tech IesOn ||Invent Vi||To LyIonGeoIc||Able||Ion Ect||Co I Ic Quo
_       _       _       _       4       U||AOn Much Ly To||Iso Much G||Am||LoIsmGraph Pus ||ReOp ViaComLo||OpI
_       _       _       _       5        TheticOn R||Ly OpCopter Mil||Quo Am Te||T||Plasm Type||On IsoIOpIcOp
_       _       _       _       6       P||I Dyna Tech Q||IGeo Dyna ||An AmLyCo Ion||Ic AnIsm Phot||IesAmI Am
_       _       _       _       7       OpA||KiloAnLo Am Co||Op ATr||TheticGraph||P||IcIc IOnTwoT||Ped||On On
_       _       _       _       8       QuoAnGrap||I||Copter LyQuo||ALookIcMuch Dyn||Abl||Re CoIcMuchCo A||ReO
_       _       _       _       9       nMuchAnToGr||TheticToTec||Ism Ies A||An AIAbleCo ||Q||LoI||Pus Ly ATri
_       _       _       _       10      On G||SoundU||To Heli Com||AOn||Ly Re||ComInventLoR||***Done***
4       Newton  Evans   61      1
20 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0065s/2020/15410/0ms
          execute time(s)/globals/lines/disk: 0.0021s/33/5048/0ms
                          cached query class: %sqlcq.USER.cls84
---------------------------------------------------------------------------
  • the next step is to honor the separators and display segments
  • and also allow groups of segments
  • As the basic functionality is there it's more a matter of chopping the streams 

Follow me on to the next chapter for the extension of this example that
will show and control more result lines.

Just a reminder:
All test data are generated using the System method %Populate
So your output will be different. I suggest you run our tests also with other parameters
than the shown examples to get the full power of this tool.

The full code example is again available on GitHub  

The Video is available now. See section Custom Class Query 

For immediate access, you can use Demo Server WebTerminal  
and the related system Management Portal on Demo Server SMP

I hope you liked it so far and I can count on your votes.

1 Comment
Discussion (1)1
Log in or sign up to continue