Zorgtoepassing Medicatieoverdracht
Working version v1.8.1 v1.7.8
Working version v1.8.1 v1.7.8

Developer Guide - MedMij integration aspects

Required infrastructurele interacties / systeemroles

Required infrastructurele interacties / systeemroles - MP6.12 QURX

In-scope

Out-of-scope

Infrastructurele interacties

Systeemrol

Limitation

MedMij - Beschikbaarheids- of ontvankelijkheidsvraag

IsAllowed.OVS.FHIR.1

Not available for HL7v3 source systems

MedMij - CapabilityStatement Interface

capabilities.OVS.R4.1

Not available for HL7v3 source systems

Building blocks for MP6.12 QURX

This overview depicts which the building blocks which are in scope for MP6.12 data sources.

Building block (EN)

Building block (NL)

MP6.12 QURX

MedicationAgreement

Medicatieafspraak

-

VariableDosingRegimen

WisselendDoseerschema

-

DispenseRequest

Verstrekkingsverzoek

-

AdministrationAgreement

Toedieningsafspraak

Ja

MedicationDispense

Medicatieverstrekking

Ja

MedicationUse2

Medicatiegebruik2

-

MedicationAdministration2

Medicatietoediening2

-

Building blocks for LatestStop query

This overview depicts which the building blocks which building blocks can be queried via a LatestStop-query.

MP6.12 data sources will give no results for the LatestStop query.

Building block (EN)

Building block (NL)

LatestStop Query

MedicationAgreement

Medicatieafspraak

Ja

VariableDosingRegimen

WisselendDoseerschema

Ja

DispenseRequest

Verstrekkingsverzoek


AdministrationAgreement

Toedieningsafspraak

Ja
Geen stops vanuit MP61.2 QURX!

MedicationDispense

Medicatieverstrekking


MedicationUse2

Medicatiegebruik2


MedicationAdministration2

Medicatietoediening2


LSP+ Implementation of availability condition (Beschikbaarheidstoets)

Verantwoordelijkheden, Zorg | MedMij Afsprakenstelsels

LSP GBx Resource Client expected exceptions

Met de beschikbaarheidstoets wordt bij de functies Verzamelen en Abonneren gecontroleerd:

 

  • of een behandelrelatie bestaat (of heeft bestaan) tussen Aanbieder en Persoon,

  • XIS heeft wel/niet dossier voor huidige of vroegere patient

  • Expected HL7v3 XIS RSP: KEY204 => PGO RSP: HTTP 403

  • of de Aanbieder gegevens van een bepaalde Persoon beschikbaar stelt en

  • XIS heeft dossier dossier afgeschermd (nog niet openbaar gemaakt)

  • Expected HL7v3 XIS RSP: KEY204 => PGO RSP: HTTP 403

  • de Persoon aan de gestelde leeftijdseisen voldoet om gegevens te mogen uitwisselen.

  • XIS geeft aan dat de patient te jong is

  • Expected HL7v3 XIS RSP: PATLFT => PGO RSP: HTTP 403

ANDERS beschikbaarheidstoets = PASSED

  • Expected HL7v3 XIS RSP: NF => PGO RSP: HTTP 200

LSP+ Error handling

Error Handling Sequence for MedMij, Implementation Guide, and LSP+.

See specifications:

Resource interface | MedMij Afsprakenstelsels

MedMij FHIR R4 Implementation Guide 1.0.7 - informatiestandaarden

Beschikbaarheids- en ontvankelijkheidsvoorwaarde (availability condition)


The optional Early Availability Check defined by MedMij is not supported.

When a request reaches the MedMij Resource Interface, the Resource Server first validates the authentication and authorization context.

If the request does not contain an access token, the Resource Server returns HTTP 401 Unauthorized (or HTTP 400 Bad Request, both accepted within MedMij). In accordance with RFC 6750, no additional error details should be disclosed. Within a MedMij context, an OperationOutcome should not be returned because authorization failures must not reveal additional information.

