Business Context > Business Rules
Business Rules
HALO SoFA attribute requirements
The following table provides business requirements for data attributes required to support Provenence resource creation in context of SmartApp launch by the EMR solution.
The Provenance resources include 4 Agents that describe role and type of the participants in the realization of use case.
| Metadata Element | Provenance.agent.type | who.reference.type | who.identifier.value | who.display |
|---|---|---|---|---|
| EMR_ID | composer | Device | EMR_ID | EMR System Name |
| LAUNCH_ID | assembler | Device | Launch_ID | SoFA |
| SMARTAPP_ID | assembler | Device | SmartApp_ID | SmartApID System Name |
| TENANT | author | Organization | ORG_ID | Organization Name |
| FHIR_USER | author | PractitionerRole | FHIR_USER | Practitioner Information |
Clinical Data Foundation (CDF) attribute requirements
Provenance.target has references to one or multiple FHIR resources created or updated as part of a FHIR interaction or HL7v2 conversion
Provenance.entity.what (an entity used in this activity) has a reference to or an identifier of an object or resource that was a source for this operation, e.g.
- For HL7v2 conversion, this might be a reference to an actual Binary that has the full HL7v2 message, or just a message identifier from MSH-10 (Message Control ID / message unique identifier), or both
- For FHIR contribution, this might be a reference to a source FHIR resource (in case it gets stored) or just a X-Request-ID, or both
- For decomposition of a FHIR Bundle into discrete resources, this might be a reference to a source FHIR Bundle (in case it gets stored) or just a X-Request-ID, or both
Provenance.agent.who (individual, device or organization that participated in the event)
For HL7v2 conversion, at least three agents:
- oh_hl7v2_to_fhir_adapter (or whatever we call this - might be an actual Device FHIR resource or just an identifier)
- MSH-3.2 (unique identifier representing the sending system)
- X-Gtwy-ID (unique identifier generated by APIM)
For FHIR, at least two agents:
- azp (unique identifier representing the Sending System, provided by OH, sourced from the OAG token)
- X-Gtwy-ID (unique identifier generated by OAG)
For each of these agents, we'll need to define a type, e.g. author, assembler, composer, performer, etc. (codes are defined at Valueset-provenance-agent-type - FHIR v4.0.1 but may be extended)
Provenance.entity.what System URIs - MSH-10
- MSH-10 (Message Control ID / message unique identifier)
- In acCDR, a unique identifier: MSH.3.1 (org OID) + MSH.10
- In MI, 99.999% of MSH.3.1 (org OID) + MSH.10 is unique but there are a few exceptions
- OCINet: The only time a message ID might not be unique from a site is when a linked report has been intentionally split into multiple messages (this is typically done because many downstream systems can't handle linked messages, so the site breaks them up)
- Since HL7 doesn’t strictly enforce uniqueness for the Message Control ID (as it’s mostly used for troubleshooting), some sites don’t bother making it unique in these scenarios
- In systems that support linking, we sometimes use the repeated Message Control ID (along with other identifiers) as an indicator that the reports are linked
- The same ID might also be reused during manual resends, for example, if something was corrected and resent
- In acCDR, a unique identifier: MSH.3.1 (org OID) + MSH.10
Provenance.entity.what System URIs - X-Request-ID
- X-Request-ID (optionally provided by a FHIR client as a unique identifier. If this value is not provided by the client, APIM (Azure API Manager) will generate a GUID prefixed by “APIM-”)
- For APIM generated GUID: replace “APIM-” prefix with “urn:uuid:” prefix and set system to "urn:ietf:rfc:3986"
- When provided by a client, it’s supposed to be a UUID
- Architecture team’s comment: It wouldn't be critical if there is a collision given that it's used to look up records, in the unlikely event that multiple records would match, it would be very easy to sort things out by using additional information (site, timestamp)
Provenance.agent.who System URIs
- MSH-3.2 (unique identifier representing the sending system)
- It’s always an OID: use it as is (with the “urn:oid:” prefix) and system = “urn:ietf:rfc:3986”
- azp (unique identifier for a Sending System, sourced from the OAG token and provided by OH)
- System URI: eHealth Ontario Portal is currently down for maintenance (Ontario Health ONEID Client ID)
- X-Gtwy-ID (unique identifier generated by APIM for HL7v2 and by OAG for FHIR)
- It’s always a GUID: use it as is (with the “urn:uuid:” prefix) and system = “urn:ietf:rfc:3986”