Health Cloud Administration System API - Implementation Template

(0 reviews)

Developer guide

Administration Dev Guide

The US-Core Administratoin application uses the following DataWeave modules to map between HealthCloud and FHIR formats.

ModuleDescription
PatientFHIRToolsPatientFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
PatientRequestThis module defines functions needed to convert a FHIR Patient resource into it's representation within Health Cloud.
LocationFHIRToolsLocationFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
LocationRequestThis module defines functions needed to convert a FHIR Location resource into it's representation within Health Cloud.
PractitionerFHIRToolsPractitionerFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
PractitionerRequestThis module defines functions needed to convert a FHIR Practitioner resource into it's representation within Health Cloud.
OrganizationFHIRToolsOrganizationFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
OrganizationRequestThis module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud.
encounterfhirtoolsencounterFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
encounterRequestThis module defines functions needed to convert a FHIR Encounter resource into it's representation within Health Cloud.
PractitionerRoleFHIRToolsPractitionerRoleFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.
PractitionerRoleRequestThis module defines functions needed to convert a FHIR PractitionerRole resource into it's representation within Health Cloud.
RelatedPersonFHIRToolsRelatedPersonFHIRTools dataweave library contains functions used for converting HealthCloud data into FHIR format.
RelatedPersonRequestThis module defines functions needed to convert a FHIR RelatedPerson resource into it's representation within Health Cloud.
UtilA library with needed dataweave utility functions.

PatientFHIRTools

PatientFHIRTools DataWeave library contains functions used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/Patient/PatientFHIRTools.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 getPatientResponse (acc: Object, idTypeMap, personNames, contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)

Generates the FHIR response with the provided Account and contact Accounts.

param acc is the Account object to map.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
param personNames is an optional array of HC PersonName objects to map.
param contactAccounts is an optional array of contact Account objects to map.
param contactPersonNames is a list of contact PersonName objects.
param contactContactRelations is a list of contact relation objects.
param relationRoleMap the role relationship map.
return A FHIR formatted Patient object.

fun getPatientNames (personNames)

Gets the patient names in FHIR format with the provided list of HC PersonName objects.

param personNames is a list of HC PersonName objects.
return A list of FHIR formatted name objects.

fun getPatientCommunicationContactPoints (cp)

Gets the patient communication contact point object for the provided contact point provided.

param cp is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.

fun getPatientIdentifiers (idTypeMap, ids)

Gets the patient identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.

param idTypeMap is a map of HC Ids to FHIR identifier codes.
param ids is an array of HC identifier objects.
return An array of FHIR Identifier objects.

fun getPatientAddresses (addresses)

Get the patient addresses form HC and returns an array of FHIR formatted Address objects.

param addresses is an array of HC addresses.
return An array of FHIR formatted Address objects.

fun getPatientCommunication (acc)

Get the patient preferred language from the provided HC account object and returns an array of FHIR formatted language objects.

param acc is an HC account object.
return An array of FHIR formatted language objects.

fun getPatientContacts (contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)

Gets the patient contact-contact relations as an array of FHIR objects.

param contactAccounts is an optional list of contact Account objects to map.
param contactPersonNames is a list of contact PersonName objects.
param contactContactRelations is a list of contact relation objects.
param relationRoleMap the role relationship map.
return An array of contact FHIR objects.

fun getPatientRelationRole (contactContactRelations, id, relationRoleMap)

Gets the patient relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.

param contactContactRelations is a list of contact relation objects.
param id is a string with the account Id.
param relationRoleMap the role relationship map.
return A code for the patient relation role.

fun getPatientRelationRoleRecord (contactContactRelations, id)

Gets the patient relation role record with the provided list of contact relations and the Id.

param contactContactRelations is a list of contact relation objects.
param id is a string with the account Id.
return A Salesforce role Id for the provided data.

fun getPatientUsCoreExtensions (ct)

Gets the us-core Extensions for Patient with the provided Contact object.

param ct is a HealthCloud Contact object.
return A FHIR formatted extension list.

fun getPatientUsCoreExtensionRace (ct)

Gets the us-core Extension for Patient race with the provided Contact object.

param ct is a HealthCloud Contact object.
return A FHIR formatted race extension object.

fun getPatientUsCoreExtensionEthnicity (ct)

Gets the us-core Extension for Patient ethnicity with the provided Contact object.

param ct is a HealthCloud Contact object.
return A FHIR formatted ethnicity extension object.

fun getPatientUsCoreExtensionBirthSex (ct)

Gets the us-core Extension for Patient birth sex with the provided Contact object.

param ct is a HealthCloud Contact object.
return A FHIR formatted birth sex extension object.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

PatientRequest

This module defines functions needed to convert a
FHIR Patient resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/Patient/PatientRequest.dwl

Functions

fun getPatientPersonAccount (fhirObj, recordType)

Converts the provided Patient FHIR object to the HealthCloud PersonAccount request object.

