8 Followers · 234 Posts

Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

Learn more.

Question Colin Brough · Dec 10, 2024

We are building a data transformation from HL7 to custom XML. We've got an XML schema, and are using virtual documents (EnsLib.EDI.XML.Document).

We can:

  • build our transform as a single transform
  • build our transform using subtransforms where the source data for the subtransform is all in a single HL7 segment and all the output data goes into a single (complex) element of the XML, so the input type on the subtransform is the segment from the HL7 schema and the output type on the subtransform is the relevant element picked out of the XML schema:
  • but we can't (so far!) build a subtransfor


2
0 151
Question Lee Butcher · Nov 28, 2024

I'm trying to project a series of objects and nested objects to XML, and I'm having difficulties getting the XML representation exactly the way I need it to be. Here's what I'm working with, nothing complicated:

Class XMLTest Extends (%RegisteredObject, %XML.Adaptor)
{
    Property Id As Id;
}

Class Id Extends (%RegisteredObject, %XML.Adaptor)
{
    Property Value As%String (XMLPROJECTION = "attribute");
}

By default it seem closing tags are used with all elements, as such:

<XMLTest><IdValue="D1949EE1-7D03-4666-9548-D1A949E10327"></Id></XMLTest>

Whereas I need these elem

5
1 237
Question Lee Butcher · Dec 4, 2024

I'm attempting to import all the FHIR XSD files provided by http://hl7.org/fhir but get the immediate and unhelpful error message:

I've tried different versions of EOLs to no avail. Any idea what this error could mean?

Here's the XSD I'm trying to import:

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011+, HL7, Inc
 All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, 
 are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this 
 list of condition



0
0 106
Question Liam Wood · Feb 24, 2023

Hi,

I'm currently working on an IHE implementation, and we've hit some issues around categorising inbound CCD results (i.e. mapping lab and rad results to their relevant SDA types).

I know that this is handled by the \CSP\xslt\SDA3\CDA-Support-Files\Import\Section-Modules\DiagnosticResults.xsl out of the box which can be overridden to use different logic, but I was wondering whether there's a standard/best practice approach for handling different sets of logic depending on the supplier of the CCD? We're going to be onboarding multiple data sources, so we're likely going to end up with lists

2
1 411
Article Chi Nguyen-Rettig · Sep 21, 2024 3m read

There are many applications for working with HL7 V2 messages, but the tools for working with XML in IRIS Management Portal and Cache Studio are limited. While plenty of external utilities and IDEs work with XML messages and even C-CDA documents, there is a compelling case for being able to test directly against the IRIS C-CDA framework. 

Testing within the IRIS environment provides the necessary context: 

  • XML parser configuration
  • XML namespace context
  • Facility and OID setup
  • IHE header handling
  • The HS.IHE.Util, HS.Util.XSLTTransformer, and %XML.XSLT.Transformer packages
  • Leveraging th







7
4 442
Question Marco Arcolin · Sep 26, 2024

Hi everyone,

I'm struggling with the extraction of information from the following XML:


<Bundle xmlns="http://hl7.org/fhir">
  <id value="b35061d2-7bf1-11ef-a57c-005056b65e2f"/>
  <type value="transaction-response"/>
  <timestamp value="2024-09-26T10:10:43Z"/>
  <entry>
    <resource>
      <Observation>
        <id value="2005"/>
        <meta>
          <versionId value="1"/>
          <lastUpdated value="2024-09-26T10:10:43Z"/>
        </meta>
        <status value="final"/>
        <code>
          <coding>
            <system value="urn:oid:2.16.840.1.113883.6.1"/>
            <code value="1-8"/>
       

2
0 154
Question Mike.W · Mar 15, 2023

Hi.

We are going to have basic patient demographic data coming in to Cache via a webservice. I thought that I should define the input as XML something like the FHIR format (with UK extensions).

In the past we've input XML streams and used the %XML.Reader to convert them to matching classes successfully, so I thought it would be easy. However, I've found that the FHIR format stores everything in attributes like:

  <gender value="male"/>
  <birthDate value="1982-01-23"/>

Looking in the Cache documentation here there seems no easy way to make a property match to an attribute of "value" with

6
1 471
Question John Hotalen · Sep 17, 2024

