Question Bransen Smith · Oct 29, 2024

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

Comments

Enrico Parisi · Oct 29, 2024

You can call:

Set status = $System.OBJ.Export(SchemaName_".HL7",Filename)

0
Bransen Smith  Oct 30, 2024 to Enrico Parisi

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

0
Enrico Parisi  Oct 30, 2024 to Bransen Smith

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()
0