New post

Find

Question
· 16 hr ago

JSON Response Help - Extracting Data into Data Class or Iteration to Extract Data

I have always struggled with Iterating through a JSON response to pull out certain fields into a Data Class Structure to use to populate fields in a DTL. So I defined the whole structure for the following JSON, with the base structure extending Ens.Response, %XML.Adaptor, and %JSON.Adaptor.

{
    "status": {
        "message": "success",
        "code": 200
    },
    "data": {
        "client": "xxxxxxxxxxxxxxxxxxxxxxxx",
        "entities": [
            {
                "id": "xxxxxxxxxxxxxxxxxx`",
                "name": "xxxxxxxxxxxxxxxxx",
                "totalCommentCount": 272,
                "totalRatingCount": 396,
                "totalSurveyCount": 396,
                "overallRating": {
                    "name": "Overall Satisfaction",
                    "value": 4.9,
                    "categoryResponseCount": 396,
                    "questionRatings": [
                        {
                            "name": "Provider listen carefully to you",
                            "value": 5.0,
                            "responseCount": 395
                        },
                        {
                            "name": "Provider expl in way you understand",
                            "value": 5.0,
                            "responseCount": 396
                        },
                        {
                            "name": "Talk with provider re prob/concern",
                            "value": 4.5,
                            "responseCount": 394
                        },
                        {
                            "name": "Know important info medical history",
                            "value": 4.9,
                            "responseCount": 393
                        },
                        {
                            "name": "Give easy to understand instruction",
                            "value": 4.9,
                            "responseCount": 347
                        },
                        {
                            "name": "Spend enough time with you",
                            "value": 4.9,
                            "responseCount": 395
                        },
                        {
                            "name": "Show respect for what you say",
                            "value": 5.0,
                            "responseCount": 395
                        }
                    ]
                },
                "comments": [],
                "PGSealOfIntegrity": {
                    "dataIntegrity": {
                        "horizontal": {
                            "darkBackground": {
                                "png": "xxxxxx"
                            },
                            "lightBackground": {
                                "jpg": "xxxxxxxxxxxxxxxxx",
                                "png": "xxxxxxxxxxxxxxxx"
                            },
                            "darkBackgroundHighResolution": {
                                "png": "xxxxxxxxxxxxxx"
                            }
                        },
                        "stacked": {
                            "darkBackground": {
                                "png": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"x
                            },
                            "lightBackground": {
                                "jpg": "xxxxxxxxxxxxxxxxx",
                                "png": "XXXXXXXXXXXXXXX"
                            }
                        }
                    },
                    "sealOfIntegrity": {
                        "darkBackground": {
                            "jpg": "XXXXXXXXXXXXXXXXXXXXXXXX",
                            "png": "XXXXXXXXXXXXXXXXXXXXXXXX"
                        },
                        "lightBackground": {
                            "jpg": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
                            "png": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
                        }
                    }
                },
                "totalPages": 14,
                "ratings": []
            }
        ],
        "filter": {
            "minThreshold": 0.0,
            "minRatingCount": 30,
            "minSurveyCount": 0,
            "minWordCount": 0,
            "days": 365,
            "page": 1,
            "perPage": 20,
            "showComments": false,
            "showRatings": true,
            "configVersion": "v2",
            "period": {
                "to": "2026-02-05T23:59:59Z",
                "from": "2025-02-05T00:00:00Z"
            }
        }
    }
}

The rest of the structure that is referenced by the base Response.cls structure extends %RegisteredObject, %JSON.Adaptor.

I am able to make the REST call, and the Response is populating into the Response.cls, however within the Trace Viewer the Response is blank. I know the data is there because when I send it to a DTL, I can pull the data elements out.

