查找

お知らせ
· 2025年11月21日

[Video] Optimizing Parallel Aggregation Using Shared Globals

Hey Community!

We're happy to share a new video from our InterSystems Developers YouTube:

⏯  Optimizing Parallel Aggregation Using Shared Globals @ Ready 2025

This presentation explains an optimization to parallel aggregation in SQL queries using shared globals. Previously, worker processes computed intermediate results separately and sent them to a parent process for serial aggregation, creating delays. The new approach lets all workers write directly and in parallel to a shared global, eliminating the parent bottleneck.

This greatly reduces wait time, especially for queries with many groups. Testing on 20 million rows showed up to a 38% performance improvement, while also simplifying query execution and reducing code complexity.

🗣 Presenter: Elie Eshoa, Systems Developer, InterSystems

Enjoy watching, and subscribe for more videos! 👍

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2025年11月21日 1m read

Production Terminal Commands

Terminal Commands for Production:

  • Production Start, Stop, Update, Recover and Clean Production

Do ##class(Ens.Director).StartProduction(“ProductionName”)

Do ##class(Ens.Director).StopProduction()

Do ##class(Ens.Director).UpdateProduction()

Do ##class(Ens.Director).RecoverProduction()

Do ##class(Ens.Director).CleanProduction()

Abort Messages in the queue:

               d ##class(Ens.Queue).AbortQueue(“Component Name”)

Get InstanceName :

              W !,##class(%SYS.System).GetUniqueInstanceName()

Get Node Name:

              W  !,##class(%SYS.System).GetNodeName()

Terminate JobId :

   d $SYSTEM.Process.Terminate(jobid)

 Enable Namespace:

     do ##class(%EnsembleMgr).EnableNamespace($namespace)

Enable ConfigItem:

     Do ##class(Ens.Director).EnableConfigItem("ConfigNameHere", 0, 1)

Get GUID:

     write $System.Util.CreateGUID()

Get CPU Info:

    d $system.CPU.Dump()

Get Number of CPUs: Returns the number of virtual CPUs (also known as logical CPUs or threads) on the system.

   W $SYSTEM.Util.NumberOfCPUs()

Get Free Space: Display all the namespaces database free spaces

do ALL^%FREECNT

Thanks,

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2025年11月21日 3m read

My experience with APIs and POS integration.

Hola amigo! 😊 Cómo estás hoy,

I would like to share a small part of my learnings from my first ever official project: POS/EDC machine integration with our billing system. This was an exciting challenge where I got hands-on experience working with APIs and vendors. 

How does a Payment Machine actually work?

It's simple, start by initiating/creating a transaction, then retrieve its payment status.

Here, initiate/create refers to POST method and Retrieve refers to GET.

Workflow... 

Let us assume that the vendor has given us a document with both these APIs (Create and Fetch Payment Status). Samples listed below -
 

CREATE TRANSACTION:

url/endpoint: https://payvendor.com/create-transaction
method: POST
payload: 
{
    "reference_id": "2345678",
    "pos_id": "PISC98765",
    "date_time": "MMDDYYYYHHMMSS"
    "amount": 100
}
response: [200]
{
    "reference_id": "2345678",
    "pos_id": "PISC98765",
    "date_time": "MMDDYYYYHHMMSS"
    "unn": "456789876546787656"
}

FETCH PAYMENT STATUS:

url/endpoint: https://payvendor.com/get-status
method: GET
payload: ?reference_id="2345678"
response: [200]
{
    "reference_id": "2345678",
    "pos_id": "PISC98765",
    "date_time": "MMDDYYYYHHMMSS"
    "unn": "456789876546787656"
    "status": "paid"
    "amount": 100
}

 

How do we use these APIs? Let's find out... 🫡

To consume these APIs in cache objectscript, we have a module or a class to make HTTP requests from within. %Net.HttpRequest.

Basic:

  • Create an instance of %Net.HttpRequest.
  • Set the url and the HTTP method.
  • Add the header and the body. [if needed]
  • Send the request to the server.
  • Handle the response.
