Health Cloud Medications System API - Implementation Template
Developer guide
Medications Dev Guide
The US-Core Medications application uses the following DataWeave modules to map between HealthCloud and FHIR formats.
Module | Description |
---|---|
fhirtools | fhirtools DataWeave library (dw::Immunization::fhirtools) contains functions used for converting HealthCloud data into FHIR format. |
fhirtools | fhirtools DataWeave library (dw::Medication::fhirtools) contains functions used for converting HealthCloud data into FHIR format.. |
fhirtools | fhirtools DataWeave library (dw::MedicationRequest::fhirtools) contains functions used for converting HealthCloud data into FHIR format.. |
fhirtools | fhirtools DataWeave library (dw::MedicationStatement::fhirtools) contains functions used for converting HealthCloud data into FHIR format.. |
upsertGetRequests | This module (dw::Immunization::upsertGetRequests) defines functions needed to convert a FHIR Immunization resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::Medication::upsertGetRequests) defines functions needed to convert a FHIR Medication resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::MedicationRequest::upsertGetRequests) defines functions needed to convert a FHIR MedicationRequest resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::MedicationStatement::upsertGetRequests) defines functions needed to convert a FHIR MedicationStatement resource into it's representation within Health Cloud. |
fhirtools
fhirtools DataWeave library (dw::Immunization::fhirtools) contains functions used for converting HealthCloud data into FHIR format.
Source:
.src/main/resources/dwl/Immunization/fhirtools.dwl
Functions
fun getResponse (objRLU)
Generates the FHIR response with the provided Immunization Object.
param
objRLU
is the Immunization object to map.
return A HealthCloud Immunization response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fhirtools
fhirtools DataWeave library (dw::Medication::fhirtools) contains functions used for converting HealthCloud data into FHIR format..
Source:
.src/main/resources/dwl/Medication/fhirtools.dwl
Functions
fun getResponse (objRLU)
Generates the FHIR response with the provided Medication Object.
param
objRLU
is the Medication object to map.
return A HealthCloud Medication response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fhirtools
fhirtools DataWeave library (dw::MedicationRequest::fhirtools) contains functions used for converting HealthCloud data into FHIR format..
Source:
.src/main/resources/dwl/MedicationRequest/fhirtools.dwl
Functions
fun getResponse (objRLU)
Generates the FHIR response with the provided MedicationRequest Object.
param
objRLU
is the MedicationRequest object to map.
return A HealthCloud MedicationRequest response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fhirtools
fhirtools DataWeave library (dw::MedicationStatement::fhirtools) contains functions used for converting HealthCloud data into FHIR format..
Source:
.src/main/resources/dwl/MedicationStatement/fhirtools.dwl
Functions
fun getResponse (objRLU)
Generates the FHIR response with the provided MedicationStatement Object.
param
objRLU
is the MedicationStatement object to map.
return A HealthCloud MedicationStatement response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
upsertGetRequests
This module (dw::Immunization::upsertGetRequests) defines functions needed to convert a
FHIR Immunization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Immunization/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getImmunizationUpsert (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Immunization FHIR object to the HealthCloud Immunization object.
param
fhirObj
is a FHIR Immunization object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Immunization object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return HealthCloud Immunization upsert fields.
fun getImmunizationUpdate (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Immunization FHIR object to the HealthCloud Immunization object.
param
fhirObj
is a FHIR Immunization object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Immunization object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return HealthCloud Immunization update fields.
fun getCarePerformer (identifier, parentRecordId, CarePerformerParentsRoleId)
Converts the provided Immunization FHIR object to the HealthCloud CarePerformer object.
param
identifier
is a FHIR Identifier object.
paramparentRecordId
is the ImmunizationId
paramCarePerformerParentsRoleId
is the RoleId (CodeSetBundle)
return HealthCloud Immunization upsert fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Immunization 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 Immunization 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.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided Immunization FHIR object to the HealthCloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated Immunization Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return HealthCloud Identifier upsert fields.
upsertGetRequests
This module (dw::Medication::upsertGetRequests) defines functions needed to convert a
FHIR Medication resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Medication/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getMedicationUpsert (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Medication FHIR object to the HealthCloud Medication object.
param
fhirObj
is a FHIR Medication object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Medication object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object. which references to UnitOfMeasure Object
return HealthCloud Medication upsert fields.
fun getMedicationUpdate (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Medication FHIR object to the HealthCloud Medication object.
param
fhirObj
is a FHIR Medication object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Medication object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object. which references to UnitOfMeasure Object
return HealthCloud Medication upsert fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Medication 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 Medication 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.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided Medication FHIR object to the HealthCloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated Medication Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return HealthCloud Identifier upsert fields.
upsertGetRequests
This module (dw::MedicationRequest::upsertGetRequests) defines functions needed to convert a
FHIR MedicationRequest resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/MedicationRequest/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getMedicationRequestUpsert (fhirObj, codeSetBundleList)
Converts the provided MedicationRequest FHIR object to the HealthCloud MedicationRequest object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationRequest object
return HealthCloud MedicationRequest upsert fields.
fun getMedicationRequestUpdate (fhirObj, codeSetBundleList)
Converts the provided MedicationRequest FHIR object to the HealthCloud MedicationRequest object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationRequest object
return HealthCloud MedicationRequest update fields.
fun getPMDosageUpsert (fhirObj, codeSetBundleList, acc_QuantityUnitId_doseQuantity, acc_QuantityUnitId_rateQuantity, index, parentId)
Converts the provided dosageInstruction FHIR object to the HealthCloud PatientMedicationDosage object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the List of codeSetBundle Ids
paramacc_QuantityUnitId_doseQuantity
is the List of doseQuantity Ids
paramacc_QuantityUnitId_rateQuantity
is the List of rateQuantity Ids
paramindex
is PatientMedicationDosage index
paramparentId
is the ParentRecordId
return A HealthCloud MedicationRequest object.
fun getCodeSetUpsert (codeSetList)
Converts the provided MedicationRequest 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 MedicationRequest 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.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided MedicationRequest Identifier FHIR object to the HealthCloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated MedicationRequest Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return HealthCloud Identifier upsert fields.
upsertGetRequests
This module (dw::MedicationStatement::upsertGetRequests) defines functions needed to convert a
FHIR MedicationStatement resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/MedicationStatement/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getmedicationStatementUpsert (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided MedicationStatement FHIR object to the HealthCloud MedicationStatement object.
param
fhirObj
is a FHIR MedicationStatement object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationStatement object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return HealthCloud MedicationStatement upsert fields.
fun getmedicationStatementUpdate (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided MedicationStatement FHIR object to the HealthCloud MedicationStatement object.
param
fhirObj
is a FHIR MedicationStatement object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationStatement object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return HealthCloud MedicationStatement update fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided MedicationStatement 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 FHIR MedicationStatement 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.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided MedicationStatement FHIR object to the HealthCloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated MedicationStatement Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return HealthCloud Identifier upsert fields.