How do I make the Response show up within the Trace Viewer, or how would I go about extracting the values in RED below

                "id": "xxxxxx",

                "name": "xxxxxx",

                "totalCommentCount": 272,

                "totalRatingCount": 396,

                "totalSurveyCount": 396,

                "overallRating": {

                    "name": "Overall Satisfaction",

                    "value": 4.9,

4 new Comments
Discussion (4)3
Log in or sign up to continue
Question
· 16 hr ago

Splitting stream into HL7 messages

Hi,

I want to consume an API that provides HL7 messages. To achieve this, I have thought of the following workflow:

I have created a business service that periodically triggers a business process. The trigger request is forwarded to a business operation. There, a %Net.HttpRequest is assembled from scratch and then sent to the API endpoint. The corresponding HttpResponse then contains several HL7 messages encoded in UTF-8 in the message body. To further process the HL7 messages, the operation sends the HttpResponse back to the business process as EnsLib.HTTP.GenericMessage.

The raw data looks like this:

MSH|^~\&|Doctolib||Doctolib||20251028154100||SIU^S12|d50f01e649cda79faf29|P|2.5.1|||||FRA|UTF-8
SCH||20771389^Doctolib||||Vor.Tagesk^Vorgespräch für Tagesklinik|||||^^15^202511101000|||||117134^Mustermann^Stefan||||Doctolib|||||Booked
NTE|||Hier der Inhalt des Notizfeldes.  Achten Sie auf Umlaute: ä ö ü   (UTF-8)
PID|||56834111^^^Doctolib^PI||Testfrau^Liselotte^^^^^L||19690722|F|||||+4917612345678^^^liselotte@test.de~+4940123456
RGS|1
AIG|1|||Vorg-Tagesklinik^Vorgespräche Tagesklinik
MSH|^~\&|Doctolib||Doctolib||20251028154114||SIU^S13|39e482e10fa61ccd4500|P|2.5.1|||||FRA|UTF-8
SCH||20771389^Doctolib||||Vor.Tagesk^Vorgespräch für Tagesklinik|||||^^15^202511141600|||||117134^Mustermann^Stefan||||Doctolib|||||Booked
NTE|||Hier der Inhalt des Notizfeldes.  Achten Sie auf Umlaute: ä ö ü   (UTF-8)
PID|||56834111^^^Doctolib^PI||Testfrau^Liselotte^^^^^L||19690722|F|||||+4917612345678^^^liselotte@test.de~+4940123456
RGS|1
AIG|1|||Vorg-Tagesklinik^Vorgespräche Tagesklinik
MSH|^~\&|Doctolib||Doctolib||20251028154225||SIU^S17|1e5726345c7b4257b41f|P|2.5.1|||||FRA|UTF-8
SCH||20771388^Doctolib||||Vor.Tagesk^Vorgespräch für Tagesklinik|||||^^15^202511121600|||||117134^Mustermann^Stefan||||Doctolib|||||Deleted
NTE|||Hier der Inhalt des Notizfeldes
PID|||56834102^^^Doctolib^PI||Testmann^Heinrich^^^^^L||19881211|M|||||+4917612345678^^^heinrich@test.de~+4940123456
RGS|1
AIG|1|||Vorg-Tagesklinik^Vorgespräche Tagesklinik

 

The next step would be to split the message body into individual HL7 messages and then forward them accordingly. But splitting them up is causing me problems. In the message viewer, the stream is still displayed with line breaks. First, I tried to read the stream line by line and then save the individual streams in a collection (%ListOfObjects). However, the line breaks seem to get lost in the process.

Then I tried to save it in a collection of strings using the string “MSH|” (the start of the message) to split the stream. That worked, but unfortunately there were problems when converting the string to an EnsLib.HL7.Message because the framing did not fit.

How would you go about turning a stream with multiple HL7 messages into individual HL7 messages?

Regards

Robert

2 new Comments
Discussion (2)3
Log in or sign up to continue
Job
· 18 hr ago

Intersystems Cache & Iris Developer - Object Script. Remote (UK company)

Developer required to join a team working with and extending an existing CACHE application and subsequent migration to IRIS.

4yrs Minimum experience.

Applicants must have good general knowledge of development approaches and patterns.

SQL 

Opportunity from 6 Month contract to Permanent, depending on experience. Immediate start

Applications to chris.clipston@mtivity.com

Discussion (0)1
Log in or sign up to continue
Announcement
· 22 hr ago

[Vídeo] Eliminando el miedo a FHIR: acelerando la preparación de la organización para FHIR

¡Hola comunidad!

Nos alegra compartir un nuevo vídeo de nuestro YouTube de InterSystems Developers:

Eliminando el miedo a FHIR: acelerando la preparación de la organización para FHIR @ Ready 2025

Los evangelistas de FHIR llevan más de una década promocionando el estándar, pero ¿qué se necesita para convertir la expectativa en realidad? Esta sesión explora los casos de uso específicos y las necesidades de diferentes organizaciones, destacando factores clave de éxito y lecciones aprendidas. Descubre cómo la formación basada en casos de uso puede ayudarte a aprovechar eficazmente las funcionalidades de FHIR en InterSystems IRIS for Health y HealthShare Unified Care Record.

🗣Ponente: @Chi Nguyen-Rettig, LEAD North

¿Te interesa conocer las mejores prácticas? ¡Mira el vídeo y suscríbete para ver más!

Discussion (0)1
Log in or sign up to continue
Announcement
· Feb 5

即将推出的 InterSystems CCR EHR 应用专家认证考试需招募 Beta 测试员

各位 InterSystems EHR 社区成员,大家好,

InterSystems 认证部目前正在开发针对 CCR Tier 2 用户的认证考试。如果您符合下方的考生描述,我们需要您来参与考试的 Beta 测试!该考试将于 2026年1月27日 开始进行 Beta 测试。

Beta 测试将于 2026年3月28日 结束。

作为 Beta 测试员,我的职责是什么?

作为 Beta 测试员,我们需要您在 2026年3月28日 之前安排并参加考试。考试将在免费的在线监考环境中进行(所有 Beta 测试员均免除每门考试 150 美元的标准费用)。

随后,InterSystems 认证团队将对所有 Beta 测试数据进行仔细的统计分析,以设定考试的通过分数。Beta 测试结果的分析通常需要 6-8 周的时间。一旦确定通过分数,您将收到来自 InterSystems 认证部的电子邮件通知,告知您结果。如果您的考试分数达到或超过通过分数,您将获得该认证!

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