How to programmatically export individual HL7 schemas?
As the title suggests, I would like to programmatically export each HL7 schema category as XML, either as a stream object or to a file. How would I go about doing this?
Product version: IRIS 2023.3
You can call:
Set status = $System.OBJ.Export(SchemaName_".HL7",Filename)
Perfect. Thank you.
What would the SQL query look like to retrieve the individual schema names from this list? Ideally, I want to export each of these as a separate objects instead of the one large object under ^EnsHL7.Schema
I don't think there is a ready to use SQL query/procedure but you can call the class query "TypeCategories" in the class "EnsLib.HL7.Schema" from ObjectScript:
set ResultSet=##class(EnsLib.HL7.Schema).TypeCategoriesFunc() do ResultSet.%Display()