param fhirObj is a FHIR Patient object.
param recordType is an ID with the PersonAccount record ID to use.
return A HealthCloud PersonAccount request object.

fun getPatientAccount (fhirObj)

Converts the provided Patient FHIR object to the HealthCloud Account object.

param fhirObj is a FHIR Patient object.
return A HealthCloud Account object.

fun getPatientContact (fhirObj)

Converts the provided Patient FHIR object to the HealthCloud Contact object.

param fhirObj is a FHIR Patient object.
return A HealthCloud Contact object.

fun getPatientPersonName (fhirObj, accountId)

Converts the provided Patient FHIR object to the HealthCloud PersonName object list.

param fhirObj is a FHIR Patient object.
param accountId is a string with the Account Id.
return A HealthCloud PersonName object list.

fun getPatientContactPoint (telecom, accountId)

Converts the provided Patient FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of Patient telecom objects.
param accountId is a string with the Account Id.
return A HealthCloud ContactPoint object list.

fun getPatientIdentifier (fhirObj, idTypeIdMap, accountId)

Converts the provided Patient FHIR object to the HealthCloud Identifier object list.

param fhirObj is a FHIR Patient object.
param idTypeIdMap is an object with the IdType code -> IdType Id from HealthCloud map.
param accountId is a string with the Account Id.
return A HealthCloud Identifier object list.

fun getIdentifierType (identifierObj)

Gets the identifier type. It first looks for the codeable concept code value, and if that's not found it then looks for the text value.

param identifierObj is an identifier object to get the type for.
return A string with the type or Undefined.

fun getPatientContactPointAddress (fhirObj, accountId)

Converts the provided Patient FHIR object to the HealthCloud ContactPoint Address objectlist .

param fhirObj is a FHIR Patient object.
param accountId is a string with the Account Id.
return A HealthCloud ContactPoint Address object list.

fun getPatientPersonLanguage (fhirObj, accountId)

Converts the provided Patient FHIR object to the HealthCloud PersonLanguage object list.

param fhirObj is a FHIR Patient object.
param accountId is a string with the Account Id.
return A HealthCloud PersonLanguage object list.

fun getPatientExtensions (fhirObj)

Converts the provided Patient FHIR object and returns the patient ethnicity and race us-core extensions.

param fhirObj is a FHIR Patient object.
return The HealthCloud ethnicity and race fields for Contact object.

fun getPatientRace (ext)

Converts the provided FHIR Extension object and returns the patient race us-core extensions.

param ext is a us-core-race extension object.
return An object with the extension fields for HC Contact.

fun getPatientEthnicity (ext)

Converts the provided FHIR Extension object and returns the patient ethnicity us-core extensions.

param ext is a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.

fun getPatientBirthSex (ext)

Converts the provided FHIR Extension object and returns the patient birth sex us-core extension.

param ext is a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.

fun getPatientEthnicityOmbCategory (items)

Converts the provided FHIR Extension list of Ethnicity OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.

fun getPatientEthnicityDetailed (items)

Converts the provided FHIR Extension list of Ethnicity Detailed objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.

fun getPatientEthnicityText (items)

Converts the provided FHIR Extension list of Ethnicity Text objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.

fun getPatientRaceOmbCategory (items)

Converts the provided FHIR Extension list of Race OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.

fun getPatientRaceDetailed (items)

Converts the provided FHIR Extension list of Race Detailed objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.

fun getPatientRaceText (items)

Converts the provided FHIR Extension list of Race Text objects and returns a list of objects with the us-core extensions for HC Contact.

param items is a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.

fun getPatientContactsPersonAccount (method, fhirObj, index, recordType)

Converts the provided Contact FHIR object to the HealthCloud Patient Contact Account request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param index is a string with the contact reference index to use.
param recordType is an ID with the PersonAccount record
return A composite HealthCloud contact Account request.

fun getPatientContactsContact (fhirObj)

Converts the provided Contact FHIR object to the HealthCloud Patient Contacts Contact.

param fhirObj is a FHIR Contact object.
return A composite HealthCloud contact Contact.

fun getPatientContactsPersonName (method, fhirObj, ctIndex, accountId)

Converts the provided Contact FHIR object to the HealthCloud Patient Contacts PersonName composite request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param ctIndex is the index of the contact in the loop.
param accountId is the Id of the parent Account record.
return A composite HealthCloud contact PersonName request.

fun getPatientContactsContactPointTelecom (method, fhirObj, ctIndex, accountId)

Converts the provided Contact FHIR object to the HealthCloud Patient Contacts telecom composite request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param ctIndex is the index of the contact in the loop.
param accountId is the Id of the parent Account record.
return A composite HealthCloud contact telecom request.

fun getPatientContactsContactPointAddress (method, fhirObj, ctIndex, accountId)

Converts the provided Contact FHIR object to the HealthCloud Patient Contacts address composite request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param ctIndex is the index of the contact in the loop.
param accountId is the Id of the parent Account record.
return A composite HealthCloud contact address request.

