HS.FHIRServer.Util.JSONToXML

abstract class HS.FHIRServer.Util.JSONToXML

Method Inventory

Parameters

parameter DEBUG = 0;

Methods

classmethod EmitXMLObject(pPropName As %String, jsonObject As %DynamicObject, elementType As %String, prefix As %String) [ Language = objectscript ]
classmethod EnsureDynamicObject(pJSONInput) as %DynamicObject [ Language = objectscript ]
classmethod JSONToXML(pJSONInput, ByRef pOutputStream As %Stream.Object, pSchema As HS.FHIRServer.Schema, pIndentString As %String = "", pLineTerminator As %String = "") [ Language = objectscript ]
API JSONToXML takes FHIR JSON as either a %DynamicObject, a %Stream.Object or %String and converts it to XML writing an %Stream provided in the call to %New() This method needs a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the XML output are optional.

Input:
  • pJSONInput : Input FHIR JSON as either a %DynamicObject, a %Stream.Object or %String. The latter two forms will be converted into a %DynamicObject before conversion
  • pOutputStream : FHIR XML stream !passed ByRef!. If this object is not passed in then this method initializes it as a %Stream.TmpCharacter.
  • pSchema : The FHIR Schema used to guide the conversion
  • pIndentString : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.
  • Feedback