Hello to my fellow Cache Gurus:

I ran into two issues with Cache to XML Export and Cache to JSON Export in regard to array sequences.   So before I waste time opening a WRC ticket, I figured I would poll the Development Community, since there is always so much wonderful feedback and suggestions via this Developer Community!   So much thanks in advance for everyone's input!   Go Team!

I have multiple classes that extend from %RegisteredObject and %XML.Adaptor.  These classes are populated with data from our application and the data of the overall class structure is exported as XML (and soon t

6
0 309
Question Armin Gayl · Sep 3, 2024

Hello everyone,

I'm a bit confused about the number of elements in an XML object.
I have an object of the class EnsLib.EDI.XML.Document
The xsd structure ( DocType)  is an SDA Object

</container><Patient></Patient><Documents><Document><DocumentNumber>0000000000000010008162012</DocumentNumber><DocumentCompletionStatus><Code>IP</Code></DocumentCompletionStatus><FileType>XML</FileType><Stream>PD...</Stream></Document><Document><DocumentNumber>0000000000000010008157893</DocumentNumber><DocumentCompletionStatus><Code>IP</Code></DocumentCompletionStatu
2
0 174
Question Kari Vatjus-Anttila · Oct 31, 2016

Hi,

I'm new with writing Caché Objectscript so I need some assistance. I have XML which contains information like this:

<?xml version="1.0" encoding="UTF-8"?>
<session>
   <sessionId>124364</sessionId>
   <cabinet>demo</cabinet>
   <eventType>IN</eventType>
   <eventTime>20161006160154</eventTime>
   <login>test</login>
   <loginFirstName>test</loginFirstName>
   <loginLastName>test</loginLastName>
</session>

I have a class representing this object as follows:

Class Testing.Messages.Session Extends (%RegisteredObject, %XML.Adaptor, Ens.Request){Parameter XMLNAME = "se
5
0 1569
Question Yone Moreno · Jul 18, 2024

Hello,

First of all thanks for your help, and thank you for your time.

We have the following task:

To generate by hand the Ens.Request with the properties and inner Data Schemes which represent this XML, in HealthShare, by hand; the XML is this one:

<DSPortal360xmlns="http://tempuri.org/DSPortal360.xsd"><Paciente><NumExpediente>6258338</NumExpediente><Informes><Fecha_Creacion>2024-07-17T11:30:05+01:00</Fecha_Creacion><Id_Visita>8177822</Id_Visita><Titulo>Visita 17/07/2024</Titulo><Desc_Tipo_Plant>99</Desc_Tipo_Plant><NumExpediente>6258338</NumExpediente

2
1 143
Article Keren Skubach · Jul 4, 2024 1m read

Have you ever imported an XML schema from an XSD file? You might want to look at the original file again sometime later, but forgot where you put it.

Do not worry, that information is being kept as part of the import process.

The whole imported XSD schema is being kept in the ^EnsEDI.XML.Schema global. That global holds all the imported XSDs in your namespace. The first subscript is the name of the schema that you see in the portal.

To look for the source XSD file location, simply look at the following place:

^EnsEDI.XML.Schema(<schema name>,"src",1)

For example:

ZW^EnsEDI.XML.S
0
0 277
Question Thomas Haig · Jul 3, 2024

Trying to test a router that takes an XML input and performs a transform on it.
First attempt I tried to test the transform using the XML Document Viewer via the Ensemble -> Interoperate -> XML Document Viewer menu. The transform itself is working however I can not get the output to save to a file. I've made sure permissions are set correctly on the file. It simply doesn't output anything and I'm at a loss as to why.
As another method I also tried testing via Ensemble -> Test -> Business Hosts. Putting the file path/name as the source does not send any data. Again, I've made sure read permission

0
0 122
Question Yone Moreno · Nov 22, 2023

Hello,

First of all thanks for your help.

We have the following scenario: some responses include special characters as ">" and "<" which are being put inside a property defined as:

Property PACPROBLEMAS As %String(MAXLEN = "", XMLNAME = "PAC_PROBLEMAS");

So then, when we observe the LOG SOAP it shows that the Target System replies to the ESB as follows:

➡️ <PAC_PROBLEMAS>46807#278.01#OBESIDAD INFANTIL GRAVE     ( Z-SCORE IMC &gt;2,70 ) #19/09/2019##N#</PAC_PROBLEMAS>

However when we observe the Visual Trace, the message being replied from the Operation to the Process has a CDATA s



5
0 932
Question Bransen Smith · Apr 23, 2024

I am attempting to configure an inbound service that utilizes the EnsLib.SOAP.GenericService class. This service receives HL7-v3 content wrapped in SOAP requests. Despite reading the documentation on configuring SOAP services, I am still confused.

In my current configuration item "Fr_Centrak_RTLS", I have ‘Enable Standard Requests’ checked, ‘Pool Size’ set to 0, and the port is unspecified.

I have also configured a web application with the following details:

My challenge is determining the correct URL address for sending SOAP traffic to this service. Additionally, I do not

7
0 502
Question Krishnaveni Kapu · Apr 26, 2024

I am receiving an XML input to my router and in the routing rule I need to traverse through the xml data , apply a for loop and fetch data.

How can I do that ?

Input :

<?xml version="1.0" encoding="UTF-8"?>
<Input>
   <data>
      <Ids>
         <Id>
            <Type>A</Type>
            <Value>123</Value>
         </Id>
         <Id>
            <Type>B</Type>
            <Value>456</Value>
         </Id>
      </Ids>
   </data>
</Input>

I would like to read 123 from above xml in a rule ..

3
0 256
Article Yuri Marx · Apr 23, 2024 8m read

The InterSystems IRIS has a series of facilitators to capture, persist, interoperate, and generate analytical information from data in XML format. This article will demonstrate how to do the following:

  1. Capture XML (via a file in our example);
  2. Process the data captured in interoperability;
  3. Persist XML in persistent entities/tables;
  4. Create analytical views for the captured XML data.

Capture XML data

The InterSystems IRIS has many built-in adapters to capture data, including the next ones:

  1. File Adapter: used to get files from network folders.
  2. FTP Adapter: employed to obtain files fr
























0
1 431
Question Igor Barboza · Apr 20, 2024

Hello everyone, I need some help. 

I have to send some events for a government WebService that I already imported the WSDL and XSD's and It worked fine and I'm able to build the message and connect into the service, but It has been rejected with the message that the XML is wrong and the only diference between the Caché SOAP message to all the examples that the government gave us is the header:
   

This is how the Government is expecting the message:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/
10
0 300
Question Michael Lundberg · Apr 15, 2024

Hello!

I wonder if anyone has a smart idea to extract an XML fragment inside a text document (incoming from a stream)?

The XML fragment is surrounded by plain text.

Example:

text...........
text...........
<?xml version="1.0" encoding="UTF-8 ?>
<Start>
...etc
</Start>
text...........
text...........

The XML is not represented by any class or object in the Namespace.

The XML can look different from time to time

Appreciated if anyone knows how to use Objectscript to extract the XML content.

Regards Michael

9
0 375
Question Ali Chaib · Mar 13, 2024

Dear,

I'm trying to configure a new interface that reads HL7, transform them into FHIR messages and then send POST or PUT or DELETE depending on HL7 doc type.

1-I added an HL7 TCP service that reads ADTs messages

2a-Send ADTs to a process to transform them into SDA  (using the following command:  do ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.con))

2b-Extract the patient MRN and add it to the AdditionalInfo property  (using the following request message class: HS.Message.XMLMessage)

3-Send the SDA message to the built in process: HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process.

4-Send FHIR r

5
0 305
Question Yone Moreno · Mar 12, 2024

Hello,
First of all thanks for your time and help with this question.

We wonder how could we convert a String which represents an XML, to a class which extends from Ens.Response

Our context is a REST Operation, where we currently split the String with $PIECE and set each propertie as follows:

set codigo = $PIECE($PIECE(httpResponse,"<error><codigo>",2),"</codigo><descripcion>",1)
        set descripcion = $PIECE($PIECE(httpResponse,"<descripcion>",2),"</descripcion>",1)
        set codigoSERAM = $PIECE($PIECE(httpResponse,"</error><codigo>",2),"</codigo></resultado>",1)
        
5
0 224
Question Lukasz Migacz · Feb 19, 2024

Hi,

I have an odd problem that occurs when I'm trying to import lookup tables in the XML format into Studio.

I store my files in in C:\CodeRepository.

I can manually import these lookup tables using "Import local..." option in the InterSystems Studio. 

However, when I'm trying to import them using command in terminal: do $system.OBJ.LoadDir("C:\CodeRepository\","ck")

I'm getting the following error:

Loading file C:\CodeRepository\Title.lut.xml as xml
ERROR #5863: Another user has 'Title.LUT' open for editing.
  > ERROR #6315: Errors reporting importing XML subelement in file 'C:\CodeReposi

1
0 240
Question Yone Moreno · Jan 29, 2024

Hello,

First of all thanks for your help reading and answering this question, and thanks for your time.

We have been investigating how to handle the following need:

Our client which has the system which reveices our ESB's responses needs a SOAP response as follows, where all the ACK is inside a top XML tag called <ACK>:

<?xml version="1.0" encoding="UTF-8"?><ACKxmlns="urn:hl7-org:v2xml"><MSH><MSH.1>|</MSH.1><MSH.2>^~\&amp;</MSH.2><MSH.3><HD.1>sistemaExterno</HD.1></MSH.3><MSH.4><HD.1>scs</HD.1>
3
0 376
Question Nimisha Joseph · Jan 4, 2024

Hi,

Im using an ORU_R01 2.3.1 message for converting to pdf. For the stylesheet, i need all the OBX segments under each OBR segment with  custom table headers. Can anyone help me with the xslt?

eg msg:
MSH|^~\&|WinPath|WinPath|EDT|TAY|202311262232||ORU^R01|49960|P|2.3.1|1||AL|||||
PID|||||TEST^CLINISYS||19740415|F||||||||||||||||||||||
PV1|||ZZZZ4^^^GP&GP^^^^^Virtual GP Practice||||||ZZZZ1^Dr Virtualone|E1||||||||NHS||||||||||||||||||||||||||||||||||
ORC|RE||23H00000055||CM||||202311131544||||||||||||NHS Tayside|||
OBR|1||23H00000055|HIST^HISTOLOGY^WinPath||202311131543|202311131045|||||||2023111

1
0 206
Question water huang · Jan 15, 2024

hi there,when i use %XML.Reader parse XML to object,if the element value is null,the data in the table is $c(0),how avoid this?

my class file like this:

Class M.PATLIST Extends (%RegisteredObject, %XML.Adaptor) [ Inheritance = right, Not ProcedureBlock ]
{Property Data As list Of PAT(XMLPROJECTION = "ELEMENT");Parameter XMLIGNOREINVALIDTAG = 1;Parameter XMLIGNORENULL = 1;Parameter XMLNAME = "DATALIST";}

Class M.PAT Extends (%Persistent, %XML.Adaptor) [ Inheritance = right, Not ProcedureBlock]
{Property CSRQ As %Date;Property CYZZDBM As %String(MAXLEN = "", TRUNCATE = 1);Property C

3
0 281
Question Emil Odobasic · Nov 29, 2023

Hello everyone!
Sorry for the vague title! But I wonder what would be the best way to easily import a large XML-file into a production, modifying it by deleting elements and nodes depending on what values are in those nodes/elements and later creating whole new XML-file from that?

I have gone through this: Using Caché XML Tools | Caché & Ensemble 2018.1.4 – 2018.1.8 (intersystems.com)

But I get the sense that there are a lot of ways of approaching this, but I do not know what is the most effective for my certain needs.

I appreciate the help! Thanks beforehand! :)
 

5
0 540
Question Lewis Houlden · Dec 11, 2023

Hi all

I'm having trouble defining the mapping needed to take the very large base64 string in OBX:5.5, and map it to an XML virtual document property that supports Stream.GlobalCharacter. I know from within the DTL you have to use custom code to manage the segment due to its size. 

do target.StoreFieldStreamRaw(.stream,"LetterAttachment(1).Base64EncodedFile(1)", .rem)
 set tObx14Value = $piece(rem,"|",10)
 set convertedDate = ##class(Phu.Shared.Util.DateTime).ConvertHl7DateTimeToXmlDateTime(tObx14Value)
 do target.SetValueAt(convertedDate,"DocumentDetails(1).AuthoredDate(1)")
 do target.SetValu

4
0 435