fun getPatientContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId, ctIndex)

Converts the provided Contact FHIR object to the HealthCloud Patient contact-to-contact relationship of composite request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param relationRoleMap the role relationship map.
param mainContactId is a string with the main Contact Id.
param contactId is a string with the Contact Id.
param ctIndex is the index of the contact in the loop.
return A composite HealthCloud contact-to-contact relationship request.

(back to top)

LocationFHIRTools

LocationFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/Location/LocationFHIRTools.dwl

Functions

fun getLocationResponse (loc: Object, locationObj, identifierObj, codeSet, IdTypeIdMap, parentFacilityAccountId)

Generates the location response object in FHIR format with the provided location and associated objects queried from Health Cloud.

param loc is the HC Account location object.
param locationObj is the HC Location object.
param identifierObj is the HC Identifier object list.
param codeSet is the HC CodeSet object.
param IdTypeIdMap is a map with the Id types.
param parentFacilityAccountId is a String with the parent facility Account Id if present or null if not provided.
return A FHIR formatted Location object.

fun getLocationType (codeSet)

Gets the Location type object with the provided codeSet HealthCloud object.

param codeSet is a HealthCloud CodeSet object.
return A FHIR Location type object.

fun getLocationPhysicalType (facility)

Gets the Location physicalType object with the provided HealthcareFacility HealthCloud object.

param facility is a HealthCloud HealthcareFacility object.
return A FHIR Location physicalType object.

fun getLocationIdentifier (idList, idTypeIdMap)

Gets the Location identifier object list with the provided Identifier HealthCloud object list.

param idList is a HealthCloud Identifier object list.
param IdTypeIdMap is a map with the Id types.
return A FHIR Location identifier object.

fun getLoationTelecom (loc: Object)

Gets the Location telecom objects with the provided Location HealthCloud object.

param loc is the HC Account location object.
return A list of FHIR Location telecom objects.

fun getLoationAddress (loc: Object)

Gets the Location address objects with the provided Location HealthCloud object.

param loc is the HC Account location object.
return A list of FHIR Location address objects.

fun getLoationManagingOrganization (loc: Object)

Gets the Location managing organization object with the provided Location HealthCloud object.

param loc is the HC Account location object.
return A FHIR reference to managing organization.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

LocationRequest

This module defines functions needed to convert a
FHIR Location resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/Location/LocationRequest.dwl

Functions

fun getLocationAccount (fhirObj)

Converts the provided Location FHIR object to the HealthCloud Account object.

param fhirObj is a FHIR Location object.
return A HealthCloud Account object.

fun getLocationLocation (fhirObj)

Converts the provided Location FHIR object to the HealthCloud Location object.

param fhirObj is a FHIR Location object. Id or null if not present.
return A HealthCloud Location object.

fun getLocationHealthcareFacility (fhirObj, facilityTypeId, parentFacilityId)

Converts the provided Location FHIR object to the HealthCloud HealthcareFacility object.

param fhirObj is a FHIR Location object.
param facilityTypeId is the Id of the CodeSetBundle to set.
param parentFacilityId is a String with the parent HealthcareFacility Id or null if not present.
return A HealthCloud HealthcareFacility object.

fun getLocationHealthcareFacility (fhirObj, facilityTypeId, parentFacilityId, create)

Converts the provided Location FHIR object to the HealthCloud HealthcareFacility object.

param fhirObj is a FHIR Location object.
param facilityTypeId is the Id of the CodeSetBundle to set.
param create is a boolean with true to create and false to update.
param parentFacilityId is a String with the parent HealthcareFacility Id or null if not present.
return A HealthCloud HealthcareFacility object.

fun getLocationIdentifier (fhirObj, idTypeIdMap)

Converts the provided Location FHIR object to the HealthCloud Identifier object.

param fhirObj is a FHIR Location object.
param idTypeIdMap is an object with the IdType code -> IdType Id from HealthCloud map.
return A HealthCloud Identifier object.

fun getLocationIdentifier (fhirObj, idTypeIdMap, healthcareFacilityId)

Converts the provided Location FHIR object to the HealthCloud Identifier object.

param fhirObj is a FHIR Location object.
param idTypeIdMap is an object with the IdType code -> IdType Id from HealthCloud map.
param healthcareFacilityId is the HealthcareFacility Id to use as the parent record Id.
return A HealthCloud Identifier object.

fun getLocationContactPoint (telecom)

Converts the provided Location FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of Location telecom objects.
return A HealthCloud ContactPoint object list.

fun getLocationContactPoint (telecom, accountId)

Converts the provided Location FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of Location telecom objects.
param accountId is a String with the Account Id.
return A HealthCloud ContactPoint object list.

fun getLocationContactPointAddress (fhirObj)

Converts the provided Location FHIR object to the HealthCloud ContactPoint Address object .

