How to import VSCode HL7 Custom Schema
How to import Custom Schemas from VSCode? They look like this:
<?xml version="1.0"?><Categoryname="ITK"description="xmlns:hl7='urn:hl7-org:v2xml' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"std="1"><MessageTypename='ACK'structure='ACK'returntype='ACK'description='xsi:schemaLocation="urn:hl7-org:v2xml ACK.xsd"'/></Category>Instead of wrapped XML export produced by $system.OBJ:
<?xml version="1.0" encoding="UTF-8"?><Exportgenerator="IRIS"version="26"zv="IRIS for Windows (x86-64) 2022.1 (Build 209U)"ts="2023-06-15 20:19:56"><Documentname="ITK.HL7"><Categoryname="ITK"description="xmlns:hl7='urn:hl7-org:v2xml' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"std="1"><MessageTypename='ACK'structure='ACK'returntype='ACK'description='xsi:schemaLocation="urn:hl7-org:v2xml ACK.xsd"'/></Category></Document></Export>Preferably I need a LoadDir method.
Product version: IRIS 2023.1
Discussion (2)0
Comments
Anything better than manual wrangling:
Set tSC=##class(%Atelier.v2.Utils.TextServices).SetTextFromArray(.tTextArray,0,"CatNameFromFile","OTH",0)Found it:
set sc = ##class(EnsLib.HL7.SchemaXML).Import(filenameOrStream)Works with both old and new export.