Health Cloud Patient Data Synchronization Process API - Implementation Template

(0 reviews)

Developer guide

Patient Sync Dev Guide

        Patient Sync provides helper functions for mapping EMR objects to HealthCloud ones.
ModuleDescription
LibPatientSyncLibPatientSync DataWeave library contains functions used to support the Patient sync process.
UtilA 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.
param items2 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)
param ref 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)
param ref 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)
param ref 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)
param ref 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.
param refName 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.
param refName is a String with the reference name to match on. (Location, Practitioner ...)
return An array of reference Ids.

fun getPatientPractitionerIds (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 getPatientPractitionerRoleIds (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 getPatientOrganizationIds (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 getPatientOrganizationIdsManagingOrg (fhirObj)

This function a FHIR object and gets the reference value for organization for managingOrg.

param fhirObj is a FHIR object to search.
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 getEncounterObservationIds (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 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 getProcedureServiceRequestIds (fhirObj)

This function a FHIR object and gets the reference value for service request.

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 getObservationServiceRequestIds (fhirObj)

This function a FHIR object and gets the reference value for service request.

param fhirObj is a FHIR object to search.
return An array of reference Ids.

fun getObservationObservationIds (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 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 getMedicationStatementObservationIds (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 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 getImmunizationObservationIds (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 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 getMedicationRequestServiceRequestIds (fhirObj)

This function a FHIR object and gets the reference value for service request.

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 getServiceRequestEncounterIds (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 getServiceRequestPractitionerIds (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 getServiceRequestOrganizationIds (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 getServiceRequestMedicationRequestIds (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 getServiceRequestServiceRequestIds (fhirObj)

This function a FHIR object and gets the reference value for service request.

param fhirObj is a FHIR object to search.
return An array of reference Ids.

fun getServiceRequestLocationIds (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 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.
param organizationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param locationMap 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.
param organizationMap 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.
param organizationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param locationMap 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.
param patientMap 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 updatePatientRefs (fhirObj, practitioners, practitionerRoles, organizations)

Updates the patient object references to Salesforce Ids with the ones provided in the patientMap.

param fhirObj is the Patient FHIR object to update.
param practitioners is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoles is a map with the foreign FHIR Id and the Salesforce Id relationships for practitionerRole.
param organizations is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
return A FHIR Patient object with the updated references.

fun updateEncounterRefs (fhirObj, patients, locations, organizations, practitioners, practitionerRoles, relatedPersons, conditions, procedures, observations, 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.
param patients is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param locations is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param organizations is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param practitioners is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoles is a map with the foreign FHIR Id and the Salesforce Id relationships for practitionerRole.
param relatedPersons is a map with the foreign FHIR Id and the Salesforce Id relationships for relatedPerson.
param conditions is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param procedures is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
param observations is a map with the foreign FHIR Id and the Salesforce Id relationships for observation.
param encounters 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.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoleMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param relatedPersonMap 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.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoleMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param relatedPersonMap is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
param diagnosticReportMap 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.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoleMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param relatedPersonMap is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
param organizationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param locationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param conditionMap is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param diagnosticReportMap is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnostic report.
param medicationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
param procedureMap 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, observationMap)

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.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoleMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param relatedPersonMap is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
param medicationRequestMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
param medicationStatementMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication statement.
param procedureMap is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
param immunizationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for immunization.
param locationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param organizationMap 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.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoleMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param locationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param medicationRequestMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
param organizationMap 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.
param medicationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
param organizationMap 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, observationMap)

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.
param medicationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
param organizationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param medicationRequestMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
param medicationStatementMap is a map with the foreign FHIR Id and the Salesforce Id relationships for medication statement.
param procedureMap is a map with the foreign FHIR Id and the Salesforce Id relationships for procedure.
param patientMap is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounterMap is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param practitionerMap is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param relatedPersonMap is a map with the foreign FHIR Id and the Salesforce Id relationships for relatedPerson.
param conditionMap is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param diagnosticReportMap is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnosticReport.
param observationMap is a map with the foreign FHIR Id and the Salesforce Id relationships for observation.
return A FHIR Medication object with the updated references.

fun updateImmunizationRefs (fhirObj, patients, encounters, locations, organizations, practitioners, practitionerRoles, conditions, diagnosticReports, observations)

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.
param patients is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounters is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param locations is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param organizations is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param practitioners is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoles is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param conditions is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param diagnosticReports is a map with the foreign FHIR Id and the Salesforce Id relationships for diagnostic report.
param observations is a map with the foreign FHIR Id and the Salesforce Id relationships for observation.
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.
param patients is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounters is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param locations is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param organizations is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param practitioners is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param practitionerRoles is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner role.
param conditions is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param relatedPersons is a map with the foreign FHIR Id and the Salesforce Id relationships for related person.
param medications is a map with the foreign FHIR Id and the Salesforce Id relationships for medication.
param medicationRequests 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.

fun updateServiceRequestRefs (fhirObj, patients, encounters, locations, organizations, practitioners, conditions, medicationRequests, serviceRequests)

Updates the ServiceRequest object references to Salesforce Ids with the ones provided in the provided maps.

param fhirObj is the Location FHIR object to update.
param patients is a map with the foreign FHIR Id and the Salesforce Id relationships for patient.
param encounters is a map with the foreign FHIR Id and the Salesforce Id relationships for encounter.
param locations is a map with the foreign FHIR Id and the Salesforce Id relationships for location.
param organizations is a map with the foreign FHIR Id and the Salesforce Id relationships for organization.
param practitioners is a map with the foreign FHIR Id and the Salesforce Id relationships for practitioner.
param conditions is a map with the foreign FHIR Id and the Salesforce Id relationships for condition.
param medicationRequests is a map with the foreign FHIR Id and the Salesforce Id relationships for medication request.
param serviceRequests is a map with the foreign FHIR Id and the Salesforce Id relationships for service request.
return A FHIR Medication object with the updated references.

(back to top)

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.

(back to top)


Reviews

TypeTemplate
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onJan 8, 2024
Asset overview

Asset versions for 1.0.x

Asset versions
StatusVersionActions
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0