Subscription patient-merge (R5 Backport Subscription)


Motivation

Subscription ist eine FHIR Ressource, um als Client-System Benachrichtigungen über Events auf dem FHIR Server anzufragen. Der Subscription Mechanismus in FHIR R4 ist nicht geeignet, um alle relevanten Events (hier im Speziellen das Mergen von Patienten) zu unterstützen. Daher basiert das ISiK Subscription-Profil auf dem Subscriptions R5 Backport Profil von HL7.

Siehe auch: Übergreifende Festlegungen Patient-merge

Um als Subsystem über ein Patienten-Merge-Event informiert zu werden, KANN der FHIR Subscription Mechanismus gemäß des Subscriptions R5 Backport IGs von HL7 genutzt werden.


Kompatibilität

Das Profil PatientMergeSubscription basiert auf dem Backport-Subscription Profil.
Der SubscriptionStatus, sowie das Subscription Notification Bundle werden unverändert direkt aus dem Subscriptions R5 Backport IG genutzt.


Profil

NameCanonical
PatientMergeSubscriptionhttps://gematik.de/fhir/isik/StructureDefinition/patient-merge-subscription

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
statusS Σ ?!1..1codeBinding
contactΣ I0..*ContactPoint
endΣ0..1instant
reasonS Σ1..1string
id0..1string
filterCriteriaS Σ I0..*Extension(string)
value0..1System.String
errorΣ0..1string
id0..1string
heartbeatPeriodI0..1Extension(unsignedInt)
timeoutI0..1Extension(unsignedInt)
maxCountI0..1Extension(positiveInt)
modifierExtensionΣ ?! I0..*Extension
id0..1string
customChannelTypeS Σ I0..1Extension(Coding)
value0..1System.String
endpointS Σ0..1url
id0..1string
contentS Σ I1..1Extension(code)
value0..1System.String
headerS Σ0..*string


Anmerkungen zu den Must-Support-Feldern

Subscription.status

Bedeutung: Der Status der Subscription, der den Serverstatus der Subscription angibt. Neue Subscriptions werden immer mit dem Status requested an den Server übergeben. Der Server ändert im Anschluss den Status auf active oder im Fehlerfall auf error.

Hinweise: Siehe R4 Subscriptions

Subscription.reason

Bedeutung: Beschreibung wieso diese Subscription erstellt wurde.

Hinweise: Siehe R4 Subscriptions

Subscription.category

Bedeutung: Canonical URL des Subscription-Topics, aktuell wird nur folgendes SubscriptionTopic unterstützt: https://gematik.de/fhir/isik/SubscriptionTopic/patient-merge

Hinweise: Siehe Subscriptions R5 Backport

Subscription.type

Bedeutung: Der Typ des Kommunikationskanals, über den Subscription-Benachrichtigungen gesendet werden sollen.

Hinweise: Siehe R4 Subscriptions

Subscription.endpoint

Bedeutung: Adresse des Kommunikationskanals/ Endpunkts, an den Subscription-Benachrichtigungen gesendet werden sollen. Dies ist nur für rest-hook Subscriptions relevant.

Hinweise: Siehe R4 Subscriptions

Subscription.payload

Bedeutung: Format in dem Subscription Notifications versendet werden sollen (JSON oder XML)

Hinweise: Siehe R4 Subscriptions

Subscription.payload.extension[content]

Bedeutung: Welcher Ressourceninhalt in der Nutzlast der Benachrichtigung geliefert werden soll. Zur Auswahl stehen eine leere Nutzlast (empty), nur die Ressourcen-id (id-only) oder der gesamte Inhalt der Ressource (full-resource).

Hinweise: Siehe Extension: Backport R5 Subscription Payload Content Information

Subscription.header

Bedeutung: http-Header welcher dazu genutzt werden kann einen Authorization-header zu setzen. Dies ist nur für rest-hook Subscriptions relevant.

Hinweise: ACHTUNG: dieses Datenfeld muss bei READ-Interaktionen maskiert werden! Siehe R4 Subscriptions

Interaktionen

Für die Ressource Subscription SOLL die REST-Interaktion "READ", "CREATE", "UPDATE", "DELETE" implementiert werden, insofern der festgelegte Lösungsansatz zu 'Patient merge Notification' implementiert wird.

Operations

Bei der Umsetzung des Subscription Channel Type websocket SOLL die Operation $get-ws-binding-token supported werden.

Siehe auch: CapabilityStatement & Patient merge und Notification


Beispiele

Subscription

{
    "resourceType": "Subscription",
    "id": "PatientMergeSubscriptionExample",
    "meta": {
        "profile":  [
            "https://gematik.de/fhir/isik/StructureDefinition/patient-merge-subscription"
        ]
    },
    "criteria": "https://gematik.de/fhir/isik/SubscriptionTopic/patient-merge",
    "channel": {
        "type": "rest-hook",
        "endpoint": "http://localhost:8081/fhir/Bundle",
        "payload": "application/fhir+json",
        "_payload": {
            "extension":  [
                {
                    "url": "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content",
                    "valueCode": "full-resource"
                }
            ]
        },
        "header":  [
            "Authorization: Bearer xxxxxxxxxx"
        ]
    },
    "status": "requested",
    "reason": "Patient merge subscription"
}

SubscriptionNotification-Bundle

