From 29577618484c7f4d4e8d2ca4d774ab42e758244e Mon Sep 17 00:00:00 2001 From: <> Date: Thu, 12 Oct 2023 06:43:52 +0000 Subject: [PATCH] Deployed 56df6c5 with MkDocs version: 1.5.3 --- sitemap.xml | 28 ++++++++++++++-------------- sitemap.xml.gz | Bin 313 -> 313 bytes transactions/index.html | 2 +- transactions/iti18/index.html | 2 +- transactions/iti41/index.html | 2 +- transactions/iti43/index.html | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sitemap.xml b/sitemap.xml index 9200c4e..0ff7489 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,72 +2,72 @@ https://qligier.github.io/cara-emed-ig/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/endpoints/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/appc/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/emed/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/auth/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/chpharm1/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/date_processing/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/documents/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/iti18/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/iti41/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/iti43/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/transactions/iti57/ - 2023-10-10 + 2023-10-12 daily https://qligier.github.io/cara-emed-ig/workflows/ - 2023-10-10 + 2023-10-12 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index bbe862fa5f37f6f057b136f9ec61a143ad8011e5..6cec3e2637981a7273e5ca78004342730b3ab173 100644 GIT binary patch literal 313 zcmV-90ml9xiwFp)l_zBa|8r?{Wo=<_E_iKh0M(YyPQ)M(#_#(S4fmGP)wpij?#(CA zvq3rwL<%fJt-ihNpO|_!F=Z~pOg_H+LNXKD!{=y<4+yB8?Fg%CQh*h1&{lTj<@u@H zkwd>}r(h6bk;E1|qGI%WO6Pg5P)8WK$I1msQK(cPy)|iFJ(7M?q&OQ~PnT$o6aCo* zlg-I!sUcKSM>V}w+EKv+FJXkC)RMOJEMDH_7)LksP2FruR+p?vl3Q;f6N+02#{j2( z;M#n(bkVs&(I2Wm@PQq?(>CJjNxAo8{m+^5>LFv`7P*LNXfQ8WK1G!mu~1&|FtWU; z2Oigx!_-|;`q1^? LWkNCI015yA$MBic literal 313 zcmV-90ml9xiwFn@UnOM%|8r?{Wo=<_E_iKh0M(YkYQr!LhVOlf;Ct+(-B?$W^tLD1 z&ck!mSS+z!%UQO!pVO9+od+Wp2H8Kq#fL${)$w!avk&lu*3_)z14;n32~s*9NZdqG@JH5cvKVuL>+TX&Z&fo_ zp;+eJV~5~*he3~T9Ia5&%Nz!1bL>PVX7lo{q%hdF*%sSfUKVjh%S~I@l$NH0lZSKD zO6 Transactions - CARA's eMedication IG
Skip to content

Transactions

The eMedication service exposes its own endpoints.

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.

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

Generic rules about transactions

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).

This page was updated 2023-10-04
\ No newline at end of file + Transactions - CARA's eMedication IG
Skip to content

Transactions

The eMedication service exposes its own endpoints.

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.

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

Generic rules about transactions

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

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 : * Get X-User Assertion and Provide X-User Assertion * Authenticate User * PIX Query


This page was updated 2023-10-12
\ No newline at end of file diff --git a/transactions/iti18/index.html b/transactions/iti18/index.html index e07c15e..5e7d3c0 100644 --- a/transactions/iti18/index.html +++ b/transactions/iti18/index.html @@ -1 +1 @@ - XDS: search documents (ITI-18) - CARA's eMedication IG
Skip to content

ITI-18

The ITI-18 (Registry Stored Query) transaction allows a Document Consumer to query a Document Registry, using Registry Stored Queries.

This transaction has been implemented in order to respect the Swiss EPR regulation. However, it is very generic, and CH:PHARM-1 should be favored, as it offers emedication-specific query parameters.

Stored queries

Generic rules

  • Folders option not supported
  • The only [association]https://profiles.ihe.net/ITI/TF/Volume3/ch-4.1.html#4.1.2.2) supported is RPLC (replace)
  • Documents with deletionStatus=deletionRequested are ignored

Common query parameters

  • $MetadataLevel: If present, the attribute shall equal to 1, as per Nationale Anpassungen der Integrationsprofile nach Artikel 5 Absatz 1 Buchstabe b EPDV-EDI.
  • $XDSDocumentEntryPatientId, $patientId: The patient XAD-PID.
  • homeCommunityId: If present, it shall be the eMedication service OID.

FindDocuments

This stored query allows to search for APPC and CH-EMED-EPR documents. CH-EMED-EPR documents could also be searched through the PHARM-1 transaction (it’s a specialized ITI-18 transaction).

When processing requests, the following rules are applied:

  • $XDSDocumentEntryClassCode: N/A
  • $XDSDocumentEntryTypeCode: N/A
  • $XDSDocumentEntryCreationTimeFrom: see dates processing.
  • $XDSDocumentEntryCreationTimeTo: see dates processing.
  • $XDSDocumentEntryServiceStartTimeFrom: not considered for APPC documents
  • $XDSDocumentEntryServiceStartTimeTo: not considered for APPC documents
  • $XDSDocumentEntryServiceStopTimeFrom: not considered for APPC documents
  • $XDSDocumentEntryServiceStopTimeTo: not considered for APPC documents
  • $XDSDocumentEntryFormatCode: N/A
  • $XDSDocumentEntryDocumentAvailability: if specified, anything else than Online will yield no result.

FindSubmissionSets

FindFolders