param fhirObj is a FHIR Location object.
return A HealthCloud ContactPoint Address object.

fun getLocationContactPointAddress (fhirObj, accountId)

Converts the provided Location FHIR object to the HealthCloud ContactPoint Address object .

param fhirObj is a FHIR Location object.
param accountId is a String with the Account Id.
return A HealthCloud ContactPoint Address object.

fun getLocationAccountAccountRelation (fhirObj, relationRoleMap)

Converts the provided Location FHIR object to the HealthCloud AccountAccountRelation object .

param fhirObj is a FHIR Location object.
param relationRoleMap the role relationship map.
return A HealthCloud ContactPoint AccountAccountRelation object.

fun getLocationAccountAccountRelation (fhirObj, relationRoleMap, accountId)

Converts the provided Location FHIR object to the HealthCloud AccountAccountRelation object .

param fhirObj is a FHIR Location object.
param relationRoleMap the role relationship map.
param accountId is a String with the Account Id.
return A HealthCloud ContactPoint AccountAccountRelation object.

(back to top)

PractitionerFHIRTools

PractitionerFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/Practitioner/PractitionerFHIRTools.dwl

Functions

fun getPractitionerResponse (acc: Object, idTypeMap, personNames, personLanguages)

Generates the FHIR response with the provided Account and contact Accounts.

param acc is the Account object to map.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
param personNames is an optional array of HC PersonName objects to map.
param personLanguages is a list of HC language to map.
return A FHIR formatted Practitioner object.

fun getPractitionerResponse (acc: Object, idTypeMap, personNames, contactAccounts, contactPersonNames)

Generates the FHIR response with the provided Account and contact Accounts.

param acc is the Account object to map.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
param personNames is an optional array of HC PersonName objects to map.
param contactAccounts is an optional array of contact Account objects to map.
param contactPersonNames is a list of contact PersonName objects.
return A FHIR formatted Practitioner object.

fun getQualifications (boardCertifications)

Gets the Qualifications with the provided list of Boar certifications

param boardCertifications is a list of HC boardCertifications to map.
return a list of Qualifications in FHIR format.

fun getCommunicationLangugaes (personLanguages)

Gets the communication languages with the provided list of person languages.

param personLanguages is a list of HC language to map.
return a list of communication languages in FHIR format.

fun getPractitionerNames (personNames)

Gets the Practitioner names in FHIR format with the provided list of HC PersonName objects.

param personNames is a list of HC PersonName objects.
return A list of FHIR formatted name objects.

fun getPractitionerCommunicationContactPoints (cp)

Gets the Practitioner communication contact point object for the provided contact point provided.

param cp is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.

fun getPractitionerIdentifiers (idTypeMap, ids)

Gets the Practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.

param idTypeMap is a map of HC Ids to FHIR identifier codes.
param ids is an array of HC identifier objects.
return An array of FHIR Identifier objects.

fun getPractitionerAddresses (addresses)

Get the Practitioner addresses form HC and returns an array of FHIR formatted Address objects.

param addresses is an array of HC addresses.
return An array of FHIR formatted Address objects.

fun getPractitionerContacts (contactAccounts, contactPersonNames)

Gets the Practitioner contact-contact relations as an array of FHIR objects.

param contactAccounts is an optional list of contact Account objects to map.
param contactPersonNames is a list of contact PersonName objects.
return An array of contact FHIR objects.

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.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

fun getPractitionerIdentifier (identifiers, idTypeMap)

Gets the practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.

param identifiers is an array of HC identifier objects.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
return An array of FHIR Identifier objects.

(back to top)

PractitionerRequest

This module defines functions needed to convert a
FHIR Practitioner resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/Practitioner/PractitionerRequest.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 getPractitionerAccount (fhirObj, recordTypeId)

Converts the provided Practitioner FHIR object to the HealthCloud Account object.

param fhirObj is a FHIR Practitioner object.
param recordTypeId is a String with the record type Id to use.
return A HealthCloud Account object.

fun getPractitionerIdentifier (method, accountId, identifierObj, idTypeIdMap)

Converts the provided Practitioner FHIR object to the HealthCloud Identifier object.

param method is a string with the method value.
param accountId is a string with the Account Id.
param identifierObj is a FHIR Practitioner identifier object.
param idTypeIdMap is a map with the Id type Ids to use.
return A HealthCloud Identifier object.

fun getPractitionerContact (fhirObj)

Converts the provided Practitioner FHIR object to the HealthCloud Contact object.

param fhirObj is a FHIR Practitioner object.
return A HealthCloud Contact object.

fun getPractitionerPersonName (fhirObj, accountId)

Converts the provided Practitioner FHIR object to the HealthCloud PersonName object list.

param fhirObj is a FHIR Practitioner object.
param accountId is a string with the Account Id.
return A HealthCloud PersonName object list.

fun getPractitionerContactPoint (telecom, accountId)