If the request contains an expired or invalid access token, the Resource Server returns HTTP 401 Unauthorized together with a WWW-Authenticate: Bearer header containing error="invalid_token".

If the access token is valid but does not contain the required scope, the Resource Server returns HTTP 403 Forbidden with a WWW-Authenticate: Bearer header containing error="insufficient_scope". A FHIR OperationOutcome may be returned with issue code security.

If the request is malformed, for example because required parameters are missing, unsupported parameters are supplied, multiple token transport methods are used, or the request is otherwise syntactically incorrect, the Resource Server returns HTTP 400 Bad Request with error="invalid_request". A FHIR OperationOutcome may be included to describe the validation error.

After successful authentication and request validation, LSP+ performs an additional capability check. This validation is based on Profile Capability rather than Resource Capability.

If the requested resource type is not supported, LSP+ returns HTTP 404 Not Found together with an OperationOutcome containing issue code not-supported.

This check is explicitly not implemented by LSP+.

If the resource endpoint is supported but the requested profile or value is known but not supported, this is not treated as an error by the MedMij Implementation Guide. The server returns HTTP 200 OK with an empty searchset Bundle and may include an informational OperationOutcome with issue code not-found.

Next, the Resource Server evaluates the availability condition. If the requested information is temporarily unavailable or the availability requirements are not met, the server returns HTTP 403 Forbidden with error="access_denied". A FHIR OperationOutcome with issue code security may be returned.

If the Resource Server cannot process the request for any other reason that does not fall within the previously defined exception categories, it returns an appropriate HTTP status code and, where applicable, a corresponding FHIR OperationOutcome.

Two situations are explicitly not considered errors:

  • No match for the supplied search parameters. This is treated as a successful search that simply returns no results.

  • Unknown search parameters. These are handled according to the MedMij FHIR R4 search guidance and are not considered an error condition.

This sequence results in the following flow:

  1. Authentication check (token present).

  2. Token validity check.

  3. Scope authorization check.

  4. Request syntax and parameter validation.

  5. LSP+ capability validation (profile-based).

  6. Resource support validation.

  7. Availability condition validation.

  8. Request processing and business logic execution.

  9. Successful response, empty result set, or appropriate error response.

Instructions for XIS-vendors on implementing errors for HL7v3 for availability condition

The following HL7v3 error situations are expected from the XIS:

  • PATLFT: the patient does not meet the minimum age requirement.

  • KEY204: no patient record exists because no treatment relationship has ever existed.

  • KEY204: the patient record is actively shielded by the XIS.

  • NF: the patient is known but no matching data is available for the requested query.

In the cases PATLFT and KEY204, a HTTP 403 Forbidden response with error value access_denied is returned by LSP+.

In the case NF, a HTTP 200 response with an empty result set is returned by LSP+.

Expected responses for MP6.12 QURX

PGO

Bouwsteen

Error

PGO Response

GET [base]/MedicationRequest?category=http://snomed.info/sct|33633005

MA

Resource is not supported

  • HTTP 404 Not Found

  • OperationOutcome with .code set to not-supported.

GET [base]/MedicationRequest?category=http://snomed.info/sct|52711000146108

VV

Resource is not supported

  • HTTP 404 Not Found

  • OperationOutcome with .code set to not-supported.

GET [base]/MedicationRequest?category=http://snomed.info/sct|395067002

WDS

Resource is not supported

  • HTTP 404 Not Found

  • OperationOutcome with .code set to not-supported.

GET [base]/MedicationDispense?category=http://snomed.info/sct|373784005

MVE

-

 

GET [base]/MedicationDispense?category=http://snomed.info/sct|422037009

TA

-

 

GET [base]/MedicationStatement?category=http://snomed.info/sct|422979000

MGB

Resource is not supported

  • HTTP 404 Not Found

  • OperationOutcome with .code set to not-supported.

GET [base]/MedicationAdministration?category=http://snomed.info/sct|18629005

MTD

Resource is not supported

  • HTTP 404 Not Found

  • OperationOutcome with .code set to not-supported.