The response is empty, as folders are not implemented.

GetAll

The response won’t contain folders, as they’re not implemented.

GetDocuments

GetFolders

The response is empty, as folders are not implemented. A warning is added to the response.

GetAssociations

GetDocumentsAndAssociations

GetSubmissionSets

GetSubmissionSetAndContents

GetFolderAndContents

The response is empty, as folders are not implemented. A warning is added to the response.

GetFoldersForDocument

The response is empty, as folders are not implemented. A warning is added to the response.

GetRelatedDocuments

FindDocumentsByReferenceId

The response is empty, as this option is not implemented. A warning is added to the response.

Error codes

Specific codes not covered by generic codes.

XDS error code Details
XDSStoredQueryMissingParam If a required search parameter is missing
XDSStoredQueryParamNumber If too many/too much search parameters are provided
XDSUnknownStoredQuery If the search query is unknown
XDSRegistryError If the search query is known but unsupported
XDSRegistryMetadataError If $MetadataLevel is not “1”

This page was updated 2023-10-04
\ No newline at end of file + XDS: search documents (ITI-18) - CARA's eMedication IG
Skip to content

ITI-18

The ITI-18 (Registry Stored Query) transaction allows a Document Consumer to query a Document Registry, using Registry Stored Queries.

This transaction has been implemented in order to respect the Swiss EPR regulation. However, it is very generic, and CH:PHARM-1 should be favored, as it offers emedication-specific query parameters.

See also EPD by example’s Registry Stored Query page.

Stored queries

Generic rules

  • Folders option not supported
  • The only [association]https://profiles.ihe.net/ITI/TF/Volume3/ch-4.1.html#4.1.2.2) supported is RPLC (replace)
  • Documents with deletionStatus=deletionRequested are ignored

Common query parameters

  • $MetadataLevel: If present, the attribute shall equal to 1, as per Nationale Anpassungen der Integrationsprofile nach Artikel 5 Absatz 1 Buchstabe b EPDV-EDI.
  • $XDSDocumentEntryPatientId, $patientId: The patient XAD-PID.
  • homeCommunityId: If present, it shall be the eMedication service OID.

FindDocuments

This stored query allows to search for APPC and CH-EMED-EPR documents. CH-EMED-EPR documents could also be searched through the PHARM-1 transaction (it’s a specialized ITI-18 transaction).

When processing requests, the following rules are applied:

  • $XDSDocumentEntryClassCode: N/A
  • $XDSDocumentEntryTypeCode: N/A
  • $XDSDocumentEntryCreationTimeFrom: see dates processing.
  • $XDSDocumentEntryCreationTimeTo: see dates processing.
  • $XDSDocumentEntryServiceStartTimeFrom: not considered for APPC documents
  • $XDSDocumentEntryServiceStartTimeTo: not considered for APPC documents
  • $XDSDocumentEntryServiceStopTimeFrom: not considered for APPC documents
  • $XDSDocumentEntryServiceStopTimeTo: not considered for APPC documents
  • $XDSDocumentEntryFormatCode: N/A
  • $XDSDocumentEntryDocumentAvailability: if specified, anything else than Online will yield no result.

FindSubmissionSets

FindFolders

The response is empty, as folders are not implemented.

GetAll

The response won’t contain folders, as they’re not implemented.

GetDocuments

GetFolders

The response is empty, as folders are not implemented. A warning is added to the response.

GetAssociations

GetDocumentsAndAssociations

GetSubmissionSets

GetSubmissionSetAndContents

GetFolderAndContents

The response is empty, as folders are not implemented. A warning is added to the response.

GetFoldersForDocument

The response is empty, as folders are not implemented. A warning is added to the response.

GetRelatedDocuments

FindDocumentsByReferenceId

The response is empty, as this option is not implemented. A warning is added to the response.

Error codes

Specific codes not covered by generic codes.

XDS error code Details
XDSStoredQueryMissingParam If a required search parameter is missing
XDSStoredQueryParamNumber If too many/too much search parameters are provided
XDSUnknownStoredQuery If the search query is unknown
XDSRegistryError If the search query is known but unsupported
XDSRegistryMetadataError If $MetadataLevel is not “1”

This page was updated 2023-10-12
\ No newline at end of file diff --git a/transactions/iti41/index.html b/transactions/iti41/index.html index bb77f03..602edd9 100644 --- a/transactions/iti41/index.html +++ b/transactions/iti41/index.html @@ -1 +1 @@ - XDS: publish documents (ITI-41) - CARA's eMedication IG
Skip to content

ITI-41

The ITI-41 (Provide and Register Document Set-b) transaction allows a content sender to send documents to the eMedication service (content receiver).

Generic DocumentEntry metadata are described in the documents section. This page references additional constraints specific to ITI-41. See also IHE’s documentation for metadata in Document Sharing profiles.

Publishing documents

Document types

Two types of documents might be published to the service : - CH-EMED-EPR documents (MTP, PRE, DIS and PADV only, PML and PMLC can only be retrieved from the service and not published to it). These documents contain the eMedication data. See also the corresponding page in this guide. - APPC (Advanced Patient Privacy Consent) documents. These documents are used to let patients define access rights to their data (who can publish and retrieve their data). See also the corresponding page in this guide.

SubmissionSet and relations

The eMedication service does not support folders and can only receive ONE document at a time. Hence, the metadata must always contain a SubmissionSet with a single DocumentEntry.

Only the following associations are supported :

