Nueva publicación

Encontrar

Pregunta
· 6 mayo, 2025

Converting an HL7 message input into a JSON string in a txt file

Hi everyone,

I’m new to this community and could really use some help with creating a production in InterSystems IRIS for Health Community 2024.3. I have deployed my instance using Docker.
Here’s what I’m trying to do:

  1. Input: I have an HL7 file that is processed by the standard EnsLib.HL7.Service.FileService.
  2. DTL Transformation: I’ve created a DTL to transform the HL7 content into a custom class like this:
Class Demo.MyApp.Messages.JSONEvent5 Extends (%Persistent, %JSON.Adaptor)
{
Property rawpatientid As %String;
Property rawpatientfamilyname As %String;
Property rawpatientgivenname As %String;
Property rawpatientbirthdate As %String;
Property rawpatientgender As %String;
Property rawlocalisation As %String;
Property rawencounternumber As %String;
Property rawpractitionnerid As %String;
Property rawsiteid As %String;
}

This setup allows me to create my DTL with Demo.MyApp.Messages.JSONEvent5 as the target class.

However, I’m stuck after this step. I need to take the result of the DTL transformation and export it into a .txt file using a Business Operation, which will export the file in a specified folder.

I've read a lot about the JSON Adaptor, but I’m having trouble applying it in my case. I tried to create a custom Business Process that applies the DTL and then converts the result to a string using %JSONExportToString, but it’s not working as expected.

Could anyone share an example or guide me on how to properly set up this production ? I’d really appreciate any insights or recommendations.

Feel free to ask if you need more details.

Kind regards,

5 comentarios
Comentarios (5)2
Inicie sesión o regístrese para continuar
Artículo
· 6 mayo, 2025 Lectura de 3 min

How to remove special characters (Unicode Characters) from text

It helps to remove special characters, such as non-utf-8 characters either control characters or unicode characters from text that is not printable or can't be parsed by downstream systems.

There is also $C(32) in this condition; sometimes NBSP appears in the text and it will not be recognized by TIE, but downstream it displays as "?".

In order to avoid the NBSP issue, the if condition is replaced with a space in order to prevent the error.

Unicode characters only Remove:

Class Test.Utility.FunctionSet Extends %RegisteredObject
{ 
ClassMethod ConvertTextToAscii(text As %String) As %String
{
 Set (str,char) = ""

 FOR i=1:1:$LENGTH(text)
 {
      Set char = $E(text, i)
      Set ascii = $ASCII(char)
      
      IF ascii'<33,ascii>126 {       
          ///ascii 32 included to avoid NBSP
      "Removing"_" ASCII code of "_ascii_" character is: "_char,!
      Set char = " "
      }
      Set str = str_char
    }
    Set str = $Replace(str," ","")
      
 QUIT str
}

}

Output:

W ##class(Test.Utility.FunctionSet).ConvertTextToAscii( "This”text is€example for × special € unicode — characters.•!!£;: with in the text? @downstream systems <removing (-)them> from {+adding some $%^'#utf-8'-_¦¬test@hotmail.com!"),!
Removing ASCII code of 8221 character is: ”
Removing ASCII code of 8364 character is: €
Removing ASCII code of 160 character is:  
Removing ASCII code of 215 character is: ×
Removing ASCII code of 8364 character is: €
Removing ASCII code of 8212 character is: —
Removing ASCII code of 8226 character is: •
Removing ASCII code of 163 character is: £
Removing ASCII code of 166 character is: ¦
Removing ASCII code of 172 character is: ¬
This text is example for special unicode characters. !! ;: with in the text? @downstream systems <removing (-)them> from {+adding some $%^'#utf-8'-_test@hotmail.com!

 

Including Control characters as well as Unicode characters to strip from Text:

ClassMethod ConvertTextToAscii(text As %String = "Testing unicode”charactersand€control characters×removing unicode—andcharacters.•and!£;:?$%^'#utf-8'-_¦¬test@hotmail.com!") As %String
{
Set (str,char) = "" FOR i=1:1:$LENGTH(text)
    {
      Set char = $E(text, i)
      Set ascii = $ASCII(char)
      //W "Ascii of char "_char_" is"_ascii,!
      IF ascii<33!(ascii>126) {       
          ///ascii 32 included to avoid NBSP
      "Removing"_" ASCII code of "_ascii_" character is: "_char,!
      Set char = " "
      }
      Set str = str_char
    }
    Set str = $Replace(str," ","")
      
 QUIT str
}


 

4 comentarios
Comentarios (4)3
Inicie sesión o regístrese para continuar
Artículo
· 6 mayo, 2025 Lectura de 13 min

Plateforme de données InterSystems IRIS : Аrchitecture

La plateforme de données InterSystems IRIS est à la base de toutes les applications InterSystems, ainsi que de milliers d'applications utilisées par nos clients et partenaires dans des domaines tels que la Santé, les Services financiers, la Chaîne logistique et d'autres écosystèmes. Il s'agit d'une plateforme convergente qui fournit une gestion des données transactionnelles et analytiques, une interopérabilité intégrée, une intégration des données, ainsi que des analyses intégrées et une IA. Elle prend en charge l'approche InterSystems Smart Data Fabric pour la gestion de données diverses et distribuées.

 

Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 5 mayo, 2025

InterSystems HL7 Interface Specialist certificate test

Hi group,

I am trying to take the InterSystems HL7 Interface Specialist certificate test. 

So is this an open book test? is there any Lab involved with vm?  I did the search but I am not able to find such information.

I am trying to find out more information before I actually take the test.

 

Thank you

7 comentarios
Comentarios (7)2
Inicie sesión o regístrese para continuar
Anuncio
· 5 mayo, 2025

[Video] Prompt the frontend UI for InterSystems IRIS with Lovable

Hi Community!

Check out the new video on how to build the frontend UI by prompting it in lovable or (potentially) any spec first REST API in InterSystems IRIS:

📺  Prompt the frontend UI for InterSystems IRIS with Lovable

🗣 Presenter: @Evgeny Shvarov, Senior Manager of Developer and Startup Programs, InterSystems

Share your thoughts or questions in the comments to this post. Enjoy!   

3 comentarios
Comentarios (3)2
Inicie sesión o regístrese para continuar