Converts the provided Practitioner FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of Practitioner telecom objects.
param accountId is a string with the Account Id.
return A HealthCloud ContactPoint object list.

fun getPractitionerContactPointAddress (fhirObj, accountId)

Converts the provided Practitioner FHIR object to the HealthCloud ContactPoint Address object list .

param fhirObj is a FHIR Practitioner object.
param accountId is a string with the Account Id.
return A HealthCloud ContactPoint Address object list.

fun getPractitionerPersonLanguage (fhirObj, accountId)

Converts the provided Practitioner FHIR object to the HealthCloud PersonLanguage object list.

param fhirObj is a FHIR Practitioner object.
param accountId is a string with the Account Id.
return A HealthCloud PersonLanguage object list.

fun getPractitionerContact (fhirObj)

Converts the provided Practitioner FHIR object to the HealthCloud Contact object.

param fhirObj is a FHIR Practitioner object.
return A HealthCloud Contact object.

fun formatName (obj)

Gets the trimmed concatenated name with the provided name object.

param obj is the name object to format.
return A formatted name string with 'First Last'.

fun getPractitionerHealthcareProvider (fhirObj, contactResp)

Converts the provided Practitioner FHIR object to the HealthCloud HealthcareProvider object.

param fhirObj is a FHIR Practitioner object.
param contactResp is contactResponse Object in the previous flows
return A HealthCloud HealthcareProvider object.

fun getBoardCertification (fhirObj, contactResp)

Converts the provided Practitioner FHIR object to the HealthCloud BoardCertification object.

param fhirObj is a FHIR Practitioner object.
param contactResp is contactResponse Object in the previous flows
return A HealthCloud BoardCertification object.

(back to top)

OrganizationFHIRTools

OrganizationFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/Organization/OrganizationFHIRTools.dwl

Functions

fun getOrganizationResponse (org: Object, idTypeMap, contactAccounts, contactPersonNames)

Gets the organization response object with the provided Organization object.

param org is a Healthcloud Organization object.
param idTypeMap is a Id type map to use.
param contactAccounts is a list of Contact accounts.
param contactPersonNames is a list of contact PersonName objects.
return A FHIR formatted Organization object.

fun getOrgContactsNames (personNames)

Gets the Organization Contacts names in FHIR format with the provided list of HC PersonName objects.

param personNames is a list of HC PersonName objects.
return A list of FHIR formatted name objects.

fun getOrgIdentifiers (identifiers, idTypeMap)

Gets the organization identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.

param identifier is an array of HC identifier objects.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
return An array of FHIR Identifier objects.

fun getOrgCommunicationContactPoints (contactPoints)

Gets the Organization communication contact point object for the provided contact point provided.

param contactPoints is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.

fun getOrgContactPointAddresses (addresses)

Get the Organization addresses form HC and returns an array of FHIR formatted Address objects.

param addresses is an array of HC addresses.
return An array of FHIR formatted Address objects.

fun getOrgContacts (contactAccounts, contactPersonNames)

Gets the organization account-contact relations as an array of FHIR objects.

param contactAccounts is an optional list of contact Account objects to map.
param contactPersonNames is a list of contact PersonName objects.
return An array of contact FHIR objects.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

OrganizationRequest

This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/Organization/OrganizationRequest.dwl

Functions

fun getOrganizationAccount (fhirObj)

Converts the provided Organization FHIR object to the HealthCloud Account object.

param fhirObj is a FHIR Organization object.
return A HealthCloud Account object.

fun getOrganizationIdentifier (method, identifierObj, idTypeIdMap)

Converts the provided Organization FHIR object to the HealthCloud Identifier object.

param method is a String with the HTTP method to use.
param identifierObj is a FHIR Organization identifier object.
param idTypeIdMap is a map with the Id type Ids to use.
return A HealthCloud Identifier object.

fun getOrganizationIdentifier (method, identifierObj, idTypeIdMap, accountId)

Converts the provided Organization FHIR object to the HealthCloud Identifier object.

param method is a String with the HTTP method to use.
param identifierObj is a FHIR Organization identifier object.
param idTypeIdMap is a map with the Id type Ids to use.
param accountId is a String with the Account Id to use.
return A HealthCloud Identifier object.

fun getOrganizationContactPointAddress (method, fhirObj)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization object.
return A HealthCloud ContactPoint Address object list.

fun getOrganizationContactPointAddress (method, fhirObj, accountId)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization object.
param accountId is a String with the Account Id to use.
return A HealthCloud ContactPoint Address object list.

fun getOrganizationContact (method, fhirObj)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization object.
return A HealthCloud ContactPoint object list.

fun getOrganizationContact (method, fhirObj, accountId)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization object.
param accountId is a String with the Account Id to use.
return A HealthCloud ContactPoint object list.

fun getOrganizationContactAccount (method, contactObj, recordType)

Converts the provided Organization FHIR object to the HealthCloud Contact object.