Association Type Usage
urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember To link a DocumentEntry to the SubmissionSet.
urn:ihe:iti:2007:AssociationType:RPLC To replace a previously published document. Replaced document becomes deprecated.

Uniqueness

Documents can be sent to the eMedication service only once. Uniqueness is checked against DocumentEntry’s unique Id, that must be an UUID and DocumentEntry’s entryUUID.

Metadata

This section describes the rules applicable for any document’s type metadata.

SubmissionSet metadata

See also the SubmissionSet Metadata Attributes diagram.

Metadata Opt Rules
uniqueId R Must be a UUID. Can be used only once and must be globally unique.
author R Multiple values accepted.
author.authorRole R Possible values are defined in ch-epr-term IG. For APPC, only PAT (patient) and REP (Representative) are allowed.
author.authorSpecialty O Possible values are defined in ch-epr-term IG.
availabilityStatus O The value set in the metadata is always ignored, and replaced by approved.
comments O -
contentTypeCode R Possible values are defined in ch-epr-term IG. Use application/fhir+json or application/fhir+xml for CH-EMED-EPR documents, and text/xml for APPC.
entryUUID R Must be globally unique.
homeCommunityId O Not used. Can be left blank or omitted.
intendedRecipient O Not used. Can be left blank or omitted.
limitedMetadata O Must be left bank or omitted.
patientId R Must be a XAD-PID.
sourceId R Globally unique and immutable OID identifier of the source.
submissionTime R HL7 DTM value in UTC.
title O -

DocumentEntry metadata

See also the DocumentEntry Metadata Attributes diagram.

Metadata Opt Rules
author.authorRole R Possible values are defined in ch-epr-term IG. For APPC, only PAT (patient) and REP (Representative) are allowed. Must be aligned with document content author (see below).
author.authorSpecialty O Possible values are defined in ch-epr-term IG. Must be aligned with document content author (see below).
availabilityStatus O The value set in the metadata is always ignored, and replaced by approved.
classCode R See CH-EMED-EPR and APPC sections below.
comments O -
confidentialityCode R Confidentiality level in the DocumentEntry metadata is forced to Normal.
creationTime R HL7 DTM value in UTC. Must match document content creation time (see below).
deletionStatus O If present, deletionStatus must be urn:e-health-suisse:2019:deletionStatus:deletionNotRequested.
documentAvailability O If present should be Online.
entryUUID R Must be globally unique.
eventCodeList O See the list of available codes.
formatCode R See CH-EMED-EPR and APPC sections below.
hash O Hash of the document content.
healthcareFacilityTypeCode R See the list of available codes.
homeCommunityId O -
languageCode R See the list of available codes.
legalAuthenticator O -
limitedMetadata O Must be left bank or omitted.
logicalId O Shall be present when replacing a document.
mimeType O Possible values are defined ch-epr-term IG. Use application/fhir+json or application/fhir+xml for CH-EMED-EPR documents, and text/xml for APPC.
objectType R Value is ignored and set to Stable.
patientId R Must match SubmissionSet.patientId and be a XAD-PID (see above).
practiceSettingCode R See the list of available codes.
referenceIdList O Must be omitted or empty as referencing external documents is not permitted (see Referencing external documents section).
repositoryUniqueId O If the attribute repositoryUniqueId is present and does not correspond to the repositoryUniqueId containing the documents the request is refused.
serviceStartTime O Given as an HL7 DTM in UTC. Shall be empty for APPC
serviceStopTime O Given as an HL7 DTM in UTC. Shall be empty for APPC
size O -
sourcePatientId R Any id known or unknown to the local MPI. EPR-SPID and SSN are forbidden.
sourcePatientInfo O Ignored by the service.
title R -
typeCode R See section below.
uniqueId R Must be globally unique and be a UUID. Must match the document id in the case of CH-EMED-EPR documents.
URI O -
version O If present shall be empty, the value is ignored and set by the document registry.

Publishing a CH-EMED-EPR document

This section details the specific rules to follow when publishing CH-EMED-EPR documents.

Only MTP, PRE, DIS and PADV docs can be published. PML and PMLC can only be retrieved from the service.

Referencing external documents

When publishing CH-EMED-EPR documents, all references (from the key elements) shall be known to the eMedication service. All non-key elements are ignored by the eMedication service.

This implies that the metadata cannot contain Reference ids. This option is not supported, and submission of a reference to an existing document is forbidden.

Creation times

Creation time of a document must be equal or greater than the creation time of the last document of the treatment chain, ie. the last published document targeting the treatment (either the original MTP if no other document, or the last document published referencing this treatment).

  • Creation time of the document has to be in the past.
  • All references to other documents or items have to refer to existing approved non deleted documents.

Rules for each type of document

MTP

PRE

  • Each PRE item should refer to an MTP item (CHEMEDEPRMedicationRequest.treatmentplan) that must:
    • Exist (has already been published, and never deleted)
    • Be approved, ie. DocumentEntry.availabilityStatus = approved,
    • Preferably be valid, i.e. the submission date should be within the MTP dosage’s boundsPeriod (CHEMEDEPRDosage.repeat.bounds).
      • If the boundsPeriod is not defined, the entry is considered to be always active.
      • If only a startDate is specified, the MTP is considered to be active if the current date is after that date.
    • Active, ie. CHEMEDEPRDocumentMedicationTreatmentPlan.CHEMEDEPRMedicationStatement.status = active
    • For the same patient.
  • Code of medication should match the code of medication of the MTP referenced by the PRE (CHEMEDEPRMedicationRequest.treatmentplan). This rule is not enforced and might be extended in the future.
  • If lot number (CHEMEDEPRMedication.batch) is specified in referenced MTP, the one in the PRE (CHEMEDEPRMedicationRequest.medication[x]:medicationReference.batch) should match it. This rule is not enforced and might be extended in the future.

