Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR

class HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR extends %Library.RegisteredObject

Property Inventory

Method Inventory

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 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
method GetReference(resourceType As %String, sourceIdentifier As %String) as %String
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
classmethod GetTargetResourceList(schemaName As %String, Output resourceList) as %Status
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

classmethod GetXFSchemaFromMetadataSet(metadataKey As %String) as %String
Returns the transformation schema for a given metadata set @API.Method
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 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

Subclasses

FeedbackOpens in a new tab