param method is a String with the HTTP method to use.
param contactObj is a FHIR Organization contact object.
param recordType is a person account type.
return A HealthCloud Contact object.

fun getContactsPersonName (method, fhirObj)

Converts the provided Organization FHIR object to the HealthCloud PersonName object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization contact object.
return A HealthCloud PersonName object list.

fun getContactsContactPointAddress (method, fhirObj)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint Address object list.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR Organization object.
return A HealthCloud ContactPoint Address object list.

fun getContactsContact (method, fhirObj)

Converts the provided Organization FHIR object to the HealthCloud ContactPoint object list.

param method is a String with the HTTP method to use.
param telecom is a list of Organization contacts telecom objects.
return A HealthCloud ContactPoint object list.

fun getAccountContactRelation (method, accountId, contactIds)

Converts the provided Organization FHIR object to the HealthCloud AccountContact Relation object list.

param method is a String with the HTTP method to use.
param accountId is Organization account Id.
param contactIds is organization contacts contact Ids.
return A HealthCloud ContactPoint object list.

(back to top)

encounterfhirtools

encounterFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/Encounter/encounterfhirtools.dwl

Functions

fun getEncounterResponse (encounterRLU)

Generates the FHIR response with the provided Encounter Object.

param encounterRLU is the Encounter object to map.
return A HealthCloud ClientEncounter response.

fun getLocation (locations)

Creates a list of location references with the provided location list.

param locations is a list of clinical encouter facilities.
return A list of location references.

fun getParticipant (participant)

Gets the Participant in FHIR format with the provided ClinicalEncounterProvider objects.

param participant is a list of HC ClinicalEncounterProvider objects.
return A list of FHIR formatted participant response.

fun getReasonCode (ReasonCodeIdCodeSetBundle)

Gets the reasonCode in FHIR format with the provided ClinicalEncounterReason objects.

param ReasonCodeIdCodeSetBundle is a list of HC CodeSetBundle objects related to reasonCode.
return A list of FHIR formatted reasonCode response.

fun getHospitalization (encounter)

Gets the hospitalization related data in FHIR format with the provided encounter objects.

param encounter is the ClinicalEncounterReason object.
return A list of FHIR formatted hospitalization 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.

(back to top)

encounterRequest

This module defines functions needed to convert a
FHIR Encounter resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/Encounter/encounterRequest.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 getEncounterUpsert (fhirObj, codeSetBundleList, create)

Converts the provided Encounter FHIR object to the HealthCloud Encounter object.

param fhirObj is a FHIR Encounter object.
param codeSetBundleList is the list of CodeSetBundle objects for the Encounter object
param create is a boolean with true for a create and false for an update.
return HealthCloud Encounter upsert fields.

fun getEncounterUpdate (fhirObj, codeSetBundleList, create)

Converts the provided Encounter FHIR object to the HealthCloud Encounter object.

param fhirObj is a FHIR Encounter object.
param codeSetBundleList is the list of CodeSetBundle objects for the Encounter object
param create is a boolean with true for a create and false for an update.
return HealthCloud Encounter update fields.

fun getCodeSetUpsert (codeSetList)

Converts the provided Encounter 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 Encounter FHIR object to the HealthCloud CodeSetBundle object.

param codeSetList is the list of CodeSetBundle object.
param bundleType is for defining the CodeSetBundle type.
param name is for defining the name of the CodeSetBundle.
return HealthCloud CodeSetBundle upsert fields.

fun getIdentifierUpsert (identifier, encounterId, typeId)

Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterIdentifier object.

param identifier is the list of ClinicalEncounterIdentifier object.
param encounterId is the associated encounter Id.
param typeId is a String with the Id type Id to set.
return HealthCloud ClinicalEncounterIdentifier upsert fields.

fun getParticipantUpsert (participant, encounterId)

Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterProvider object.

param participant is the list of ClinicalEncounterProvider object.
param encounterId is the associated encounter Id.
return HealthCloud ClinicalEncounterProvider upsert fields.

fun getLocationUpsert (location, encounterId)

Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterFacility object.

param location is the list of ClinicalEncounterFacility object.
param encounterId is the associated encounter Id.
return HealthCloud ClinicalEncounterFacility upsert fields.

fun getReasonCodeUpsert (reasonCode, encounterId)

Converts the provided Encounter FHIR object to the HealthCloud ClinicalEncounterReason object.

param reasonCode is the list of ClinicalEncounterReason object.
param encounterId is the associated encounter Id.
return HealthCloud ClinicalEncounterReason upsert fields.

(back to top)

PractitionerRoleFHIRTools

PractitionerRoleFHIRTools DataWeave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/PractitionerRole/PractitionerRoleFHIRTools.dwl

Functions

fun getPractitionerRoleResponse (prole: Object, careProviderFacilitySpecialty, practitioner, specialty, location, idTypeMap)

Generates the practitionerrole response object in FHIR format with the provided practitionerrole object queried from Health Cloud.