PADV

PADV against a provisional PRE

A “provisional PRE” is a prescription for which the CHEMEDEPRMedicationRequest.status is SUBMITTED or PROVISIONAL and for which a PADV OK has not been completed yet.

  • Medication cannot be changed. This rule is not enforced and might be extended in the future.
  • Dosage instructions cannot be changed. This rule is not enforced and might be extended in the future.
  • Substitution cannot be disallowed if the existing dispense includes one. This rule is not enforced and might be extended in the future.
  • Observation code REFUSE cannot be issued.
PADV CANCEL
  • Sets status to CANCELED.
  • Not allowed against DIS or other PADV documents.
Against MTP
  • Also set related prescriptions’ status to CANCELED if their status was not already REFUSED or CANCELED.
  • Treatment plan status must be ACTIVE or SUSPENDED.
Against PRE
  • Not allowed for prescriptions whose status is already CANCELED or REFUSED.
  • Not allowed to target anything else than MTP or PRE
PADV OK
  • Sets targeted MTP or PRE status to ACTIVE.
  • Against MTP: only allowed for treatment plans with status ACTIVE or SUSPENDED.
  • Against PRE: only allowed for prescriptions with status SUBMITTED or PROVISIONAL.
  • PADV OK cannot target anything else than MTP or PRE.
PADV CHANGE
  • Changes the treatment plan or prescription.
  • Can only target MTP or PRE.
Against MTP
  • The treatment status must be ACTIVE or SUSPENDED.
  • The treatment must not have been prescribed.
  • Additionally, the treatment’s status is set to ACTIVE as a result of the aggregation.
Against PRE
  • The prescription’s status must not be CANCELED or REFUSED.
  • If the prescription’s status is SUBMITTED, the aggregation sets it to ACTIVE as a result.
PADV REFUSE
  • Sets status to REFUSED.
Against MTP
  • Sets also related prescriptions’ status to REFUSED if the status was not already REFUSED or CANCELED.
  • Treatment’s status must be ACTIVE or SUSPENDED.
Against PRE
  • The prescription’s status must not be REFUSED, CANCELED or PROVISIONAL.
  • Cannot target anything else than MTP or PRE.
PADV SUSPEND
  • Sets status to SUSPENDED
  • Only allowed to target MTP entries
  • The treatment status must be ACTIVE
PADV COMMENT:
  • Can target MTP, PRE and DIS entries only.

DIS

DIS against MTP or PRE + MTP:
  • Medication should not be different if substitution is not allowed by PRE. This rule might be extended in the future.
  • Dispense should not occur after the end of validity of the PRE document. This rule might be extended in the future.
  • Dispense should not occur after the end of the treatment if specified in the prescription item. This rule might be extended in the future.
  • If referenced PRE is not provisional, it should be dispensable (that is have status either PROVISIONAL or ACTIVE). This rule is not enforced and might be extended in the future.
  • List of active ingredients should be the same than the one in the referenced PRE (prescription). This rule is not enforced and might be extended in the future.
  • If the treatment has been prescribed (at least one PRE document has been successfully submitted for it), then any DIS document targeting this treatment must reference one of its prescriptions as well.

Roles

  • Patients and their representatives are allowed to publish only the following type of docs:
    • MTP
    • PADV with a COMMENT observation code with no restriction.
    • PADV with any other observation code only when referencing a document published by the same patient or a representative of the same patient.
  • Healthcare professionals are allowed to publish only the following types of docs:
    • MTP
    • PRE
    • DIS
    • PADV

Metadata values check

Some values from the DocumentEntry are checked against the document (values in metadata and document must be equal):

DocumentEntry CH-EMED-EPR
author Composition.author
classCode Composition.type. Must be consistent with the document type (see below)
creationTime Composition.date
formatCode Must be consistent with the document type (see below)
languageCode Composition.language
mimeType application/fhir+xml or application/fhir+json
typeCode Must be consistent with the document type (see below)
uniqueId Bundle.identifier.value and Composition.identifier.value

ClassCode metadata to use for each document type

Document type DocumentEntry.classCode DocumentEntry.formatCode DocumentEntry.typeCode
MTP 440545006 Prescription record urn:che:epr:ch-emed:mtp:2022 761931002 Medication treatment plan report (record artifact)
PRE 440545006 Prescription record urn:che:epr:ch-emed:pre:2022 761938008 Medicinal Prescription record (record artifact)
DIS 440545006 Prescription record urn:che:epr:ch-emed:dis:2022 294121000195110 Medication dispense document (record artifact)
PADV 440545006 Prescription record urn:che:epr:ch-emed:padv:2022 419891008 Record artifact
PML 422735006 Summary clinical document urn:che:epr:ch-emed:pml:2022 721912009 Medication summary document
PMLC 422735006 Summary clinical document urn:che:epr:ch-emed:medication-card:2022 736378000 Medication management plan (record artifact)

The class and type codes are from the SNOMED CT system: 2.16.840.1.113883.6.96. The system for the formatCode is 2.16.756.5.30.1.127.3.10.10

Replacing a CH-EMED-EPR document

