Article Guillaume Rongier · Sep 27, 2022 2m read


 

You may know it but IRIS is a database with the ability to execute code.

The code execution part is called an Application Server.

Today IRIS supports natively two languages: ObjectScript and Python.
Executing code is good, knowing how to organize it is better.


Organizing code is software architecture, not everyone has the desire or knowledge to create such a solution.
To do this, many programming languages offer what we call Frameworks.
These frameworks help us (the developers) to architect our code, to organize it, to foresee scalability, to foresee the dissociation between technical logic and

0
0 310
Question Guillaume Rongier · Sep 23, 2022

Hello,

I'm looking for a way to write a stored procedure or something to return a ResultSet with Embedded Python.

My goal is the following:

I have a Goal table with a Text field that is free text.

CREATETable Goal (
    Idint,
    TextVARCHAR(5000)
);


I would like to create a procedure that returns all the entities (in the iKnow sense) in a new Entity column.

Python code, i would like to use :

import iknowpy

engine = iknowpy.iKnowEngine()

# Row to parse
text = 'This is a test of the Python interface to the iKnow engine. another sentence to test this program with.'
engine.index(text, 'en
5
0 472
Announcement Guillaume Rongier · Mar 16, 2022

Iris Healthtoolkit Service

Video

Easy to use HL7v2 to FHIR, CDA to FHIR, FHIR to HL7v2 as a Service.

The aim of this project is to provide an REST API that can convert easily various health formats. Post the desire format in the REST body, get the answer in the new format.

Install

Clone this repository

git clone https://github.com/grongierisc/iris-healthtoolkit-service.git

Docker

docker-compose up --build -d

Usage

9
1 1585
Article Guillaume Rongier · Dec 14, 2021 10m read

Iris-python-template

Template project with various Python code to be used with InterSystems IRIS Community Edition with container.

Featuring :

  • Notebooks
    • Embedded Python Kernel
    • ObjectScript Kernel
    • Vanilla Python Kernel
  • Embedded Python
    • Code example
    • Flask demo
  • IRIS Python Native APIs
    • Code example

Diagram

2. Table of Contents

4
4 1547
Announcement Guillaume Rongier · Oct 20, 2021

Interoperability Read Only access

In companies, most of the time, we have test, stage and production environments.

It is very common that we, the developers, do not have the right to modify or touch the production directly because all the modifications must be traced in a versioning tool and tested before a production release.

However, a read access to the production (especially to the traces) can allow us to better understand a possible bug.

That's why I propose this ZPM module that creates a new role in IRIS that allows access to the productions and this only in read-only with access to the visual traces.

Oct-21-2021 16-52-18

0
0 410
Announcement Guillaume Rongier · Oct 8, 2021

A simple python script to copy/scrap/crawl a FHIR repository to another one.

The script is written in Python 3.

Install it from pip

python -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/grongierisc/fhir-scraper
cp .venv/bin/fhir-scraper.py .

Edit fhir-scraper.py for your needs.

Run it :

python fhir-scraper.py 

How to run it from git

First clone this repository.

git clone https://github.com/grongierisc/fhir-scraper

You can install it quickly into a Virtual Environment.

0
0 274
Announcement Guillaume Rongier · Sep 1, 2021

All French-speaking developers are friendly invited to follow a stream in the form of a journal.

Every first Thursday of the month at 12:00 (Paris time), we organize a 30-45 minutes stream on Youtube with the following format :

  • News on technologies around InterSystems.
  • A section called "Did you know it?" (tips and tricks on IRIS)
  • A "dossier", where we develop a subject (example: How language gateway works).
  • And we end the program with an Interview of an french developer

Previous episodes  :

0
0 253
Question Guillaume Rongier · Dec 2, 2020

Hi everyone,

I need to call a SOAP service using IRIS Interoperability and this SOAP service returns a Microsoft DataSet with a DiffGrams payload.

Do you know how to handle this kind of Objects ?

SOAP Payload Response :

<?xml version="1.0" ?>
<GetPatientsByClinicResponse>
    <GetPatientsByClinicResult>
        <xs:schema id="NewDataSet">
            <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Patients" msdata:UseCurrentLocale="true">
                <xs:complexType>
                    <xs:choice minOccurs="0" maxOccurs="unbounded">
3
0 613
Article Guillaume Rongier · Nov 23, 2020 1m read

Introduction

This is iris-key-uploader a frontend in Angular with it's rest API.

The aim of this project is to easily import key file to Iris from a web ui.

Why this project

Unfortunatly the IRIS panel to change key doesn't give the opportunity to upload the license.

Panel

As you can see, you can only browse from the server side.

What if, you don't have a direct access to it ?

You would like to have a simple web page to upload the new key and activate it.

This is the purpose of this project.

Demo

Demo

UI

http://localhost:52773/keyuploader/index.html

Build

Run the server

docker-compose up -d

Install with ZPM

zpm
6
0 585
Article Guillaume Rongier · Oct 23, 2020 5m read

The aim of my question is to achieve this :

  • User with authorization :

SuperUser

  • User without authorization :

main

You can notice that some information of the PID segment are obfuscated.

I do have a solution but it involve a modification of EnsLib.HL7.Message. It's not a best practice.

Do you have idea or a simple solution that doesn't involve overloading every HL7 classes ?

Here is my solution :

https://github.com/grongierisc/hl7-msg-anonymizer

HL7-Msg-Anonymizer

This is a modification of EnsLib.HL7.Message to not display Patient demography information in visual trace.

This feature is toggle by a resource named

1
0 837
Announcement Guillaume Rongier · Oct 2, 2020

Introduction

This is a csvgen UI frontend in Angular 8. The aim of this project is to easily import csv file to Iris from a web ui.

Demo

Demo

Install with ZPM

It will automatically install the dependency of csvgen and sslclient

zpm "install csvgen-ui"

This will create two new endpoints :

  • One for the Rest API for uploading files

  • /api/{namespace}/csvgen/

  • One for the UI

  • /csp/{namespace}/csvgen/index.html

Stand alone demo on docker

Run the server

docker-compose up -d

UI

The UI is per-namespcae, this mean it will be available only for the namespace where csvgen-ui is install. For example :

http://localho
2
0 475
Announcement Guillaume Rongier · Aug 12, 2020

Hello,

Recently I tried to connect to JDBC on IRIS 2020.3+ and I came across the following error:

 SQL Error [461] [08S01]: [InterSystems IRIS JDBC] Communication link failure: Communication error: Server closed communication device

This error implies that the port is not open.

Checking with the netstat command:

irisowner@78c3e30b7f41:/opt/irisapp$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State     
tcp 0 0 0 0.0.0.0:1972 0.0.0.0:* LISTEN    
tcp 0 0 127.0.0.11:38005 0.0.0.0.0:* LISTEN    
tcp 0 0 0.0.0.0:52773 0.0.0:*
1
0 1151
Announcement Guillaume Rongier · May 5, 2020

objectscript-json-patch

alt text

An implementation of JSON-Patch in ObjectScript.

Why you should use JSON-Patch

JSON-Patch (RFC6902) is a standard format that allows you to update a JSON document by sending the changes rather than the whole document. JSON Patch plays well with the HTTP PATCH verb (method) and REST style programming.

Install

With zpm :

USER>zpm
zpm:USER>install objectscript-json-patch

How-To use it

Use it with this call :

Do ##class(Grongier.JSON.Utils).Patch(tDoc,tPatch)

Where :

  • tDoc is a %DynamicObject (JSON)
  • tPatch is a %DynamicArray of the patches (the JSON Patch).

The result will be tDoc p

2
1 487
Article Guillaume Rongier · Apr 17, 2020 2m read

FHIR-HL7v2-SQL-Demo

Ready to use demo of an FHIR Server with IRIS for Health 2020.2 :

  • HL7v2 transformation to the FHIR Server
  • FHIR Server who can be query in SQL

alt text

Installing

Clone this repository

git clone https://github.com/grongierisc/FHIR-HL7v2-SQL-Demo.git

Docker

docker-compose up --build -d

Usage

  • Can use postman config in misc/fhirhl7v2demo.postman_collection.json

  • Use UX at http://localhost:4201

  • Login/Password : SuperUser/password

How-To use the demo

alt text

3 steps to use it :

Import HL7v2 Messages

Click on the left arrow between IRIS and the ambulance.

This windows open :

alt text

From here you can import

0
1 981
Announcement Guillaume Rongier · Apr 6, 2020

InterSystems offers an API-design first approach.

You can check this post for more informations : https://community.intersystems.com/post/iris-api-explorer-application.

One practical thing about this approch and the OpenAPI specification is the definition of exchange objects.

The do ^%REST command does not create object definitions, but only routes and associated methods.

Output for the do ^%REST command for PetShop example :

USER>do ^%REST

REST Command Line Interface (CLI) helps you CREATE or DELETE a REST application.
Enter an application name or (L)ist all REST applications (L): PetShop
REST

2
5 1049
Article Guillaume Rongier · Jul 4, 2019 1m read

Has you may know, EnsDemo from Ensemble are not available anymore on IRIS.

This is a good thing, Iris is cloud oriented, it must be light, fast. Now the new way of sharing samples or modules is through git, continuous integration and OpenExchange.

But, in some cases you want to go back to your good old samples from EnsDemo to get inspiration or best practices.

Good news, there is a git for that :

How to use it ?

Clone this repository

git clone https://github.com/grongierisc/InstallEnsDemoLite.git

And run install.sh

sh install.sh <IRIS Instance>
1
3 1285
Question Guillaume Rongier · Jun 17, 2019

Hi,

I try to implement an iFind index.

Here is my definition class :

ClassAviation.TestSQLSrchExtends%Persistent [ DdlAllowed, Owner = {UnknownUser}, SqlRowIdPrivate, SqlTableName = TestSQLSrch ]
{

 

PropertyUniqueNumAs%Integer;

 

PropertyCrashDateAs%TimeStamp [ SqlColumnNumber = 2 ];

 

PropertyNarrativeAs%String(MAXLEN = 100000) [ SqlColumnNumber = 3 ];

 

IndexNarrSemanticIdx On (Narrative) As %iFind.Index.Basic;

 

IndexUniqueNumIdxOnUniqueNum [ Type = index, Unique ];

 

}

The problem start when I add an Relationship in my indexed class, I end up with this error :

ERROR #5585: Unable to
1
0 600
Article Guillaume Rongier · Apr 9, 2019 3m read

IRIS and Ensemble are designed to act as an ESB/EAI. This mean they are build to process lots of small messages.

But some times, in real life we have to use them as ETL. The down side is not that they can't do so, but it can take a long time to process millions of row at once.

To improve performance, I have created a new SQLOutboundAdaptor who only works with JDBC.

BatchSqlOutboundAdapter

Extend EnsLib.SQL.OutboundAdapter to add batch batch and fetch support on JDBC connection.

Benchmark

Benchmarks released on Postgres 11.2 with 1 000 000 rows fetched and 100 000 rows inserted on 2 columns.

alt text

Prerequis

10
3 1923
Question Guillaume Rongier · Jan 21, 2019

Hi, I'm looking for a way to implement the JDBC pattern "executeBatch" in ObjectScript: https://www.tutorialspoint.com/jdbc/jdbc-batch-processing.htm

Since Ensemble 2017.2.2 there is a new method called executeParametersBatch : https://docs.intersystems.com/ens20172/csp/docbook/relnotes/index.html#…

Even in the Ensemble 2018.1 change log, mention a patch on this method: https://docs.intersystems.com/ens20181/csp/docbook/relnotes/index.html#…

Do you have any examples or tracks to use the executeParametersBatch method of %Net.Remote.Java.JDBCGateway?
Otherwise have you

4
0 867
Question Guillaume Rongier · Sep 20, 2018

Hi, We recover a large amount of data from an external database (SQLServer, about 1 million rows in JDBC).
However, we have treatment time issue.
This process takes more than 30 minutes whereas on a "classic" SQL Server Management Studio type request takes less than a minute.

While searching on the internet, I came across this article: http://makejavafaster.blogspot.com/2015/06/jdbc-fetch-size-performance.html
It explains how in Java, we can tweak the FetchSize parameter of the JDBC driver to optimize this kind of process.

Is there a way to access this JDBC parameter through the EnsLib.SQL.Outbound

7
1 1589