New post

Find

Question
· Jan 13

DTL Transformation output: maxOccurs bug?

We are using a DTL transformation to take HL7 and transform into custom XML (XML is a virtual document, held in an EnsLib.EDI.XML.Document object). The schema specifying the format of the XML says one element should occur no more than 24 times (maxOccurs="24" in the XSD schema). However, the transformation to produce one such element always produces 24 elements, all but the last one blank, when tested stand-alone. And when the sub-transform producing one element is incorporated into the full transformation to produce the whole XML object, it produces the wrong output.

Is this a bug in the Ensemble XML Schema / transformation handling? Or are we doing something wrong?

The offending transformation takes an AL1 segment from an HL7 2.3 RDS_001 message and transforms it into an <allergy> node in the XML:

First, here's the Schema for the XML:

Second, here's the transformation which takes an AL1 segment and transforms to an <allergy> object:

Third, here's the output when that transformation is tested in isolation. Notice there are a total of 24 <allergy> objects, matching the maxOccurs="24" from the schema:

Fourth, for comparison, when the schema contains maxOccurs="unbounded" this is the output of the same transformation:

Fifth, here's the output of the calling transformation (whole HL7 message to root node of the XML schema), which calls the above transformation. Notice that there are 2x AL1 segments in the source HL7 message, and 2x (empty) <allergy> nodes in the output XML - given the behaviour of the segment transformation we wonder whether the nodes presented here are the first two produced by the segment transformation, but that is supposition:

Sixth and finally, here is the relevant part of that top-level transformation (HL7 -> root node of XML):

Note that this problem arises in a transformation we are having other (we think unrelated?) issues with, discussed here: DTL Transformation output: ordering of XML nodes | InterSystems Developer

1 Comment
Discussion (1)1
Log in or sign up to continue
Digest
· Jan 13

Nuevas publicaciones en la Comunidad de InterSystems, 6-12 enero

6-12 eneroWeek at a GlanceInterSystems Developer Community
Question
· Jan 13

How to Give A Status Old and New based on First Input Data

Hy Friends,

I have a little problem, I need to diplay the data based on input status (first time and after)

this is the data:

and this what I need to display

the notes become new because it is the first time that the data has been inputed, and it will become old if we have the data before (2nd data, 3rd data  the notes will become old).

I've try to use SubQuery (with LAG Script also) but it doesn't works, because it will give a notes Old even it's a New Data

Does anyone could help me ?

Thank You

Best Regards,

Steven Henry

1 Comment
Discussion (1)2
Log in or sign up to continue
Question
· Jan 13

Intersystems Data Models and ACID

Hello! 
So my question is quite simple, Do the different data models of Intersystems all support the ACID properties?
I assume that for the SQL data model implementation it does, But does it also work for global (i.e the hierarchical  data model)?

I searched the docs and the different articles, It seems for example that here its implied that the different data models of
Intersystems  DO indeed support the ACID properties and allow for safe insertion, deletion etc... in concurrent operations to the server that is.

 

Would love to get a clarification, Thx!

8 Comments
Discussion (8)2
Log in or sign up to continue