The following rules must be observed when replacing a document :

  • Patients and their representatives can only replace a document published by the same patient.
    • representatives are not supported by the service yet.
  • Healthcare professionals (HCP) can only replace a document published by himself or by another HCP of same community of affiliation.
    • Current implementation: an HCP can replace a document published by any other HCP. Further rules and possible implementations are under discussion.
  • Document administrator may only replace a document published by an HCP of the same community of affiliation.
    • Not implemented in PMP, to be discussed, for now a document admin can replace any document.
  • Replacing and replaced documents have to be of the same type (e.g. both MTP documents).
  • Replacing and replaced documents have to refer to the same patient.
  • Only documents at the end of a treatment chain can be replaced.
  • Replaced document must exist in the repository.
  • A replacement document must can be linked only to elements of the same medication chain. In case a PRE document is replaced, it may be linked only to elements of the medication chain of the referenced MTP.
  • Document administrator can replace any document regardless of who published it.
  • Replaced document must be approved (although this is always the case after an initial ITI-41 transaction, documents might become deprecated after another ITI-41 transaction with a replacement association).
  • Replaced document must not have deletionStatus = deletionRequested (this is relevant since although it is not the case at the moment with the current implementation, there might be files in the repository flagged for deletion but not deleted yet).

Publishing a PMP-APPC document

This section details the rules applicable to metadata when publishing APPC documents.

Rules for APPC:

  • Only Patients and their representatives or policy administrators can publish a new APPC document.
    • representatives are not supported by the service yet.
  • Only Patients and their representatives can replace their own APPC documents (if it exists).
    • representatives are not supported by the service yet.
  • Policy administrators of the reference community of the patient can replace any existing APPC document.
  • No APPC for the specified patient exists in the system (unless the published document is a replacement), otherwise the document is refused.
  • As for CH-EMED-EPR, APPC documents to be replaced must:
    • Be approved (as before, this is always the case for documents in the PMP repository when they are published, but their status might change to deprecated after a replacement).
    • Not have deletionStatus = deletionRequested.
  • APPC document structure is described in Implementation Guide for eMedication architecture in the context of the EPR, section ยง7.5
    • 1 Description section for free text description of the policy set
    • 1 Target section containing:
      • 1 Resources section containing 1 Resource object pointing to the patient by indicating the EPR-SPID.
      • * Subjects sections each one containing themselves Subject entries each defining 1 “who”. Subject cannot be the patient.
      • * Environments sections each one containing one Environment object limiting the validity period of the policy.
        • Required if at least one Subject refers to an organization or group.
          • Specs state “This section will not be used within this context.”
      • A list of PolicyIdReference or PolicySetIdReference defining the level of access granted to the users identified by the Subjects section.
        • See 7.5 for the list of policies that can be used.
      • * embedded PolicySet sections containing:
        • 1..* Subjects sections containing themselves Subject entries and each defines one “who”.
        • * Environments (same as above)

APPC metadata

DocumentEntry APPC
classCode 371537001 Consent report (record artifact)
formatCode urn:ihe:iti:appc:2016:consent
mimeType text/xml
serviceStartTime None
serviceStopTime None
typeCode 419891008 Record artifact

This page was updated 2023-10-05
\ No newline at end of file + XDS: publish documents (ITI-41) - CARA's eMedication IG
Skip to content

ITI-41

The ITI-41 (Provide and Register Document Set-b) transaction allows a content sender to send documents to the eMedication service (content receiver).

Generic DocumentEntry metadata are described in the documents section. This page references additional constraints specific to ITI-41.

See also IHE’s documentation for metadata in Document Sharing profiles as well as EPD by example’s Provide and Register Document Set page.

Publishing documents

Document types

Two types of documents might be published to the service : - CH-EMED-EPR documents (MTP, PRE, DIS and PADV only, PML and PMLC can only be retrieved from the service and not published to it). These documents contain the eMedication data. See also the corresponding page in this guide. - APPC (Advanced Patient Privacy Consent) documents. These documents are used to let patients define access rights to their data (who can publish and retrieve their data). See also the corresponding page in this guide.

SubmissionSet and relations

The eMedication service does not support folders and can only receive ONE document at a time. Hence, the metadata must always contain a SubmissionSet with a single DocumentEntry.

Only the following associations are supported :

Association Type Usage
urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember To link a DocumentEntry to the SubmissionSet.
urn:ihe:iti:2007:AssociationType:RPLC To replace a previously published document. Replaced document becomes deprecated.

Uniqueness

Documents can be sent to the eMedication service only once. Uniqueness is checked against DocumentEntry’s unique Id, that must be an UUID and DocumentEntry’s entryUUID.

Metadata

This section describes the rules applicable for any document’s type metadata.

SubmissionSet metadata

See also the SubmissionSet Metadata Attributes diagram.

Metadata Opt Rules
uniqueId R Must be a UUID. Can be used only once and must be globally unique.
author R Multiple values accepted.
author.authorRole R Possible values are defined in ch-epr-term IG. For APPC, only PAT (patient) and REP (Representative) are allowed.
author.authorSpecialty O Possible values are defined in ch-epr-term IG.
availabilityStatus O The value set in the metadata is always ignored, and replaced by approved.
comments O -
contentTypeCode R Possible values are defined in ch-epr-term IG. Use application/fhir+json or application/fhir+xml for CH-EMED-EPR documents, and text/xml for APPC.
entryUUID R Must be globally unique.
homeCommunityId O Not used. Can be left blank or omitted.
intendedRecipient O Not used. Can be left blank or omitted.
limitedMetadata O Must be left bank or omitted.
patientId R Must be a XAD-PID.
sourceId R Globally unique and immutable OID identifier of the source.
submissionTime R HL7 DTM value in UTC.
title O -

