Health Cloud Diagnostics System API - Implementation Template
Developer guide
Diagnostics Dev Guide
The US-Core Diagnostics application uses the following DataWeave modules to map between HealthCloud and FHIR formats.
Module | Description |
---|---|
DiagnosticReportFHIRTools | DiagnosticReportFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
DiagnosticReportRequest | This module defines functions needed to convert a FHIR DiagnosticReport resource into it's representation within Health Cloud. |
ObservationFHIRTools | |
ObservationRequest | This module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud. |
Util | A library with needed dataweave utility functions. |
DiagnosticReportFHIRTools
DiagnosticReportFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/DiagnosticReport/DiagnosticReportFHIRTools.dwl
Functions
fun getDiagnosticReportIdentifiers (identifiers, digReport)
Gets the diagnosticReport identifiers with the provided HC ID array and returns a list of FHIR DiagnosticReport objects.
param
idTypeMap
is a map of HC Ids to FHIR identifier codes.
paramidentifiers
is an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
DiagnosticReportRequest
This module defines functions needed to convert a
FHIR DiagnosticReport resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/DiagnosticReport/DiagnosticReportRequest.dwl
Functions
fun getDiagnosticReportUpsert (fhirObj, codeSetBundleList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud DiagnosticSummary object.
param
fhirObj
is a FHIR DiagnosticReport object.
return A HealthCloud DiagnosticSummary object.
fun getDiagnosticReportUpdate (fhirObj, codeSetBundleList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud DiagnosticSummary object for Update of Diagnostic Report.
param
fhirObj
is a FHIR DiagnosticReport object.
return A HealthCloud DiagnosticSummary object.
fun getDiagnosticReportIdentifier (identifier, diagnosticReportId, typeId)
Converts the provided DiagnosticReport FHIR object to the HealthCloud Identifier object.
param
identifier
is a FHIR DiagnosticReport identifier object.
return A HealthCloud Identifier object.
fun getCodeSetUpsert (codeSetList)
Converts the provided DiagnosticReport FHIR object to the HealthCloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided DiagnosticReport FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
ObservationFHIRTools
Source:
.src/main/resources/dwl/Observation/ObservationFHIRTools.dwl
Functions
fun getCode (obs, codeId)
Gets the code object with the provided observation object and returns null if not found.
param
obs
is a HC Code object.
return An array of FHIR formatted Code objects.
fun getIdentifier (observation)
Gets the observation identifiers with the provided HC ID array and returns a list of FHIR Observation objects.
param
identifiers
is an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getBodySite (obs)
Gets the bodySite object with the provided observation object and returns null if not found.
param
obs
is a HC bodySite object.
return An array of FHIR formatted BodySite objects.
fun getInterpretation (obs)
Gets the interpretation object with the provided observation object and returns null if not found.
param
obs
is a HC interpretation object.
return An array of FHIR formatted Interpretation objects.
fun getMethod (obs)
Gets the method object with the provided observation object and returns null if not found.
param
obs
is a HC method object.
return An array of FHIR formatted Method objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attr
is an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
paramattr
is an object with the attributes.
return A string with the entry URL.
ObservationRequest
This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Observation/ObservationRequest.dwl
Functions
fun getObservationDetails (fhirObj, codeSetBundleList, codeId)
Converts the provided Observation FHIR object to the HealthCloud CareObservation object.
param
fhirObj
is a FHIR Observation object.
return A HealthCloud Observation object.
fun getObservationDetailsUpdate (fhirObj, codeSetBundleList, codeId)
Converts the provided Observation FHIR object to the HealthCloud CareObservation object.
param
fhirObj
is a FHIR Observation object.
return A HealthCloud Observation object.
fun getObservationIdentifier (identifier, observationId, typeId)
Converts the provided Observation FHIR object to the HealthCloud Identifier object.
param
identifier
is a FHIR Observation identifier object.
return A HealthCloud Identifier object.
fun getObservationComponents (components, observationId, codeSetBundleList, Index)
Converts the provided Observation Component FHIR object to the HealthCloud CareObservationComponent object.
param
components
is a FHIR Observation Component object.
return A HealthCloud Observation object.
fun getCodeSetUpsert (codeSetList)
Converts the provided Observation FHIR object to the HealthCloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Observation FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
obj
is an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arr
is an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arr
is an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
obj
is an object.
return An object with null values removed.