Question
· Jan 15, 2021

How to test transformation from Virtual Document to FLR

I just need to know if I can test a Virtual Document to a flat file transformation using the Test facility in the Tools tab of the Data Transformation Builder.

There is an example in Ensemble(ENSDEMO namespace), but that is for a Virtual Document to Virtual Document. I need to know the syntax in the Input box.

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

That's an HL7 vdoc (EnsLib.HL7.Message) and that sample is HL7 code (though with strange delimiters).

So yes, if your input message is HL7 (EnsLib.HL7.Message) then you can just paste a raw HL7 message into the testing tool.

If your input message is XML (EnsLib.EDI.XML.Document) then you can just paste raw XML into the testing tool.

If your input message is an EnsLib.EDI.XML.Document and the message content is HL7 there's going to be a problem :)

It looks like the ENSDEMO namespace doesn't have an example for XML v-docs.

The basic steps are:
- Import an XSD (XML schema) for the document format you need to work with:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c...

- In your DTL, select XML as the Source Type and for Source Document Type select the schema that you just imported

- The DTL editor will use the imported schema to display a document structure that you can use to visually build your mappings

At this point you can paste into the testing tool a sample XML that follows the XSD.

If you just want to do a quick test to see how this works, you can find a simple XSD online and import that. I found this sample which includes an XSD and sample XML that follows the XSD's structure:
https://www.w3schools.com/XML/schema_example.asp

Sir

Once again I do have to apologize. I did not give you enough information. I might have given you the impression that I do not know how to transform this particular type of class. All the steps that you described above, have been completed. It is just that I got stuck when I wanted to use the Test tool and I did not know how to input the test data for this particular type of class. It should be in order to use the link above to create my own input then? 

I am missing something. My input data is not giving me the results that I am expecting. I think it is the way I am inputting the XML. Lets say the source is EnsLib.EDI.XML.Document SMP_KPMAIN1:KPMAIN1 and their are 2 group levels within this document. SMP_GRP1followed by SMP_GRP2. Within SMP_GRP1 there are 3 fields. GRP1FLD1, GRP1FLD2 and GRP1FLD3. Under SMP_GRP2 there are 5 fields. GRP2FLD1- 5. My question is, do I have to specify the whole document structure in my XML, even though I only want to test the transformation of one field? E.g. GRP2FLD4. The other question is, what would the XML look like? Is it different from a flat file transformation? I just cannot get it right.