DocumentEntry metadata

See also the DocumentEntry Metadata Attributes diagram.

Metadata Opt Rules
author.authorRole R Possible values are defined in ch-epr-term IG. For APPC, only PAT (patient) and REP (Representative) are allowed. Must be aligned with document content author (see below).
author.authorSpecialty O Possible values are defined in ch-epr-term IG. Must be aligned with document content author (see below).
availabilityStatus O The value set in the metadata is always ignored, and replaced by approved.
classCode R See CH-EMED-EPR and APPC sections below.
comments O -
confidentialityCode R Confidentiality level in the DocumentEntry metadata is forced to Normal.
creationTime R HL7 DTM value in UTC. Must match document content creation time (see below).
deletionStatus O If present, deletionStatus must be urn:e-health-suisse:2019:deletionStatus:deletionNotRequested.
documentAvailability O If present should be Online.
entryUUID R Must be globally unique.
eventCodeList O See the list of available codes.
formatCode R See CH-EMED-EPR and APPC sections below.
hash O Hash of the document content.
healthcareFacilityTypeCode R See the list of available codes.
homeCommunityId O -
languageCode R See the list of available codes.
legalAuthenticator O -
limitedMetadata O Must be left bank or omitted.
logicalId O Shall be present when replacing a document.
mimeType O Possible values are defined ch-epr-term IG. Use application/fhir+json or application/fhir+xml for CH-EMED-EPR documents, and text/xml for APPC.
objectType R Value is ignored and set to Stable.
patientId R Must match SubmissionSet.patientId and be a XAD-PID (see above).
practiceSettingCode R See the list of available codes.
referenceIdList O Must be omitted or empty as referencing external documents is not permitted (see Referencing external documents section).
repositoryUniqueId O If the attribute repositoryUniqueId is present and does not correspond to the repositoryUniqueId containing the documents the request is refused.
serviceStartTime O Given as an HL7 DTM in UTC. Shall be empty for APPC
serviceStopTime O Given as an HL7 DTM in UTC. Shall be empty for APPC
size O -
sourcePatientId R Any id known or unknown to the local MPI. EPR-SPID and SSN are forbidden.
sourcePatientInfo O Ignored by the service.
title R -
typeCode R See section below.
uniqueId R Must be globally unique and be a UUID. Must match the document id in the case of CH-EMED-EPR documents.
URI O -
version O If present shall be empty, the value is ignored and set by the document registry.

Publishing a CH-EMED-EPR document

This section details the specific rules to follow when publishing CH-EMED-EPR documents.

Only MTP, PRE, DIS and PADV docs can be published. PML and PMLC can only be retrieved from the service.

Referencing external documents

When publishing CH-EMED-EPR documents, all references (from the key elements) shall be known to the eMedication service. All non-key elements are ignored by the eMedication service.

This implies that the metadata cannot contain Reference ids. This option is not supported, and submission of a reference to an existing document is forbidden.

Creation times

Creation time of a document must be equal or greater than the creation time of the last document of the treatment chain, ie. the last published document targeting the treatment (either the original MTP if no other document, or the last document published referencing this treatment).

  • Creation time of the document has to be in the past.
  • All references to other documents or items have to refer to existing approved non deleted documents.

Rules for each type of document

MTP

PRE

  • Each PRE item should refer to an MTP item (CHEMEDEPRMedicationRequest.treatmentplan) that must:
    • Exist (has already been published, and never deleted)
    • Be approved, ie. DocumentEntry.availabilityStatus = approved,
    • Preferably be valid, i.e. the submission date should be within the MTP dosage’s boundsPeriod (CHEMEDEPRDosage.repeat.bounds).
      • If the boundsPeriod is not defined, the entry is considered to be always active.
      • If only a startDate is specified, the MTP is considered to be active if the current date is after that date.
    • Active, ie. CHEMEDEPRDocumentMedicationTreatmentPlan.CHEMEDEPRMedicationStatement.status = active
    • For the same patient.
  • Code of medication should match the code of medication of the MTP referenced by the PRE (CHEMEDEPRMedicationRequest.treatmentplan). This rule is not enforced and might be extended in the future.
  • If lot number (CHEMEDEPRMedication.batch) is specified in referenced MTP, the one in the PRE (CHEMEDEPRMedicationRequest.medication[x]:medicationReference.batch) should match it. This rule is not enforced and might be extended in the future.

PADV

PADV against a provisional PRE

A “provisional PRE” is a prescription for which the CHEMEDEPRMedicationRequest.status is SUBMITTED or PROVISIONAL and for which a PADV OK has not been completed yet.

  • Medication cannot be changed. This rule is not enforced and might be extended in the future.
  • Dosage instructions cannot be changed. This rule is not enforced and might be extended in the future.
  • Substitution cannot be disallowed if the existing dispense includes one. This rule is not enforced and might be extended in the future.
  • Observation code REFUSE cannot be issued.
PADV CANCEL
  • Sets status to CANCELED.
  • Not allowed against DIS or other PADV documents.
Against MTP
  • Also set related prescriptions’ status to CANCELED if their status was not already REFUSED or CANCELED.
  • Treatment plan status must be ACTIVE or SUSPENDED.
Against PRE
  • Not allowed for prescriptions whose status is already CANCELED or REFUSED.
  • Not allowed to target anything else than MTP or PRE
