Health Cloud Clinical System API - Implementation Template
Developer guide
Clinical Dev Guide
The US-Core Clinical application uses the following DataWeave modules to map between HealthCloud and FHIR formats.
| Module | Description |
|---|---|
| allergyintolerancefhirtools | allergyintolerancefhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| allergyintoleranceRequest | This module defines functions needed to convert a FHIR AllergyIntolerance resource into it's representation within Health Cloud. |
| conditionfhirtools | conditionfhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| conditionRequest | This module defines functions needed to convert a FHIR Condition resource into it's representation within Health Cloud. |
| procedurefhirtools | procedurefhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format. |
| procedureRequest | This module defines functions needed to convert a FHIR Procedure resource into it's representation within Health Cloud. |
| Util | A library with needed dataweave utility functions. |
allergyintolerancefhirtools
allergyintolerancefhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/AllergyIntolerance/allergyintolerancefhirtools.dwl
Functions
fun getAllergyIntoleranceResponse (allergyIntolerance)
Generates the FHIR response with the provided AllergyIntolerance Object.
param
conditionRLUis the condition object to map.
return A HealthCloud AllergyIntolerance response.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris 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
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
allergyintoleranceRequest
This module defines functions needed to convert a
FHIR AllergyIntolerance resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/AllergyIntolerance/allergyintoleranceRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getCodeSetUpsert (codeSetList)
Converts the provided AllergyIntolerance FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getAllergyIntoleranceUpsert (fhirObj, codeSetBundleList)
Converts the provided AllergyIntolerance FHIR object to the HealthCloud AllergyIntolerance object.
param
fhirObjis a FHIR AllergyIntolerance object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the AllergyIntolerance object
return HealthCloud AllergyIntolerance upsert fields.
fun getAllergyIntoleranceUpdate (fhirObj, codeSetBundleList)
Converts the provided AllergyIntolerance FHIR object to the HealthCloud AllergyIntolerance object.
param
fhirObjis a FHIR AllergyIntolerance object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the AllergyIntolerance object
return HealthCloud AllergyIntolerance update fields.
fun getPatientHealthReactionUpsert (reactionFhirObj, allergyIntoleranceId, codeSetBundleList, rIndex)
Converts the provided AllergyIntolerance (Reaction) FHIR object to the HealthCloud PatientHealthReaction object.
param
reactionFhirObjis a FHIR AllergyIntolerance (Reaction) object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the AllergyIntoleranceReactions object
return HealthCloud PatientHealthReaction upsert fields.
fun getIdentifierUpsert (identifier, allergyIntoleranceId, typeId)
Converts the provided AllergyIntolerance FHIR object to the HealthCloud Identifier object.
param
identifieris the list of Identifier object.
paramallergyIntoleranceIdis the associated allergyIntolerance Id
return HealthCloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided AllergyIntolerance FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
parambundleTypeis for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
conditionfhirtools
conditionfhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Condition/conditionfhirtools.dwl
Functions
fun getConditionResponse (condition)
Generates the FHIR response with the provided Condition Object.
param
conditionRLUis the condition object to map.
return A HealthCloud Condition response.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris 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
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
conditionRequest
This module defines functions needed to convert a
FHIR Condition resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Condition/conditionRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getCodeSetUpsert (codeSetList)
Converts the provided Condition FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getConditionUpsert (fhirObj, codeSetBundleList)
Converts the provided Condition FHIR object to the HealthCloud Condition object.
param
fhirObjis a FHIR Condition object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Condition object
return HealthCloud Condition upsert fields.
fun getConditionUpdate (fhirObj, codeSetBundleList)
Converts the provided Condition FHIR object to the HealthCloud Condition object.
param
fhirObjis a FHIR Condition object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Condition object
return HealthCloud Condition update fields.
fun getIdentifierUpsert (identifier, conditionId, typeId)
Converts the provided Condition FHIR object to the HealthCloud Identifier object.
param
identifieris the list of Identifier object.
paramencounterIdis the associated condition Id
return HealthCloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Condition FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.
procedurefhirtools
procedurefhirtools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Procedure/procedurefhirtools.dwl
Functions
fun getProcedureResponse (procedure)
Generates the FHIR response with the provided Encounter Object.
param
procedureis the Procedure object to map.
return A HealthCloud Procedure response.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris 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
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
procedureRequest
This module defines functions needed to convert a
FHIR Procedure resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Procedure/procedureRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getCodeSetUpsert (codeSetList)
Converts the provided Procedure FHIR object to the HealthCloud CodeSet object.
param
codeSetListis the list of codeSet object.
return HealthCloud CodeSet upsert fields.
fun getPatientMedicalProcedureUpsert (fhirObj, codeSetBundleList)
Converts the provided Procedure FHIR object to the HealthCloud PatientMedicalProcedure object.
param
fhirObjis a FHIR Procedure object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Procedure object
return HealthCloud PatientMedicalProcedure upsert fields.
fun getPatientMedicalProcedureUpdate (fhirObj, codeSetBundleList)
Converts the provided Procedure FHIR object to the HealthCloud PatientMedicalProcedure object.
param
fhirObjis a FHIR Procedure object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Procedure object
return HealthCloud PatientMedicalProcedure update fields.
fun getPatientMedicalProcedureDetailUpsert (procedureId, procedureDetail)
Converts the provided Procedure FHIR object to the HealthCloud PatientMedicalProcedureDetail object.
param
procedureIdis the associated Procedure Id
paramprocedureDetailis the list of Procedure Detail in Procedure FHIR object
return HealthCloud PatientMedicalProcedureDetails upsert fields.
fun getCarePerformerUpsert (procedureId, performer, codeSetBundleList)
Converts the provided Procedure FHIR object to the HealthCloud CarePerformer object.
param
procedureIdis the associated Procedure Id
paramperformeris Perfromer object of Procedure FHIR object
paramcodeSetBundleListis the list of CodeSetBundle objects for the Procedure object
return HealthCloud PatientMedicalProcedureDetails upsert fields.
fun getIdentifierUpsert (identifier, procedureId, typeId)
Converts the provided Procedure FHIR object to the HealthCloud Identifier object.
param
identifieris the list of Identifier object.
paramprocedureIdis the associated Procedure Id
paramtypeIdis the codeSetId
return HealthCloud Identifier upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Procedure FHIR object to the HealthCloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis 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
objis 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
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.