{
    "resourceType": "Bundle",
    "id": "SubscriptionNotificationBundleExample",
    "type": "history",
    "entry":  [
        {
            "fullUrl": "urn:uuid:9bb6fcbd-8391-4e35-bd4c-620a2db47af0",
            "resource": {
                "resourceType": "Parameters",
                "id": "SubscriptionNotification",
                "meta": {
                    "profile":  [
                        "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4"
                    ]
                },
                "parameter":  [
                    {
                        "name": "subscription",
                        "valueReference": {
                            "reference": "Subscription/1"
                        }
                    },
                    {
                        "name": "topic",
                        "valueCanonical": "https://gematik.de/fhir/isik/SubscriptionTopic/patient-merge"
                    },
                    {
                        "name": "status",
                        "valueCode": "active"
                    },
                    {
                        "name": "type",
                        "valueCode": "event-notification"
                    },
                    {
                        "name": "events-since-subscription-start",
                        "valueString": "1"
                    },
                    {
                        "name": "notification-event",
                        "part":  [
                            {
                                "name": "event-number",
                                "valueString": "1"
                            },
                            {
                                "name": "timestamp",
                                "valueDate": "2024-02-22"
                            },
                            {
                                "name": "focus",
                                "valueReference": {
                                    "reference": "Patient/DorisQuelle"
                                }
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "http://example.com/fhir/Patient/DorisQuelle/_history/2",
            "resource": {
                "resourceType": "Patient",
                "id": "DorisQuelle",
                "meta": {
                    "profile":  [
                        "https://gematik.de/fhir/isik/StructureDefinition/ISiKPatient"
                    ]
                },
                "identifier":  [
                    {
                        "type": {
                            "coding":  [
                                {
                                    "code": "MR",
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203"
                                }
                            ]
                        },
                        "system": "https://fhir.krankenhaus.example/sid/PID",
                        "value": "654321"
                    },
                    {
                        "system": "http://fhir.de/sid/gkv/kvid-10",
                        "type": {
                            "coding":  [
                                {
                                    "code": "KVZ10",
                                    "system": "http://fhir.de/CodeSystem/identifier-type-de-basis"
                                }
                            ]
                        },
                        "value": "A123456789"
                    }
                ],
                "name":  [
                    {
                        "use": "official",
                        "family": "Duplikat",
                        "given":  [
                            "Doris"
                        ]
                    }
                ],
                "active": false,
                "gender": "female",
                "birthDate": "1964-08-12"
            },
            "request": {
                "method": "PUT",
                "url": "Patient/DorisQuelle"
            }
        }
    ]
}

Patientenobjekte

"Quell" Patienten-Ressource:

{
    "resourceType": "Patient",
    "id": "DorisQuelle",
    "meta": {
        "profile":  [
            "https://gematik.de/fhir/isik/StructureDefinition/ISiKPatient"
        ]
    },
    "identifier":  [
        {
            "type": {
                "coding":  [
                    {
                        "code": "MR",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203"
                    }
                ]
            },
            "system": "https://fhir.krankenhaus.example/sid/PID",
            "value": "654321"
        },
        {
            "system": "http://fhir.de/sid/gkv/kvid-10",
            "type": {
                "coding":  [
                    {
                        "code": "KVZ10",
                        "system": "http://fhir.de/CodeSystem/identifier-type-de-basis"
                    }
                ]
            },
            "value": "A123456789"
        }
    ],
    "name":  [
        {
            "use": "official",
            "family": "Duplikat",
            "given":  [
                "Doris"
            ]
        }
    ],
    "active": false,
    "gender": "female",
    "birthDate": "1964-08-12"
}

und

"Ziel" Patienten-Ressource:

{
    "resourceType": "Patient",
    "id": "DorisZiel",
    "meta": {
        "profile":  [
            "https://gematik.de/fhir/isik/StructureDefinition/ISiKPatient"
        ]
    },
    "identifier":  [
        {
            "type": {
                "coding":  [
                    {
                        "code": "MR",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203"
                    }
                ]
            },
            "system": "https://fhir.krankenhaus.example/sid/PID",
            "value": "123456"
        },
        {
            "system": "http://fhir.de/sid/gkv/kvid-10",
            "type": {
                "coding":  [
                    {
                        "code": "KVZ10",
                        "system": "http://fhir.de/CodeSystem/identifier-type-de-basis"
                    }
                ]
            },
            "value": "A123456789"
        }
    ],
    "name":  [
        {
            "use": "official",
            "family": "Duplikat",
            "given":  [
                "Doris"
            ]
        }
    ],
    "active": true,
    "gender": "female",
    "birthDate": "1964-08-12"
}

Mittels eines Patient-merge-Vorgangs wird die "Ziel" Patienten-Ressource ausgewählt und beide Ressourcen entsprechend modifiziert:

Resultierende Patientin:

{
    "resourceType": "Patient",
    "id": "DorisResultat",
    "meta": {
        "profile":  [
            "https://gematik.de/fhir/isik/StructureDefinition/ISiKPatient"
        ]
    },
    "identifier":  [
        {
            "type": {
                "coding":  [
                    {
                        "code": "MR",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203"
                    }
                ]
            },
            "system": "https://fhir.krankenhaus.example/sid/PID",
            "value": "123456"
        },
        {
            "system": "http://fhir.de/sid/gkv/kvid-10",
            "type": {
                "coding":  [
                    {
                        "code": "KVZ10",
                        "system": "http://fhir.de/CodeSystem/identifier-type-de-basis"
                    }
                ]
            },
            "value": "A123456789"
        }
    ],
    "name":  [
        {
            "use": "official",
            "family": "Duplikat",
            "given":  [
                "Doris"
            ]
        }
    ],
    "active": true,
    "gender": "female",
    "birthDate": "1964-08-12",
    "link":  [
        {
            "other": {
                "identifier": {
                    "system": "https://fhir.krankenhaus.example/sid/PID",
                    "value": "654321"
                }
            },
            "type": "replaces"
        }
    ]
}