PADV OK
  • Sets targeted MTP or PRE status to ACTIVE.
  • Against MTP: only allowed for treatment plans with status ACTIVE or SUSPENDED.
  • Against PRE: only allowed for prescriptions with status SUBMITTED or PROVISIONAL.
  • PADV OK cannot target anything else than MTP or PRE.
PADV CHANGE
  • Changes the treatment plan or prescription.
  • Can only target MTP or PRE.
Against MTP
  • The treatment status must be ACTIVE or SUSPENDED.
  • The treatment must not have been prescribed.
  • Additionally, the treatment’s status is set to ACTIVE as a result of the aggregation.
Against PRE
  • The prescription’s status must not be CANCELED or REFUSED.
  • If the prescription’s status is SUBMITTED, the aggregation sets it to ACTIVE as a result.
PADV REFUSE
  • Sets status to REFUSED.
Against MTP
  • Sets also related prescriptions’ status to REFUSED if the status was not already REFUSED or CANCELED.
  • Treatment’s status must be ACTIVE or SUSPENDED.
Against PRE
  • The prescription’s status must not be REFUSED, CANCELED or PROVISIONAL.
  • Cannot target anything else than MTP or PRE.
PADV SUSPEND
  • Sets status to SUSPENDED
  • Only allowed to target MTP entries
  • The treatment status must be ACTIVE
PADV COMMENT:
  • Can target MTP, PRE and DIS entries only.

DIS

DIS against MTP or PRE + MTP:
  • Medication should not be different if substitution is not allowed by PRE. This rule might be extended in the future.
  • Dispense should not occur after the end of validity of the PRE document. This rule might be extended in the future.
  • Dispense should not occur after the end of the treatment if specified in the prescription item. This rule might be extended in the future.
  • If referenced PRE is not provisional, it should be dispensable (that is have status either PROVISIONAL or ACTIVE). This rule is not enforced and might be extended in the future.
  • List of active ingredients should be the same than the one in the referenced PRE (prescription). This rule is not enforced and might be extended in the future.
  • If the treatment has been prescribed (at least one PRE document has been successfully submitted for it), then any DIS document targeting this treatment must reference one of its prescriptions as well.

Roles

  • Patients and their representatives are allowed to publish only the following type of docs:
    • MTP
    • PADV with a COMMENT observation code with no restriction.
    • PADV with any other observation code only when referencing a document published by the same patient or a representative of the same patient.
  • Healthcare professionals are allowed to publish only the following types of docs:
    • MTP
    • PRE
    • DIS
    • PADV

Metadata values check

Some values from the DocumentEntry are checked against the document (values in metadata and document must be equal):

DocumentEntry CH-EMED-EPR
author Composition.author
classCode Composition.type. Must be consistent with the document type (see below)
creationTime Composition.date
formatCode Must be consistent with the document type (see below)
languageCode Composition.language
mimeType application/fhir+xml or application/fhir+json
typeCode Must be consistent with the document type (see below)
uniqueId Bundle.identifier.value and Composition.identifier.value

ClassCode metadata to use for each document type

Document type DocumentEntry.classCode DocumentEntry.formatCode DocumentEntry.typeCode
MTP 440545006 Prescription record urn:che:epr:ch-emed:mtp:2022 761931002 Medication treatment plan report (record artifact)
PRE 440545006 Prescription record urn:che:epr:ch-emed:pre:2022 761938008 Medicinal Prescription record (record artifact)
DIS 440545006 Prescription record urn:che:epr:ch-emed:dis:2022 294121000195110 Medication dispense document (record artifact)
PADV 440545006 Prescription record urn:che:epr:ch-emed:padv:2022 419891008 Record artifact
PML 422735006 Summary clinical document urn:che:epr:ch-emed:pml:2022 721912009 Medication summary document
PMLC 422735006 Summary clinical document urn:che:epr:ch-emed:medication-card:2022 736378000 Medication management plan (record artifact)

The class and type codes are from the SNOMED CT system: 2.16.840.1.113883.6.96. The system for the formatCode is 2.16.756.5.30.1.127.3.10.10

Replacing a CH-EMED-EPR document

The following rules must be observed when replacing a document :

  • Patients and their representatives can only replace a document published by the same patient.
    • representatives are not supported by the service yet.
  • Healthcare professionals (HCP) can only replace a document published by himself or by another HCP of same community of affiliation.
    • Current implementation: an HCP can replace a document published by any other HCP. Further rules and possible implementations are under discussion.
  • Document administrator may only replace a document published by an HCP of the same community of affiliation.
    • Not implemented in PMP, to be discussed, for now a document admin can replace any document.
  • Replacing and replaced documents have to be of the same type (e.g. both MTP documents).
  • Replacing and replaced documents have to refer to the same patient.
  • Only documents at the end of a treatment chain can be replaced.
  • Replaced document must exist in the repository.
  • A replacement document must can be linked only to elements of the same medication chain. In case a PRE document is replaced, it may be linked only to elements of the medication chain of the referenced MTP.
  • Document administrator can replace any document regardless of who published it.
  • Replaced document must be approved (although this is always the case after an initial ITI-41 transaction, documents might become deprecated after another ITI-41 transaction with a replacement association).
  • Replaced document must not have deletionStatus = deletionRequested (this is relevant since although it is not the case at the moment with the current implementation, there might be files in the repository flagged for deletion but not deleted yet).

Publishing a PMP-APPC document

This section details the rules applicable to metadata when publishing APPC documents.