param prole is the PractitionerRole object to map.
param careProviderFacilitySpecialty is the care provider facility specialty.
param practitioner is a Practitioner object to map.
param specialty is a Specialty object to map.
param location is a Location object to map.
param idTypeMap is a map with the Id type Ids to use.
return A FHIR formatted PractitionerRole object.

fun getIdentifier (prole, idTypeMap)

Gets the practitionerrole identifiers and returns a list of FHIR Identifier objects.

param prole an array of HC Identifier objects.
param idTypeMap is a map with the Id type Ids to use.
return An array of FHIR Identifier objects.

fun getPractitioner (prole: Object, practitioner)

Gets the practitioner object with the provided practitionerrole object and returns null if not found.

param prole is the PractitionerRole object to map.
param practitioner is a Practitioner object.
return A FHIR formatted Practitioner object.

fun getLocation (prole: Object, location)

Gets the location object with the provided practitionerrole object and returns null if not found.

param prole is the PractitionerRole object to map.
param location is an array of HC Location objects.
return An array of FHIR formatted Location objects.

fun getCode (careProviderFacilitySpecialty)

Gets the code object with the provided practitionerrole object and returns null if not found.

param careProviderFacilitySpecialty is an array of HC Code objects.
return An array of FHIR formatted Code objects.

fun getspecialty (specialty)

Gets the specialty object with the provided practitionerrole object and returns null if not found.

param specialty is an array of HC Specialty objects.
return An array of FHIR formatted Specialty objects.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

(back to top)

PractitionerRoleRequest

This module defines functions needed to convert a
FHIR PractitionerRole resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/PractitionerRole/PractitionerRoleRequest.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 getPractitionerRoleAccount (fhirObj)

Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.

param fhirObj is a FHIR PractitionerRole healthcarePractitionerFacility object.
return A HealthCloud HealthcarePractitionerFacility object.

fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdMap)

Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR PractitionerRole identifier object.
return A HealthCloud Identifier object.

fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdMap, healthcareFacilityId)

Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.

param method is a String with the HTTP method to use.
param fhirObj is a FHIR PractitionerRole identifier object.
param idTypeIdMap is a map with the id types.
param healthcareFacilityId is a String with the HealthcareFacility Id.
return An object with a list of HealthCloud Identifier objects.

fun getCareProviderFacilitySpecialty (method, fhirObj)

Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.

param fhirObj is a FHIR PractitionerRole careProviderFacilitySpecialty object.
return A HealthCloud CareProviderFacilitySpecialty object.

fun getCareProviderFacilitySpecialty (method, fhirObj, healthcareFacilityId)

Converts the provided PractitionerRole FHIR object to the HealthCloud PractitionerRole object.

param method is a String with the method to use.
param fhirObj is a FHIR PractitionerRole careProviderFacilitySpecialty object.
param healthcareFacilityId is a String with the HealthcareFacility Id.
return An object with a list of HealthCloud CareProviderFacilitySpecialty objects.

(back to top)

RelatedPersonFHIRTools

RelatedPersonFHIRTools dataweave library contains functions
used for converting HealthCloud data into FHIR format.

Source: .src/main/resources/dwl/relatedperson/RelatedPersonFHIRTools.dwl

Functions

fun getRelatedPersonResponse (acc: Object, idTypeMap, personNames, personLanguages, contactAccountIds, contactContactRelations, relationRoleMap)

Generates the FHIR response with the provided Account and contact Accounts.

param acc is the Account object to map.
param idTypeMap is a map of HC Ids to FHIR identifier codes.
param personNames is an optional array of HC PersonName objects to map.
param personLanguages is a list of person languages to map.
param contactAccountIds is a list of contact account Ids to use a references.
param contactContactRelations is a list of contact relations to map.
param relationRoleMap is a map of relation roles to use.
return A FHIR formatted RelatedPerson object.

fun getRelatedPersonNames (personNames)

Gets the RelatedPerson names in FHIR format with the provided list of HC PersonName objects.

param personNames is a list of HC PersonName objects.
return A list of FHIR formatted name objects.

fun getRelatedPersonCommunicationContactPoints (cp)

Gets the RelatedPerson communication contact point object for the provided contact point provided.

param cp is a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.

fun getRelatedPersonIdentifiers (idTypeMap, ids)

Gets the RelatedPerson identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.

param idTypeMap is a map of HC Ids to FHIR identifier codes.
param ids is an array of HC identifier objects.
return An array of FHIR Identifier objects.

fun getRelatedPersonAddresses (addresses)

Get the RelatedPerson addresses form HC and returns an array of FHIR formatted Address objects.

param addresses is an array of HC addresses.
return An array of FHIR formatted Address objects.

fun getCommunicationLangugaes (personLanguages)

Maps the communication languages with the provided list of person languages.

param personLanguages is a list of languages to map.
return a FHIR formatted list of communication languages.

fun getLinkSelf (attr: Object)

