XML

Syndicate content 18 

Greeting IRIS Community,

I need some help converting XLT (XML) into DTL (XML) pragmatically using COS or any other available options in IRIS for health.
It is for HL7-TO-nonHL7 translation. 

Last reply 1 days ago
0   0 2
41

views

0

rating

Hello everyone! 

I have had problem with XML format in Cache Object Script, it was diffucult to parse XML format,

So i decided to convert XML to JSON and parse json easily

So for that i wrote code in java which convert xml to json and build package with maven

Anyone interested can download jar file and see the instructions at the link:

https://github.com/Sabit2092/xmlToJsonCache
 

 

 

Last reply 9 June 2020
+ 2   0 1
148

views

+ 2

rating

Hi:

Sorry I can't find the correct documentation for this. It's very simple I think. 

I open up an XML reader class and correlate the XML to a message type. 

My XML will read something like 

<StatusLastChecked></StatusLastChecked>

This gets correlated into a message with the following property 

Last reply 27 May 2020
0   0 3
111

views

0

rating

I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects  anyone  with any idea is welcome he is my code so far

Last reply 6 May 2020
+ 1   0 3
790

views

+ 1

rating

I'm looking for any codes that match my parameter that we have received since 1/01/2020 based on the FromTime, EnteredOn or Status (if both are empty).

 

(Problem[Problem/Code='%1' and FromTime>"2020-01-01"]) | (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and EnteredOn>"2020-01-01"]) 
| (Problem[Problem/Code='%1' and (count(FromTime)=0 or FromTime="") and (count(EnteredOn)=0 or EnteredOn="") and Status/Description="Active"])

 

This works like a charm with standard XPATH query tools but HS does not like it.

Last reply 22 April 2020
+ 1   1 1
50

views

+ 1

rating

We have a data transformation where source is object collection (populated from a json file)  and target is EnsLib.EDI.XML.Document.

If source file is large enough, transformation fails and we get <store> error and I quickly found this:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_DTL_foreach which at the bottom in "Avoiding <STORE> Errors with Large Messages" section tells to: 

Last reply 24 March 2020
+ 1   0 3
131

views

+ 1

rating

In my Data Transformation, the Target class needs to create a new List of objects (ListOfObj), depending on some conditions of Source class (Source/Target are completely distinct/different classes).

I experimented with Lists of 'primitive' data types (ListOfDT), and I could add new %String items (as an example) to a List of %String property, with "append" action in DT.

Does anyone have an example, or guidance, how to create new Lists of Objects in data transformation?

For example, if I have a 'container' class like this, it works:

Last reply 16 March 2020
0   0 1
139

views

0

rating

Hi guys,

I need help because I have no idea how to proceed further and documentation does not explaining this solution.

I have XML like this:

<?xml version="1.0"?>

<ProductionPackage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" JobName="10006_8046_L69">

  <Barcode>1200002101</Barcode>

  <DueDate>31.12.5000 23:59:59</DueDate>

Last reply 18 February 2020
0   0 1
227

views

0

rating

Hello.

I'm trying to export a XML stream containing some files that are supposed to have been written using UTF-8, but I'm facing some broken encoding issues.
You can see below that I'm indeed viewing a UTF-8 encoded and which is inside the CSP folder and encoded correctly (although displaying it on Studio would not display it correctly as the file is not using BOM and that's intentional).

 

Last reply 4 February 2020
0   0 1
164

views

0

rating

Hello,

I am reading in an X12 document into my production that needs to be processed and returned as a CSV file.  I have created a record map to support the fields I want to extract with a batch class to store headers.  I have a DTL mapping the data to the appropriate fields in the record map and am sending the record map to a EnsLib.RecordMap.Operation.BatchFileOperation.

Last reply 29 January 2020
0   0 1
185

views

0

rating

Hi,

I have a large XML zen report file that I want to convert to a CSV, what is the most efficient way to do it.

XML file:

<Details>
<Col1> aa1 </Col1>
<Col2> bb1</Col2>
<Col3> cc1 </Col3>
</Details>
<Details>
<Col1> aa2 </Col1>
<Col2> bb2</Col2>
<Col3> cc3 </Col3>
</Details>

Expected Output:

Col1,Col2,col3
aa1,bb1,bb1
aa2,bb2,bb2

Thank you.

Last reply 29 January 2020
0   1 5
2,528

views

0

rating

Hi

I've got a string variable which I need to convert into a XML one.

My main goal here is to use the XML bit I've extracted from a HTML file in a message I need to pass over to an operation.

I'm doing the following which always errors

classMethod WriteNodes(myfile As %String)
{
    Set status=##class(%XML.TextReader).ParseString(myfile,.reader)

....

Any easy way of making this happen?

Kind regards

Last reply 21 November 2019
0   1 3
467

views

0

rating