HS.FHIR.DTL.Util.JSON.Adapter
abstract class HS.FHIR.DTL.Util.JSON.Adapter
Method Inventory
- FromJSON()
- FromJSONDir()
- FromJSONFile()
- FromJSONHelper()
- PrimitiveExtensionHandler()
- ToJSON()
- ToJSONHelper()
Methods
classmethod FromJSON(json As %Stream.Object, fhirVersion As %String(VALUELIST=",vSTU3,vR4")) as %RegisteredObject
Deserialize a json stream into an instance of a class in HS.FHIR.DTL..Model. This classmethod
should be called on the object in question whenever the type is known. Otherwise, if the object isn't a
resource, the deserialization will fail. eg. set obj = ##class(HS.FHIR.DTL.vSTU3.Model.Resource.Bundle).FromJSON(jsonStream)
classmethod FromJSONDir(dirName As %String, Output list As %ListOfObjects, fhirVersion As %String(VALUELIST=",vSTU3,vR4")) as %Status
A different entrance to FromJSON that starts with a directory provided in dirName.
Every file with the .json extension is consumed, the json scraped, and converted into an
object using FromJSON. The resulting objects are stored in list.
classmethod FromJSONFile(fileName As %String, fhirVersion As %String(VALUELIST=",vSTU3,vR4")) as %RegisteredObject
A different entrance to FromJSON that starts with a full file name provided in fileName. JSON from
that file is scraped and used as the parameter in FromJSON
classmethod FromJSONHelper(dynamicObject As %DynamicObject, fhirVersion As %String(VALUELIST=",vSTU3,vR4")) as %RegisteredObject
Helper method for deserializing a json stream into an object.
classmethod PrimitiveExtensionHandler(pFhirExtensionDynObj As %Library.DynamicObject, pFhirObj As %RegisteredObject, pPrimitivePropertyName As %String, pPositionInCollection As %Integer, pFhirVersion As %String)
method ToJSON() as %Stream.Object
Serializes any FHIR resource that extends this class into a json Stream.
method ToJSONHelper(ByRef outputStream As %Stream.Object, Output jsonString As %String, indents As %String, inList) as %Status
Helper method for serialization. Should not be called externally.