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 are XDS ITI-18, ITI-41, ITI-43, ITI-57 and CH:PHARM-1. MHD equivalents are given here for information but are not supported yet by the eMedication service.
- publish documents: XDS ITI-41, MHD ITI-65
- retrieve documents XDS ITI-43, MHD ITI-68
- update (to request deletion only) documents XDS ITI-57
- search documents XDS ITI-18, MHD ITI-66 and 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, 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:
- 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).
- Anything else denied.
Tip
MHD-equivalent transactions will be implemented in the future.
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 doesn’t support it yet, it is possible to use the MHD profile though a third party component named mobile access gateway. This component is not affiliated with this service, but referenced here for information purpose.
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
- ITI-44: Patient Identity Feed HL7 V3
- ITI-45: PIXV3 Query
- CH ATC: Audit Trail Consumption
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: