Skip to content

Commit

Permalink
[#40] Added remaining descriptions for added transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
dvribeira committed Nov 5, 2024
1 parent bcd1439 commit c4d5e5b
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 22 deletions.
38 changes: 22 additions & 16 deletions docs/endpoints.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
# Endpoints
This page lists the different endpoints available to use the e-medication service.

## Base EndPoint
## Base URL
| Environnement | Base URL |
| --- | --- |
| Integration | https://ws-pmp-int.cara.ch/pmp |
| Development | https://ws-pmp-dev.cara.ch/pmp |
| Integration | https://ws-pmp-int.cara.ch |
| Development | https://ws-pmp-dev.cara.ch |

## PIX EndPoints
| Transaction | Path | Documentation |
| --- | --- | --- |
|Patient Identity Feed HL7 V3 (ITI-44)|`/services/iti44`| [ITI-44](transactions/iti44.md). See also the [IHE documentation](https://profiles.ihe.net/ITI/TF/Volume2/ITI-44.html).|
|PIXV3 Query (ITI-45)|`/services/iti45`| [ITI-45](transactions/iti45.md). See also the [IHE documentation](https://profiles.ihe.net/ITI/TF/Volume2/ITI-45.html).|
|Patient Identity Feed HL7 V3 (ITI-44)|`/pmp/services/iti44`| [ITI-44](transactions/iti44.md). See also the [IHE documentation](https://profiles.ihe.net/ITI/TF/Volume2/ITI-44.html).|
|PIXV3 Query (ITI-45)|`/pmp/services/iti45`| [ITI-45](transactions/iti45.md). See also the [IHE documentation](https://profiles.ihe.net/ITI/TF/Volume2/ITI-45.html).|

## XDS EndPoints
[XDS transactions](https://profiles.ihe.net/ITI/TF/Volume1/ch-10.html) are available through the `/services` endpoint:
[XDS transactions](https://profiles.ihe.net/ITI/TF/Volume1/ch-10.html) are available through the `/pmp/services` endpoints:

| Transaction | Path | Documentation |
| --- | --- | --- |
|Registry Stored Query (ITI-18)|`/services/xds/iti18`| [ITI-18](transactions/iti18.md)|
|Provide and Register Document Set-b (ITI-41)|`/services/xds/iti41`| [ITI-41](transactions/iti41.md)|
|Retrieve Document Set (ITI-43)|`/services/xds/iti43`| [ITI-43](transactions/iti43.md)|
|Update Document Set (ITI-57)|`/services/xds/iti57`| [ITI-57](transactions/iti57.md)|
|Query Pharmacy Documents (CH:PHARM-1)|`/services/xds/chpharm1`| [CH:PHARM-1](transactions/chpharm1.md)|
|Registry Stored Query (ITI-18)|`/pmp/services/xds/iti18`| [ITI-18](transactions/iti18.md)|
|Provide and Register Document Set-b (ITI-41)|`/pmp/services/xds/iti41`| [ITI-41](transactions/iti41.md)|
|Retrieve Document Set (ITI-43)|`/pmp/services/xds/iti43`| [ITI-43](transactions/iti43.md)|
|Update Document Set (ITI-57)|`/pmp/services/xds/iti57`| [ITI-57](transactions/iti57.md)|
|Query Pharmacy Documents (CH:PHARM-1)|`/pmp/services/xds/chpharm1`| [CH:PHARM-1](transactions/chpharm1.md)|

## MHD EndPoints
[MHD transactions](https://profiles.ihe.net/ITI/MHD/index.html) are still a work in progress. They will be available through the `/fhir` and `/mhd` endPoints:

| Transaction | Path | Comment |
| --- | --- | --- |
| Provide Document Bundle (ITI-65)|`/fhir/`|REST equivalent to [ITI-41](transactions/iti41.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-65.html).|
| Retrieve Document (ITI-68)|`/mhd/iti68`|MHD equivalent to [ITI-43](transactions/iti43.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-68.html).|
| Find Document Lists (ITI-66)|`/mhd/list`|MHD equivalent to [ITI-18](transactions/iti18.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-66.html).|
| Find Document References (ITI-67)|`/mhd/DocumentReference`|MHD equivalent to [ITI-18](transactions/iti18.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-67.html).|
| CH:PHARM-5|`/mhd/chpharm5`|MHD equivalent to [CH:PHARM-1](transactions/chpharm1.md). See also [official documentation](https://www.ihe.net/uploadedFiles/Documents/Pharmacy/IHE_Pharmacy_Suppl_CMPD.pdf), § 3.2.|
| Provide Document Bundle (ITI-65)|`/pmp/fhir/`|REST equivalent to [ITI-41](transactions/iti41.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-65.html).|
| Retrieve Document (ITI-68)|`/pmp/mhd/iti68`|MHD equivalent to [ITI-43](transactions/iti43.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-68.html).|
| Find Document Lists (ITI-66)|`/pmp/mhd/list`|MHD equivalent to [ITI-18](transactions/iti18.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-66.html).|
| Find Document References (ITI-67)|`/pmp/mhd/DocumentReference`|MHD equivalent to [ITI-18](transactions/iti18.md). See also [official documentation](https://profiles.ihe.net/ITI/MHD/ITI-67.html).|
| CH:PHARM-5|`/pmp/mhd/chpharm5`|MHD equivalent to [CH:PHARM-1](transactions/chpharm1.md). See also [official documentation](https://www.ihe.net/uploadedFiles/Documents/Pharmacy/IHE_Pharmacy_Suppl_CMPD.pdf), § 3.2.|

## Audit Events
| Transaction | Path | Documentation |
| --- | --- | --- |
| Record Audit Event (syslog) | `:6514` | [ITI-20](transactions/iti20.md) |
| Audit Trail Consumption (CH ATC) | `/alpage/fhir/AuditEvent` | [CH ATC](transactions/chatc.md) |
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Welcome to the Integration Guide for the eMedication service of CARA's community
* [CH-EMED-EPR](emed/index.md): description of the eMedication [file format](https://build.fhir.org/ig/CARA-ch/ch-emed-epr/).
* [PMP-APPC](appc/index.md): description of the policy file format.
* [OIDs](oids.md): relevant OIDs to be used within the scope of the eMedication service.
* [Endpoints](endpoints.md): the eMedication service endpoints available to clients.

Other resources:

Expand Down
20 changes: 20 additions & 0 deletions docs/transactions/chatc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Audit Trail Consumption [CH ATC]

The eMedication service supports the retrieval of patient audit trail events, in FHIR format as specified by the [implementation guide](https://fhir.ch/ig/ch-atc/index.html), and in compliance with the [Supplement 2.2 to the Annex 5 of the EPR Act](https://www.bag.admin.ch/dam/bag/de/dokumente/nat-gesundheitsstrategien/strategie-ehealth/gesetzgebung-elektronisches-patientendossier/gesetze/Anhang_5_Ergaenzung_2.2_EPDV_EDI_20190624.pdf.download.pdf/Anhang%205%20Erg%C3%A4nzung%202.2%20der%20EPDV-EDI_Fassung%20vom%2024.%20Juni%202019.pdf) and itself based on IHE's Retrieve ATNA Audit Event [ITI-81] transaction as specified by the [Add RESTful ATNA (Query and Feed)](https://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_Suppl_RESTful-ATNA.pdf) supplement to IHE IT Infrastructure Technical Framework.

This transaction is implemented by the eMedication service as specified by the resources linked in the previous paragraph with the following particularities:

- All the query parameters defined by the IHE supplement are supported, but with the following limitations:
- `address` testing does not take into account modifiers, only case sensitive exact matches.
- `agent.identifier` testing does not take into account modifiers and is always case sensitive.
- `patient.identifier` testing is done without taking into account modifiers and it is always case sensitive. Matching does not additionally filter by type: it is assumed that if the identifier matches, that is good enough.
- `entity.identifier` testing is done without taking modifiers into account and it is always case sensitive. `OR` criteria for this parameter is not supported.
- `entity.type` testing is done without taking modifiers inot account and it is always case sensitive.
- `entity.role` testing is done without taking modifiers into account and it is always case sensitive.
- `source.identifier` testing is done without taking modifiers into account and it is always case sensitive. `OR` criteria for this parameter is not supported.
- `type` testing is done without taking modifiers into account and it is always case sensitive.
- `subtype` testing is done without taking modifiers into account and it is always case sensitive.
- `outcome` testing is done without taking modifiers into account and it is always case sensitive.
- The [FHIR standard parameters that apply to all resources](http://hl7.org/fhir/R4/search.html#all) (`_content`, `_id`, `_lastUpdated`) are not supported.
- [FHIR search parameters](http://hl7.org/fhir/R4/search.html#return) are not supported.

21 changes: 17 additions & 4 deletions docs/transactions/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Transactions

The eMedication service exposes its own endpoints.
The eMedication service exposes its own [endpoints](../endpoints.md).

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](https://profiles.ihe.net/ITI/TF/Volume1/ch-10.html) [ITI-18](https://profiles.ihe.net/ITI/TF/Volume2/ITI-18.html), [ITI-41](https://profiles.ihe.net/ITI/TF/Volume2/ITI-41.html), [ITI-43](https://profiles.ihe.net/ITI/TF/Volume2/ITI-43.html), [ITI-57](https://profiles.ihe.net/ITI/TF/Volume2/ITI-57.html) and [CH:PHARM-1](chpharm1.md). [MHD](https://profiles.ihe.net/ITI/MHD/index.html) equivalents are given here for information but are not supported yet by the eMedication service.

Expand All @@ -12,7 +16,7 @@ Implemented transactions are [XDS](https://profiles.ihe.net/ITI/TF/Volume1/ch-10

For details about documents (content and metadata), see the [Documents page](documents.md).

## Generic rules about transactions
### 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:
Expand All @@ -28,7 +32,7 @@ For details about documents (content and metadata), see the [Documents page](doc

MHD-equivalent transactions will be implemented in the future.

## XDS vs. MHD
### XDS vs. MHD
IHE provides different [profiles](https://profiles.ihe.net/ITI/TF/Volume1/index.html), among which XDS and MHD make it possible to exchange documents:

* [XDS (Cross Enterprise Document Sharing)](https://profiles.ihe.net/ITI/TF/Volume1/ch-10.html)
Expand All @@ -39,14 +43,23 @@ XDS is the profile prescribed by the [Swiss EPR ordinance](https://www.fedlex.ad
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](https://www.mobileaccessgateway.ch/). This component is not affiliated with this service, but referenced here for information purpose.


## Generic error codes
### 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](iti20.md)
- [ITI-44: Patient Identity Feed HL7 V3](iti44.md)
- [ITI-45: PIXV3 Query](iti45.md)
- [CH ATC: Audit Trail Consumption](chatc.md)

## Other links of interest
In addition to the [XDS](https://profiles.ihe.net/ITI/TF/Volume1/ch-10.html) transactions implemented by the service, implementers may find it useful to check out the following profiles and transactions:

* [Cross Enterprise User Assertion (XUA)](https://profiles.ihe.net/ITI/TF/Volume1/ch-13.html) profile, and the [Provide X-User Assertion (XUA ITI-40)](https://profiles.ihe.net/ITI/TF/Volume2/ITI-40.html#3.40) transaction.
Expand Down
14 changes: 14 additions & 0 deletions docs/transactions/iti20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Record Audit Event [ITI-20]

Audit events, as specified by IHE's [Audit Trail and Node Authentication (ATNA)](https://profiles.ihe.net/ITI/TF/Volume1/ch-9.html) profile, are required by the Swiss EPR regulations. To align with these, the eMedication service complies itself with these regulations and has its own an Audit Record Repository for all ATNA logs related to the service. Clients of the eMedication service __MUST__ record the necessary audit events during each transaction with the eMedication service by means of an [ITI-20 transaction](https://profiles.ihe.net/ITI/TF/Volume2/ITI-20.html) to the endpoint exposed by the eMedication service's Audit Record Repository (see the [endpoints page](../endpoints.md)).

## Recording audit events
The eMedication service supports only syslog messages. [RESTful ATNA](https://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_Suppl_RESTful-ATNA.pdf) support is foreseen but not available for the time being.

### Syslog Interaction
The eMedication service exposes a TCP port (see the [endpoints page](../endpoints.md)). This port accepts only two-way TLS connections and will process only syslog messages that comply with the [ITI-20 profile](https://profiles.ihe.net/ITI/TF/Volume2/ITI-20.html). All valid syslog messages, as per IHE's profile, are recorded in the eMedication Audit Record Repository.

Additionally, the Audit Record Repository will try to translate, if possible and as a best effort, all received audit messages to FHIR [AuditEvent](https://hl7.org/fhir/r4/auditevent.html) objects and more specifically, to [CH ATC](https://fhir.ch/ig/ch-atc/index.html) compliant `AuditEvent` objects. Note that it is the responsability of the systems recording audit events to generate complete and compliant messages as per the regulations and that the Audit Record Repository offers some basic transformations to help with CH ATC compliance as a nice-to-have extra on a best-effort basis and not as an obligation.

### RESTful ATNA Feed
Not supported yet.
27 changes: 26 additions & 1 deletion docs/transactions/iti44.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
todo
# Patient Identity Feed HL7 V3 [ITI-44]

The eMedication service exposes an [ITI-44](https://profiles.ihe.net/ITI/TF/Volume2/ITI-44.html) endpoint (see [endpoints](../endpoints.md)) that allows clients to register a patient in the eMedication's own PIX service.

The transaction follows the IHE profile specifications, with the following particularities:

- Only `Patient Registry Record Added` messages are supported.
- Swiss EPR restrictions to the `Patient Registry Record Added` message, as per the [Swiss National Extensions to the IHE Technical Framework](https://www.bag.admin.ch/dam/bag/de/dokumente/nat-gesundheitsstrategien/strategie-ehealth/gesetzgebung-elektronisches-patientendossier/gesetze/anhang_5_ergaenzung_1_epdv_edi_ausgabe_4.pdf.download.pdf/EPDV-EDI_Anhang_5_E1_DE_Ausgabe_4.pdf), section 1.7.
- [§ 1.7.1] Must contain the patient's EPR-SPID.
- [§ 1.7.1] Must contain an additional patient id to the EPR-SPID. In the context of the eMedication service, this can be for instance CARA's MPI-PID.
- [§ 1.7.1] No `religiousAffiliationCode` allowed.
- [§ 1.7.1] No `raceCode` allowed.
- [§ 1.7.1] No `ethnicGroupCode` allowed.
- [§ 1.7.1] No `personalRelationship` allowed.
- Note that different environments might use different OIDs for the assigning authorities. See the [OIDs page](../oids.md).
- Upon receiving the message, the eMedication service will act int he following manner:
- If the eMedication's PIX service recognizes the patient's EPR-SPID, the patient is already registered in the service and it will return an `OK` code with a detail stating that the registration existed already.
- If the patient is not currently registered in the eMedication service:
- If the patient has a PMP-PID registered in the CARA's MPI already, the eMedication service will create a new eMedication registration with this existing PMP-PID and return `OK` with proper detail.
- If the patient does not have a PMP-PID in CARA's MPI:
- If the patient is nevertheless registered in CARA's MPI, meaning it has a CARA MPI-PID, the eMedication service will assign a new PMP-PID to the patient, register it in CARA's MPI and create an eMedication registration for the patient with the associated PMP-PID. The response will have an `OK` code and proper detail.
- If the patient is not registered at all in CARA's MPI, the eMedication service will assign a new PMP-PID to the patient, the eMedication service will create a new registration for this patient in CARA's MPI with the associated PMP-PID and finally create an eMedication registration with the associated PMP-PID. The response will have an `OK` code with proper detail. Note that this is the only case in which the patient information conveyed with the `Patient Registry Record Added` message, other than the patient ids, will be used.

!!!

Please note that the enrollment process will not be completed until an [APPC](../appc/index.md) document has been provided after adding the patient to the eMedication PIX service. Clients shall not start an ITI-44 transaction unless they can provide an APPC document for the patient immediately after successfully finishing this PIX feed transaction.
19 changes: 18 additions & 1 deletion docs/transactions/iti45.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
todo
# PIXV3 Query [ITI-45]

The eMedication service exposes an [ITI-45](https://profiles.ihe.net/ITI/TF/Volume2/ITI-45.html) endpoint (see [endpoints](../endpoints.md)) that allows clients to query the service for patient ids of registered patients, that is, patients currently enrolled in the eMedication service.

This transaction follows IHE's specifications with the following particularities:

- The eMedication service recognizes 3 possible data sources for patient ids (see [OIDs](../oids.md) for actual values):
- CARA's assigning authority.
- The Swiss Central Compensation Office's assignign authority.
- The eMedication service's own assigning authority.

!!!warning

Please note that even though the PMP-PIDs are added and stored as well in CARA's MPI, clients are encouraged to query the eMedication PIX service to query for (or confirm) the PMP-PID. This is because CARA's MPI might contain PMP-PIDs for patients that are no longer enrolled in the eMedication service and while the eMedicaiton PIX service will no longer recognized such patient ids, CARA's PIX service will continue to return those.

!!!warning

A patient's enrollment in the eMedication service requires registration in its PIX service __as well as__ a valid [APPC](../appc/index.md) document.

0 comments on commit c4d5e5b

Please sign in to comment.