HS.FHIR.DTL.Util.XML.Adapter

abstract class HS.FHIR.DTL.Util.XML.Adapter

Method Inventory

Methods

classmethod FromXML(xml) as %RegisteredObject
API Deserialize a FHIR XML resource string or stream into an instance of a class in HS.FHIR.DTL.fhirVersion.Model.

This classmethod can be called on the object type in question when the resource type is known. For example: set object = ##class(HS.FHIR.DTL.vSTU3.Model.Resource.Patient).FromXML(xml)

Otherwise, regardless of whether the resource type is known or not, you can call this method via HS.FHIR.DTL.fhirVersion.Model.Base.Resource.
Examples: set object = ##class(HS.FHIR.DTL.vSTU3.Model.Base.Resource).FromXML(xml), set object = ##class(HS.FHIR.DTL.vDSTU2.Model.Base.Resource).FromXML(xml)

Input:
xml: (required) FHIR XML resource string or stream.

Return:
FHIR data model object instance. Use $classname(object) or object.%ClassName(1) to determine the returned object type.
classmethod FromXMLHelper(pNode As %XML.Node) as %RegisteredObject
Helper method for deserializing a xml stream into an object.
method ToXML(tabChar As %String = "", newLine As %String = "") as %Stream.Object
API Serialize a FHIR data model object instance into a FHIR XML stream.

Input:
tabChar: "tab" character(s) for indent formatting. Default value is none.
newLine: Line terminator character(s) for line end formatting. Default value is none.

Return:
FHIR XML resource stream object.
method ToXMLHelper(ByRef outputStream As %Stream.Object, Output xmlString As %String, indents As %String = "", tabChar As %String = "", newLine As %String = "") as %Status
Helper method for serializing a data model object instance into an xml stream.

Subclasses

Feedback