Rules for APPC:

  • Only Patients and their representatives or policy administrators can publish a new APPC document.
    • representatives are not supported by the service yet.
  • Only Patients and their representatives can replace their own APPC documents (if it exists).
    • representatives are not supported by the service yet.
  • Policy administrators of the reference community of the patient can replace any existing APPC document.
  • No APPC for the specified patient exists in the system (unless the published document is a replacement), otherwise the document is refused.
  • As for CH-EMED-EPR, APPC documents to be replaced must:
    • Be approved (as before, this is always the case for documents in the PMP repository when they are published, but their status might change to deprecated after a replacement).
    • Not have deletionStatus = deletionRequested.
  • APPC document structure is described in Implementation Guide for eMedication architecture in the context of the EPR, section ยง7.5
    • 1 Description section for free text description of the policy set
    • 1 Target section containing:
      • 1 Resources section containing 1 Resource object pointing to the patient by indicating the EPR-SPID.
      • * Subjects sections each one containing themselves Subject entries each defining 1 “who”. Subject cannot be the patient.
      • * Environments sections each one containing one Environment object limiting the validity period of the policy.
        • Required if at least one Subject refers to an organization or group.
          • Specs state “This section will not be used within this context.”
      • A list of PolicyIdReference or PolicySetIdReference defining the level of access granted to the users identified by the Subjects section.
        • See 7.5 for the list of policies that can be used.
      • * embedded PolicySet sections containing:
        • 1..* Subjects sections containing themselves Subject entries and each defines one “who”.
        • * Environments (same as above)

APPC metadata

DocumentEntry APPC
classCode 371537001 Consent report (record artifact)
formatCode urn:ihe:iti:appc:2016:consent
mimeType text/xml
serviceStartTime None
serviceStopTime None
typeCode 419891008 Record artifact

This page was updated 2023-10-12
\ No newline at end of file diff --git a/transactions/iti43/index.html b/transactions/iti43/index.html index caf3cce..6600944 100644 --- a/transactions/iti43/index.html +++ b/transactions/iti43/index.html @@ -1 +1 @@ - XDS: retrieve documents (ITI-43) - CARA's eMedication IG
Skip to content

ITI-43

The ITI-43 (Retrieve Document Set) transaction allows a Document Consumer to retrieve a set of documents.

This transaction, implemented as per the specifications. All documents are retrievable with an ITI-43 transaction (with the proper access rights : only patients, representatives and policy administrators can retrieve APPC (Advanced Patient Privacy Consent) documents).

On-demand documents

Generation rules for CH-EMED-EPR PML (Medication List) and PMLC (Medication Card) documents are described in the CH-EMED-EPR IG.

Error codes

All of these can be errors or warnings.

Error code Description
XDSDocumentUniqueIdError The document associated with the uniqueId is not available. This could be because the document is not available, the requestor is not authorized to access that document or the document is no longer available.
XDSMissingHomeCommunityId A value for the homeCommunityId is required and has not been specified.
XDSRegistryBusy XDSRepositoryBusy Too much activity. (Not used now)
XDSRegistryError XDSRepositoryError Internal Error. The error codes XDSRegistryError or XDSRepositoryError shall be returned if and only if a more detailed code is not available.
XDSRegistryOutOfResources XDSRepositoryOutOfResources Resources are low. (Not used now)
XDSResultNotSinglePatient This error signals that a single request would have returned content for multiple Patient Ids. TODO: that would leak that the ID exists and belongs to another patient. For privacy reasons, would it be treated like a non-existing document? If yes, this error wouldn’t be possible.
XDSUnavailableCommunity A community that was queried was not available.
XDSUnknownCommunity A value for the homeCommunityId is not recognized.
XDSUnknownRepositoryId The repositoryUniqueId value could not be resolved to a valid document repository or the value does not match the repositoryUniqueId.

This page was updated 2023-10-04
\ No newline at end of file + XDS: retrieve documents (ITI-43) - CARA's eMedication IG
Skip to content

ITI-43

The ITI-43 (Retrieve Document Set) transaction allows a Document Consumer to retrieve a set of documents.

This transaction, implemented as per the specifications. All documents are retrievable with an ITI-43 transaction (with the proper access rights : only patients, representatives and policy administrators can retrieve APPC (Advanced Patient Privacy Consent) documents).

See also EPD by example’s Retrieve Document Set page.

On-demand documents

Generation rules for CH-EMED-EPR PML (Medication List) and PMLC (Medication Card) documents are described in the CH-EMED-EPR IG.

Error codes

All of these can be errors or warnings.

Error code Description
XDSDocumentUniqueIdError The document associated with the uniqueId is not available. This could be because the document is not available, the requestor is not authorized to access that document or the document is no longer available.
XDSMissingHomeCommunityId A value for the homeCommunityId is required and has not been specified.
XDSRegistryBusy XDSRepositoryBusy Too much activity. (Not used now)
XDSRegistryError XDSRepositoryError Internal Error. The error codes XDSRegistryError or XDSRepositoryError shall be returned if and only if a more detailed code is not available.
XDSRegistryOutOfResources XDSRepositoryOutOfResources Resources are low. (Not used now)
XDSResultNotSinglePatient This error signals that a single request would have returned content for multiple Patient Ids. TODO: that would leak that the ID exists and belongs to another patient. For privacy reasons, would it be treated like a non-existing document? If yes, this error wouldn’t be possible.
XDSUnavailableCommunity A community that was queried was not available.
XDSUnknownCommunity A value for the homeCommunityId is not recognized.
XDSUnknownRepositoryId The repositoryUniqueId value could not be resolved to a valid document repository or the value does not match the repositoryUniqueId.

This page was updated 2023-10-12
\ No newline at end of file