HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
class HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR extends %Library.RegisteredObject
Property Inventory
Method Inventory
- AppendAdditionalCategory()
- CreateImmunizationsFromAdministrations()
- GetDTL()
- GetId()
- GetPatientReference()
- GetReference()
- GetTargetResourceList()
- GetXFSchemaFromMetadataSet()
- HandleSubtransformError()
- HelperAnswerProcess()
- HelperItemProcess()
- ProcessObservationComponents()
- ProcessProvenance()
- ProcessProvenanceSetAsideQueue()
- ProcessProvenanceTargets()
- ProcessQuestionnaireResponse()
- Reset()
- TransformContainer()
- TransformDatatype()
- TransformObject()
- TransformSDA()
- TransformStream()
Properties
property bundle as %DynamicObject [ Calculated ];
Contains the FHIR Bundle generated during the transformation. If transforming
individual SDA classes, it contain the FHIR representation of those classes and
can be continuously appended to. If transforming a Container,
will be the entire contents of the Container, represented as FHIR.
property fhirVersion as %String [ Calculated ];
Property methods: fhirVersionDisplayToLogical(), fhirVersionIsValid(), fhirVersionLogicalToDisplay(), fhirVersionLogicalToOdbc(), fhirVersionNormalize()
property schema as HS.FHIRMeta.API [ Calculated ];
Methods
method AppendAdditionalCategory(source As HS.SDA3.SuperClass, target As %RegisteredObject, ByRef aux, pCode As %String, pSystem As %String, pDisplay As %String, pText As %String, pFhirVersion As %String) as %Status
Utility method to append an additional category object to the target resource's category list.
One of target or resourceJson must be provided.
@Inputs
source SDA object which created this resource
target Object model version of the resource
aux Auxiliary value
pCode Value for category[n].coding[n].code
pSystem Value for category[n].coding[n].system
pDisplay Value for category[n].coding[n].display
pText Value for category[n].text
pFhirVersion Version of FHIR output to append a category
method CreateImmunizationsFromAdministrations(source As HS.SDA3.Vaccination, target As %RegisteredObject, ByRef aux) as %Status
Creates Immunization resources based on Administrations within the inbound SDA3 Vaccination.
An Immunization resource will be created for each Administration in the SDA.
If there are no Administrations, no Immunization resource will be created.
If any one of the resources fail validation, no resources will be created for this streamlet.
method GetDTL(source As HS.SDA3.DataType, DTL As %Dictionary.Classname = "", targetType As %String = "") as %Dictionary.Classname
Specifies the DTL class to use for a given SDA object. A preferred DTL will be specified in
subtransformations, but will not be specified for top level transformations. Default logic
for top level transformations can be viewed in the FHIR annotations, under the Container
mappings. This can be overriden if different logic is desired.
@API.Overrideable
method GetId(source As HS.SDA3.SuperClass, resource As %DynamicObject) as %String
Overrideable method that allows custom designation of a resource id. SDA source
and the generated resource are provided.
@API.Overrideable
method GetPatientReference() as %String
Returns a reference to the Patient resource. Will generate an id if one isn't passed in
@API.Overrideable
Returns a reference to the resource generated from the provided source identifier. Predominant
use case is to return a reference to the Encounter resource given an EncounterNumber
@API.Overrideable
Returns a $List of FHIR resource names that are fed by SDA3 streamlets via SDA3 to FHIR transformations.
Indicate the schema name parameter with a string that starts with "v" and ends with the FHIR major version number indicator. Examples of valid values are: "vSTU3", "vR4", etc. @API.Method
Returns the transformation schema for a given metadata set
@API.Method
method HandleSubtransformError(status As %Status)
Overrideable method that allows custom handling of errors in a subtransform DTL. The default behavior
is to throw an exception and exit current transformation.
@API.Overrideable
method HelperAnswerProcess(configuredFhirVersion As %String, source As %Library.DynamicObject) as HS.FHIR.DTL.vR4.Model.Element.QuestionnaireResponse.item.answer
Helper method to process answers within items. Answers can contain multiple items
US Core requirements require valueString, valueDecimal, valueCoding and item to be filled out.
method HelperItemProcess(configuredFhirVersion As %String, source As %Library.DynamicObject) as HS.FHIR.DTL.vR4.Model.Element.QuestionnaireResponse.item.answer
Helper method to process item fields. Items can contain multiple items, and answers
method ProcessObservationComponents(source As HS.SDA3.Vaccination, target As %RegisteredObject, ByRef aux) as %Status
If an observation in the Observation.component[x] array matches on observation code: Observation.component[x].code.code = Observation.code.code:
- Copy the valueQuantity property from the component array to the top-level: Observation.component[x].valueQuantity --> Observation.valueQuantity
- Remove the matching redundant component from the component array
method ProcessProvenance(source As HS.SDA3.Provenance, target As %RegisteredObject, ByRef aux) as %Status
Map SourceFormat to PDex extension, map Agents, initialize target array to be populated in TransformContainer
Store provenance resource in ..%provenance (set-aside queue), to be added to output bundle later when we are able
to reconstitute target array from ..%provenanceTarget in TransformContainer.
method ProcessProvenanceSetAsideQueue()
Process provenance streamlets in the set-aside queue: ..%provenance, and populate "target" using references from ..%provenanceTarget
method ProcessProvenanceTargets(source As HS.SDA3.SuperClass, reference As %String) as %Status
All streamlets that are target(s) of Provenance contain their provenance references in property ProvenanceIds
Iterate these GUIDs and set ..%provenanceTargets(GUID,reference)
method ProcessQuestionnaireResponse(source As HS.SDA3.QuestionnaireResponse, target As %RegisteredObject, ByRef aux) as %Status
method Reset()
Resets this transformer object to its initial state.
@API.Method
method TransformContainer(source As HS.SDA3.Container, patientId As %String = "") as HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
Transforms an SDA Container to FHIR. Returns an instance of this class
which contains a "bundle" property. That property will contain a FHIR Bundle with all the resources
generated during the transformation, and with all references resolved.
@API.Method
@Argument source SDA Container
@Argument patientId (optional) FHIR resource id to be assigned to the Patient resource
method TransformDatatype(source As HS.SDA3.DataType, targetType As %String, patientId As %String = "", encounterId As %String = "") as HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
Transforms an SDA datatype to FHIR, which may or may not be a subclass of HS.SDA3.SuperClass. Because of this,
a target resource type must be provided. If no transformation from the SDA datatype to the given resource type,
no action will be taken. Returns an instance of this class
which contains a "bundle" property. That property will contain a FHIR Bundle with all the resources
generated during the transformation, and with all references resolved.
@API.Method
@Argument source SDA object
@Argument targetType FHIR resource type to create from the provided input
@Argument patientId (optional) FHIR resource id to be assigned to the Patient resource
@Argument encounterId (optional) FHIR resource id to be assigned to the Encounter resource, if not transforming a Container
classmethod TransformObject(source, fhirVersion As %String, patientId As %String = "", encounterId As %String = "") as HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
Transforms an SDA object (Container or SDA class) to the specified FHIR version. Returns an instance of this class
which contains a "bundle" property. That property will contain a FHIR Bundle with all the resources
generated during the transformation, and with all references resolved. If patientId or
encounterId are specified, those values will go into any applicable Patient and Encounter
references.
@API.Method
@Argument source SDA object or Container
@Argument fhirVersion Version of FHIR used by the resource, eg. "STU3", "R4"
@Argument patientId (optional) FHIR resource id to be assigned to the Patient resource
@Argument encounterId (optional) FHIR resource id to be assigned to the Encounter resource, if not transforming a Container
method TransformSDA(source As HS.SDA3.SuperClass, patientId As %String = "", encounterId As %String = "") as HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
Transforms an SDA object to FHIR. Returns an instance of this class
which contains a "bundle" property. That property will contain a FHIR Bundle with all the resources
generated during the transformation, and with all references resolved.
@API.Method
@Argument source SDA object
@Argument patientId (optional) FHIR resource id to be assigned to the Patient resource
@Argument encounterId (optional) FHIR resource id to be assigned to the Encounter resource, if not transforming a Container
classmethod TransformStream(stream As %Stream.Object, SDAClassname As %String, fhirVersion As %String, patientId As %String = "", encounterId As %String = "") as HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR
Transforms an SDA stream (Container or SDA class) to the specified FHIR version. Returns an instance of this class
which contains a "bundle" property. That property will contain a FHIR Bundle with all the resources
generated during the transformation, and with all references resolved. If patientId or
encounterId are specified, those values will go into any applicable Patient and Encounter
references.
@API.Method
@Argument stream %Stream representation of an SDA object or Container
@Argument SDAClassname Classname for the object contained in the stream (eg. HS.SDA3.Container)
@Argument fhirVersion Version of FHIR used by the resource, eg. "STU3", "R4"
@Argument patientId (optional) FHIR resource id to be assigned to the Patient resource
@Argument encounterId (optional) FHIR resource id to be assigned to the Encounter resource, if not transforming a Container
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()