Gets the URL to the current web resource.

param attr is an object with the attributes.
return A string with the self link.

fun getEntryUrl (item: Object, attr: Object)

Gets the URL for the entry provided.

param item is an object with the item that's being returned.
param attr is an object with the attributes.
return A string with the entry URL.

fun getRelatedPersonRelationRole (contactContactRelations, id, relationRoleMap)

Gets the relatedperson relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.

param contactContactRelations is a list of contact relation objects.
param id is a string with the account Id.
param relationRoleMap the role relationship map.
return A code for the relatedperson relation role.

fun getRelatedPersonRelationRoleRecord (contactContactRelations, id)

Gets the relatedperson relation role record with the provided list of contact relations and the Id.

param contactContactRelations is a list of contact relation objects.
param id is a string with the account Id.
return A Salesforce role Id for the provided data.

(back to top)

RelatedPersonRequest

This module defines functions needed to convert a
FHIR RelatedPerson resource into it's representation within
Health Cloud.

Source: .src/main/resources/dwl/relatedperson/RelatedPersonRequest.dwl

Functions

fun getRelatedPersonAccount (fhirObj, recordTypeId)

Converts the provided RelatedPerson FHIR object to the HealthCloud Account object.

param fhirObj is a FHIR RelatedPerson object.
param recordTypeId is a String with the record type Id to set.
return A HealthCloud Account object.

fun getRelatedPersonContact (fhirObj)

Converts the provided RelatedPerson FHIR object to the HealthCloud Contact object.

param fhirObj is a FHIR RelatedPerson object.
return A HealthCloud Contact object.

fun getRelatedPersonPersonName (fhirObj)

Converts the provided RelatedPerson FHIR object to the HealthCloud PersonName object list.

param fhirObj is a FHIR RelatedPerson object.
return A HealthCloud PersonName object list.

fun getRelatedPersonPersonName (fhirObj, accountId)

Converts the provided RelatedPerson FHIR object to the HealthCloud PersonName object list.

param fhirObj is a FHIR RelatedPerson object.
param accountId is a String with the Account Id.
return A HealthCloud PersonName object list.

fun getRelatedPersonContactPoint (telecom)

Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of RelatedPerson telecom objects.
return A HealthCloud ContactPoint object list.

fun getRelatedPersonContactPoint (telecom, accountId)

Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint object list.

param telecom is a list of RelatedPerson telecom objects.
param accountId is a String with the Account Id.
return A HealthCloud ContactPoint object list.

fun getRelatedPersonContactPointAddress (fhirObj)

Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint Address object list .

param fhirObj is a FHIR RelatedPerson object.
return A HealthCloud ContactPoint Address object list.

fun getRelatedPersonContactPointAddress (fhirObj, accountId)

Converts the provided RelatedPerson FHIR object to the HealthCloud ContactPoint Address object list .

param fhirObj is a FHIR RelatedPerson object.
param accountId is a String with the Account Id.
return A HealthCloud ContactPoint Address object list.

fun getRelatedPersonPersonLanguage (fhirObj)

Converts the provided RelatedPerson FHIR object to the HealthCloud PersonLanguage object list.

param fhirObj is a FHIR RelatedPerson object.
return A HealthCloud PersonLanguage object list.

fun getRelatedPersonPersonLanguage (fhirObj, accountId)

Converts the provided RelatedPerson FHIR object to the HealthCloud PersonLanguage object list.

param fhirObj is a FHIR RelatedPerson object.
param accountId is a String with the Account Id.
return A HealthCloud PersonLanguage object list.

fun getRelatedPersonContact (fhirObj)

Converts the provided RelatedPerson FHIR object to the HealthCloud Contact object.

param fhirObj is a FHIR Patient object.
return A HealthCloud Contact object.

fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdMap)

Converts the provided RelatedPerson FHIR object to the HealthCloud Identifier object.

param method is a string with the method to use.
param identifierObj is a FHIR Patient identifier object.
param idTypeIdMap is an object with the IdType code -> IdType Id from HealthCloud map.
return A HealthCloud Identifier object.

fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdMap, accountId)

Converts the provided RelatedPerson FHIR object to the HealthCloud Identifier object.

param method is a string with the method to use.
param identifierObj is a FHIR Patient identifier object.
param idTypeIdMap is an object with the IdType code -> IdType Id from HealthCloud map.
param accountId is a string with the Account Id.
return A HealthCloud Identifier object.

fun getRelatedPersontContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId)

Converts the provided Contact FHIR object to the HealthCloud RelatedPerson contact-to-contact relationship of composite request.

param method is a string with POST or PATCH.
param fhirObj is a FHIR Contact object.
param relationRoleMap the role relationship map.
param mainContactId is a string with the main Contact Id.
param contactId is a string with the Contact Id.
return A composite HealthCloud contact-to-contact relationship request.

(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
Published by
MuleSoft Organization
Published onDec 14, 2022
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.8