MyHealthEu Patient Summary Kafka topic
The Kafka topic for MyHealthEu Patient Summary is available only within Norsk Helsenett (NHN).
The topic is currently only available in the test and QA environments.
The topic names are:
- Test:
nhn-test-test-critical-information-patient-summary-test - QA:
nhn-test-test-critical-information-patient-summary-qa
Every time critical info records are created, updated or deleted, the topic is updated for the given patient. This can either be done manually from the Kjernejournal portal's user interface, or by direct API call to the critical info service.
This is a compact topic, compacted by NIN, which only contains the latest version for each critical info registration (not the entire change history).
The message payload is a FHIR R4 document Bundle that follows
the MyHealth@EU Patient Summary Bundle profile.
For a full message payload example, see
the Patient Everything MyhealthEu documentation.
The section-element in the FHIR Bundle references the critical info registrations (if any).
Security
Since this Kafka topic contains highly sensitive healthcare data, we strongly recommend that consumers adhere to the following security measures:
- Encryption at rest: Secure all database storage by encrypting data at rest.
- Encryption in transit / payload: Messages on this topic will be encrypted at the payload level. Consumers must implement decryption accordingly.
- Key management: Ensure secure storage and strict access control for encryption keys. We recommend using NHN's standard vault solution.
Securing data at rest and managing consumers-side encryption keys are the consumer's responsibility.
Audit logging
Consumers of this topic are required by Norwegian law (Pasientjournalloven § 22 a and Kjernejournalforskriften) to audit log all disclosure of data to other clients or end-users.
Implementing and maintaining compliant audit logging is the consumer's responsibility.
What a message contains
Each message contains the clinical patient summary as a complete MyHealthEu FHIR R4 JSON document Bundle. The Kafka key is a national identification number (NIN), and the Bundle's Patient identifier matches that key. Kafka and Patient Everything select the latest version of each registration among the identities currently linked to that NIN. Deleted records are excluded. See Patient Everything and the MyHealthEu patient summary and eligibility rules.
The Bundle uses the following data models for the only critical information records currently supported by MyHealthEu. Each guide describes the FHIR fields in the Kafka payload and includes examples.
| FHIR resource | Supported records | Data model |
|---|---|---|
AllergyIntolerance |
Drug reactions (DrugReaction) and other allergies (OtherAllergen) |
MyHealthEu AllergyIntolerance |
Condition |
Critical medical conditions (CriticalMedicalCondition) |
MyHealthEu Condition — CriticalMedicalCondition |
Each committed Bundle becomes the latest patient summary on the topic for its NIN. An empty Bundle also replaces the previous summary. It retains the Composition, Patient and authoring Device, with empty clinical sections. You may receive several Bundles for the same key, including on replay. Kafka compacts the topic by NIN, so a consumer can recover the latest summary for each key.
A complete record history is unavailable from this topic. Providing the full history complicates handling of person identity (NIN change, split and merge) and privacy settings. In most cases health care personell are only interesed in the latest version of the records, not the entire change history.
How privacy settings affect the Bundle
Each Bundle contains zero clinical records if any of the following applies.
| Source | Setting |
|---|---|
| Persontjenesten | The person is deceased. |
| Persontjenesten | The person has a confidential address. |
| PVK | The person has enabled sperring for critical information. |
| PVK | The person has a Kjernejournal reservation. |
Empty Allergies and Problems sections have emptyReason=withheld for a confidential address, sperring, or a Kjernejournal reservation.
Otherwise they have emptyReason=unavailable, including when death is the only reason clinical records are omitted.
Setting, removing, or replaying either PVK restriction publishes the current Bundle, even for someone with no registrations. Eligible records can appear
again only when all four conditions are clear. For example, if a patient with an eligible allergy enables sperring, the service publishes an empty Bundle.
When the patient lifts sperring, the next Bundle includes the allergy again if it is still eligible and no other restriction applies.
HPR-specific blocking (blokkering) neither triggers publication nor affects which clinical records appear.
An ordinary Persontjenesten update, including a merge or a replay, publishes when the person has registered critical information. A split can also publish for a NIN with no registrations left. Privacy restrictions and an absence of eligible records can therefore both result in an empty Bundle.
How changes to a NIN affect the published summary
- NIN change. Suppose a person with registered critical information changes from NIN A to NIN B. If A remains linked as a historical NIN, both A and B receive the person's summary. The Bundle keyed by A identifies the Patient as A, and the Bundle keyed by B identifies the Patient as B.
- Merge. Suppose A has an eligible allergy and B has an eligible condition. When A and B are merged, each NIN receives a Bundle containing both records and identifying the Patient by that key. If either identity has a withholding condition, both NINs receive empty Bundles.
- Split. Suppose A and B both have a merged summary containing one condition, registered under A. After the split, A receives a Bundle containing the condition. B receives an empty Bundle that clears the previously shared condition for B.
- Versions stored under different NINs. An allergy is registered under A and then deleted through B while the identities are linked. Both summaries omit it while linked. After a split, A's summary includes the original allergy again. B's summary still omits it because B holds the deletion.