Health Cloud Patient Data Synchronization Process API - Implementation Template
Developer guide
Patient Sync Dev Guide
Patient Sync provides helper functions for mapping EMR objects to HealthCloud ones.
Module | Description |
---|---|
LibPatientSync | LibPatientSync DataWeave library contains functions used to support the Patient sync process. |
Util | A library with needed dataweave utility functions. |
LibPatientSync
LibPatientSync DataWeave library contains functions used
to support the Patient sync process.
Source:
.src/main/resources/dwl/LibPatientSync.dwl
Functions
fun merge (items1, items2)
Utility functions that merges two arrays and then ensures the result has unique values.
param
items1
is the first array.
paramitems2
is the second array.
return A merged array with no duplicates.
fun matchReferenceReference (resource: String, ref: String)
Matches a standard reference and returns the ID portion.
param
resource
is a String with the resource to match. (ie Location)
paramref
is the reference String to match in.
return The matched ID or null if not found.
fun matchReferenceUrl (resource: String, ref: String)
Matches a URL reference and returns the ID portion.
param
resource
is a String with the resource to match. (ie Location)
paramref
is the reference String to match in.
return The matched ID or null if not found.
fun matchReference (resource: String, ref: String)
Matches any reference and returns the ID portion.
param
resource
is a String with the resource to match. (ie Location)
paramref
is the reference String to match in.
return The matched ID or null if not found.
fun hasReference (resource: String, ref: String)
Checks to see if the reference exists in the provide ref String with the provided resource String name.
param
resource
is a String with the resource to match. (ie Location)
paramref
is the reference String to match in.
return True if found and false if not.
fun getReferenceId (fhirObj, objName: String, refName: String)
This function a FHIR object and gets the reference value for the provided refName.
param
fhirObj
is a FHIR object to search.
paramrefName
is a String with the reference name to match on. (Location, Practitioner ...)
return An array of reference Ids.
fun getReferenceListId (fhirObj, objName: String, refName: String)
This function a FHIR object and gets the reference value for the provided refName.
param
fhirObj
is a FHIR object to search.
paramrefName
is a String with the reference name to match on. (Location, Practitioner ...)
return An array of reference Ids.
fun getEncouterLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncounterPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncounterPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncounterRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncounterConditionIds (fhirObj)
This function a FHIR object and gets the reference value for condition.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncounterProcedureIds (fhirObj)
This function a FHIR object and gets the reference value for procedure.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncouterOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getEncouterEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getLocationOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getLocationLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location partOf.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getPractitionerRolePractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getPractitionerRoleOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getPractitionerRoleLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getPractitionerOrganizationIds (qualifications)
This function takes a list of qualifications from Practitioner and gets a list of Organization Ids from the issuer field.
param
qualifications
is a list of qualification FHIR objects to search.
return An array of reference Ids.
fun getAllergyIntoleranceEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getAllergyIntolerancePractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getAllergyIntolerancePractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getAllergyIntoleranceRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionDiagnosticReportIds (fhirObj)
This function a FHIR object and gets the reference value for diagnostic report.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getConditionObservationIds (fhirObj)
This function a FHIR object and gets the reference value for observation.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedurePractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedurePractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureConditionIds (fhirObj)
This function a FHIR object and gets the reference value for condition.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureDiagnosticReportIds (fhirObj)
This function a FHIR object and gets the reference value for diagnostic report.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureMedicationIds (fhirObj)
This function a FHIR object and gets the reference value for medication.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getProcedureProcedureIds (fhirObj)
This function a FHIR object and gets the reference value for procedure.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationMedicationRequestIds (fhirObj)
This function a FHIR object and gets the reference value for medication request.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationMedicationStatementIds (fhirObj)
This function a FHIR object and gets the reference value for medication statement.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationProcedureIds (fhirObj)
This function a FHIR object and gets the reference value for procedure.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationImmunizationIds (fhirObj)
This function a FHIR object and gets the reference value for immunization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getObservationOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportMedicationRequestIds (fhirObj)
This function a FHIR object and gets the reference value for medication request.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getDiagnosticReportLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationMedicationIds (fhirObj)
This function a FHIR object and gets the reference value for medication.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementMedicationStatementIds (fhirObj)
This function a FHIR object and gets the reference value for medication statement.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementProcedureIds (fhirObj)
This function a FHIR object and gets the reference value for procedure.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementMedicationIds (fhirObj)
This function a FHIR object and gets the reference value for medication.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementConditionIds (fhirObj)
This function a FHIR object and gets the reference value for condition.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementDiagnosticReportIds (fhirObj)
This function a FHIR object and gets the reference value for diagnostic report.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationStatementMedicationRequestIds (fhirObj)
This function a FHIR object and gets the reference value for mediction request.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationLocationIds (fhirObj)
This function a FHIR object and gets the reference value for location.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationConditionIds (fhirObj)
This function a FHIR object and gets the reference value for condition.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getImmunizationDiagnosticReportIds (fhirObj)
This function a FHIR object and gets the reference value for diagnostic report.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestPractitionerIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestPractitionerRoleIds (fhirObj)
This function a FHIR object and gets the reference value for practitioner role.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestRelatedPersonIds (fhirObj)
This function a FHIR object and gets the reference value for related person.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestOrganizationIds (fhirObj)
This function a FHIR object and gets the reference value for organization.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestMedicationIds (fhirObj)
This function a FHIR object and gets the reference value for medication.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestConditionIds (fhirObj)
This function a FHIR object and gets the reference value for condition.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestEncounterIds (fhirObj)
This function a FHIR object and gets the reference value for encounter.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun getMedicationRequestMedicationRequestIds (fhirObj)
This function a FHIR object and gets the reference value for medication request.
param
fhirObj
is a FHIR object to search.
return An array of reference Ids.
fun updateLocationRefs (fhirObj, organizationMap, locationMap)
Updates the location object references to Salesforce Ids with the ones provided in the organizationMap and locationMap.
param
fhirObj
is the Location FHIR object to update.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
paramlocationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
return A FHIR Location object with the updated references.
fun updatePractitionerRefs (fhirObj, organizationMap)
Updates the practitioner object references to Salesforce Ids with the ones provided in the organizationMap.
param
fhirObj
is the Location FHIR object to update.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
return A FHIR Practitioner object with the updated references.
fun updatePractitionerRoleRefs (fhirObj, practitionerMap, organizationMap, locationMap)
Updates the practitionerrole object references to Salesforce Ids with the ones provided in the practitionerMap, organizationMap, and locationMap.
param
fhirObj
is the Location FHIR object to update.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
paramlocationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
return A FHIR PractitionerRole object with the updated references.
fun updateRelatedPersonRefs (fhirObj, patientMap)
Updates the relatedperson object references to Salesforce Ids with the ones provided in the patientMap.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
return A FHIR RelatedPerson object with the updated references.
fun updateEncounterRefs (fhirObj, patients, locations, organizations, practitioners, practitionerRoles, relatedPersons, conditions, procedures, encounters)
Updates the encounter object references to Salesforce Ids with the ones provided in the patientMap.
param
fhirObj
is the Location FHIR object to update.
parampatients
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramlocations
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
paramorganizations
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
parampractitioners
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoles
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitionerRole.
paramrelatedPersons
is a map with the foreign FHIR Id and the Salesforce Id relationships for relatedPerson.
paramconditions
is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
paramprocedures
is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
paramencounters
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
return A FHIR RelatedPerson object with the updated references.
fun updateAllergyIntoleranceRefs (fhirObj, patientMap, encounterMap, practitionerMap, practitionerRoleMap, relatedPersonMap)
Updates the AllergyIntolerance object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoleMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramrelatedPersonMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
return A FHIR RelatedPerson object with the updated references.
fun updateConditionRefs (fhirObj, patientMap, encounterMap, practitionerMap, practitionerRoleMap, relatedPersonMap, diagnosticReportMap)
Updates the Condition object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoleMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramrelatedPersonMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
paramdiagnosticReportMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnostic report.
return A FHIR Condition object with the updated references.
fun updateProcedureRefs (fhirObj, patientMap, encounterMap, practitionerMap, practitionerRoleMap, relatedPersonMap, organizationMap, locationMap, conditionMap, diagnosticReportMap, medicationMap, procedureMap)
Updates the Procedure object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoleMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramrelatedPersonMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
paramlocationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
paramconditionMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
paramdiagnosticReportMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnostic report.
parammedicationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
paramprocedureMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
return A FHIR Procedure object with the updated references.
fun updateObservationRefs (fhirObj, patientMap, encounterMap, practitionerMap, practitionerRoleMap, relatedPersonMap, medicationRequestMap, medicationStatementMap, procedureMap, immunizationMap, locationMap, organizationMap)
Updates the Observation object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoleMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramrelatedPersonMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
parammedicationRequestMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
parammedicationStatementMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication statement.
paramprocedureMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
paramimmunizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for immunization.
paramlocationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
return A FHIR Observation object with the updated references.
fun updateDiagnosticReportRefs (fhirObj, patientMap, encounterMap, practitionerMap, practitionerRoleMap, locationMap, medicationRequestMap, organizationMap)
Updates the DiagnosticReport object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoleMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramlocationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
parammedicationRequestMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
return A FHIR Observation object with the updated references.
fun updateMedicationRefs (fhirObj, medicationMap, organizationMap)
Updates the Medication object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parammedicationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
return A FHIR Medication object with the updated references.
fun updateMedicationStatementRefs (fhirObj, medicationMap, organizationMap, medicationRequestMap, medicationStatementMap, procedureMap, patientMap, encounterMap, practitionerMap, practitionerRoleMap, relatedPersonMap, conditionMap, diagnosticReportMap)
Updates the MedicationStatement object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parammedicationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
paramorganizationMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
parammedicationRequestMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
parammedicationStatementMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication statement.
paramprocedureMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
parampatientMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounterMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
parampractitionerMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
paramrelatedPersonMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for relatedPerson.
paramconditionMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
paramdiagnosticReportMap
is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnosticReport.
return A FHIR Medication object with the updated references.
fun updateImmunizationRefs (fhirObj, patients, encounters, locations, organizations, practitioners, practitionerRoles, conditions, diagnosticReports)
Updates the Immunization object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatients
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounters
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
paramlocations
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
paramorganizations
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
parampractitioners
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoles
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramconditions
is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
paramdiagnosticReports
is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnostic report.
return A FHIR Medication object with the updated references.
fun updateMedicationRequestRefs (fhirObj, patients, encounters, locations, organizations, practitioners, practitionerRoles, conditions, relatedPersons, medications, medicationRequests)
Updates the MedicationRequest object references to Salesforce Ids with the ones provided in the provided maps.
param
fhirObj
is the Location FHIR object to update.
parampatients
is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
paramencounters
is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
paramlocations
is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
paramorganizations
is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
parampractitioners
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
parampractitionerRoles
is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
paramconditions
is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
paramrelatedPersons
is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
parammedications
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
parammedicationRequests
is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
return A FHIR Medication object with the updated references.
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.