; --------- POST REQUEST EXAMPLE ---------
Set req = ##class(%Net.HttpRequest).%New()  ; creates an instance of this class
Set req.Server = "https://payvendor.com"    ; the server
Set req.Location = "/create-transaction"    ; the endpoint
Set req.Https = 1       ; 0 if http / 1 if https
Set req.ContentType = "application/json"    ; ContentType
; ---- create the JSON body ----
Set obj = ##class(%DynamicObject).%New()
Set obj."reference_id" = "2345678"      ; unique
Set obj."pos_id" = "PISC98765"          ; device number
Set obj."date_time" = $ZSTRIP($ZDATETIME($HOROLOG,8), "*P") 
Set obj."amount" = 100
; -------------------------------
; ---- send request ----
Do req.EntityBody.Write(obj.%ToJSON())
Do req.Post()           ; .Post() will trigger the call
; ----------------------
; ---- Response ----
Write req.HttpResponse.StatusCode,!     ; HTTP STATUS CODE
Write req.HttpResponse.Data.Read(),!    ; HTTP STATUS MESSAGE
; ------------------

After creating the transaction, we can maintain a table (preferred) or a global to maintain logs against each transaction. 

; --------- GET REQUEST EXAMPLE ---------
Set req = ##class(%Net.HttpRequest).%New()  ; creates an instance of this class
Set req.Server = "https://payvendor.com"    ; the server
Set req.Location = "/get-status"    ; the endpoint
Set req.Https = 1       ; 0 if http / 1 if https
; ---- Query Parameters ----
Do req.SetParam("reference_id", "2345678")

; ---- send request ----
Do req.Get()           ; .Get() will trigger the call
; ---- Response ----
Set stsCode = req.HttpResponse.StatusCode,!     ; HTTP STATUS CODE
If stsCode=200 {
    Set objResponse = req.HttpResponse.Data.Read()
    Set objData = ##class(%DynamicObject).%FromJSON(objResponse)
    Set payStatus = objData.status              ; payment status
}
; ------------------

This is how we fetch the payment status. After we fetch the status, we can update the same in the billing system and our logs too.

 

This workflow is simple, but as we code more, we can evolve better frameworks and approaches. Over my experience, I’ve successfully integrated 5 POS vendors and 3 payment gateways with our billing system. If you have any questions or need guidance, feel free to reach out!

Also open for feedback. :)

 

Thanks...

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年11月21日

RecordMap Data Validation

I am trying to add some validation to an existing Record Map, because recently we had some wrong data get consumed into the System and is causing all kinds of havoc.

Using the AI on the Developer community it suggested that I use PATTERN within the Datatype Parameters to force some validation on some fields. I have never used PATTERN before...

When I go to generate the updated Record Map, I am getting the following...

By the screenshots is my logic not correct?

4 Comments
ディスカッション (4)4
続けるにはログインするか新規登録を行ってください
記事
· 2025年11月21日 23m read

Personnalisation et façade du serveur FHIR d'InterSystems

Serveur FHIR

Le Serveur FHIR est une application logicielle qui met en œuvre la norme FHIR (Fast Healthcare Interoperability Resources), ce qui permet aux systèmes de soins de santé de Stocker, accéder, échanger, et gérer les données de soins de santé de manière standardisée.

InterSystems IRIS permet de stocker et de récupérer les ressources FHIR suivantes:

  • Référentiel de ressources – Le serveur natif IRIS FHIR permet de stocker facilement les paquets/ressources FHIR directement dans le référentiel FHIR.
  • Façade FHIR – La couche de façade FHIR est un modèle d'architecture logicielle à l'aide duquel une API compatible FHIR peut être exposée au-dessus d'une API existante (souvent non-FHIR). Cette couche permet également de rationaliser le système de données de soins de santé, y compris les dossiers médicaux électroniques (DME), les bases de données existantes ou le stockage de messages HL7 v2, sans nécessiter la migration de toutes les données vers un système natif FHIR.

Qu'est-ce que FHIR?

FHIR (Fast Healthcare Interoperability Resources) est un framework standard créé par HL7 International afin de faciliter l'échange de données de soins de santé de manière flexible, conviviale pour les développeurs et moderne. Il exploite les technologies web contemporaines pour assurer une intégration et une communication transparentes entre plusieurs systèmes de soins de santé.

ディスカッション (0)2
続けるにはログインするか新規登録を行ってください