Transactions
The eMedication service exposes its own endpoints.
The transactions supported by these exposed endpoints can be classified as either belonging to the eMedication service content, that is, document-based (XDS or XDS-like transactions), or of a more infrastructure-like nature (e.g. PIX queries).
XDS and XDS-like transactions
Implemented transactions:
- publish documents: XDS ITI-41, MHD ITI-65
- retrieve documents XDS ITI-43, MHD ITI-68
- update (to request deletion only) document metadata: XDS ITI-57, MHD CH:MHD-1
- search documents XDS ITI-18, MHD ITI-67
- search pharmacy documents XDS CH:PHARM-1, MHD CH:PHARM-5
For details about documents (content and metadata), see the Documents page.
Generic rules about transactions
- In every transaction where a security token is required, the referenced patient has to match the same patient as the one in the XUA assertion.
- Patients are allowed to perform all types of transactions
- Healthcare Professionals are allowed to:
- Search documents (registry stored query XDS ITI-18) and MHD/PHARM equivalents,
- Retrieve document set (XDS ITI-43) and MHD equivalent,
- Provide and register document set (XDS ITI-41) and MHD equivalent,
- Update document set (XDS ITI-57) and MHD equivalent
- Healthcare Professionals cannot do anything related to APPC documents (Advanced Patient Privacy Consent).
- Technical User (TCU) can only provide and register document set (XDS ITI-41) (and MHD equivalent).
- Anything else denied.
Tip
MHD transactions, as profiled by CH EPR FHIR, are provided as an early-stage-support. Bugs and profile changes/improvements are to be expected and all feedback is welcome.
XDS vs. MHD
IHE provides different profiles, among which XDS and MHD make it possible to exchange documents:
XDS is the profile prescribed by the Swiss EPR ordinance, but MHD is simpler to implement, as it doesn’t require the complex XDS stack (SOAP, WSSE, MIME-Multipart, MTOM/XOP, ebRIM, and multi-depth XML), and relies on a lighter REST interface.
Even though the eMedication service now supports MHD transactions, it is also possible to use the MHD profile through a third party component named mobile access gateway. This component is not affiliated with this service, but referenced here for informational purposes.
Generic error codes
XDS error code | Details |
---|---|
XDSRegistryError | In case of business rule error, missing/invalid XUA (authentication errors), unexpected exception. |
XDSUnknownPatientId | If the patient ID is unknown (i.e. the patient has not registered), if the subjects is missing rights to preform the action (authorization errors). |
Other transactions
Besides the document-based transactions, other transactions are supported as part of the eMedication service.
- ITI-20: Record Audit Event (both syslog and FHIR feed options supported)
- ITI-44: Patient Identity Feed HL7 V3 and the PIXm equivalent ITI-83
- ITI-45: PIXV3 Query and the PIXm equivalent ITI-104
-
ATNA logs: ITI-20, [CH:ATC][chatc.md]
- PIX: PIXv3 ITI-45, PIXv3 ITI-44, PIXm ITI-83, PIXm ITI-104
Other links of interest
In addition to the XDS transactions implemented by the service, implementers may find it useful to check out the following profiles and transactions:
- Cross Enterprise User Assertion (XUA) profile, and the Provide X-User Assertion (XUA ITI-40) transaction.
- The XUA profile defines the format of assertions inserted in transactions, that contain information about the users and their roles.
- The ITI-40 transaction is used to obtain the assertions from an assertion provider.
- Healthcare Provider Directory (HPD) profile, and the Provider Information Query (HPD ITI-58) transaction.
- The HPD profile defines the management of healthcare provider information in a directory structure.
- The ITI-58 transaction can be used to lookup healthcare provider information from a healthcare provider directory.
- Audit Trail and Node Authentication (ATNA) profile, and the record audit event (ATNA ITI-20) transaction.
- The ATNA profile might be used by implementers to record audit events through the ITI-20 transaction.
The EPD-by-example github project provides guidance and examples about these transactions and others, especially: