Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following is an example of a notification pointing to a newly created Task. 

Points of Interest:

status

Status is completed when the Processing Service has created the notification.

medium

The channel that the notification is sent through. In the example below, it is sent as an SMS.

recipient

A reference to the Practitioner that is to receive the notification. This is determined from the CareTeam relations on the CarePlan that is in context.

The Processing Service uses the "shadow Practitioner profiles", maintained at logon, to be able to address Practitioners individually.

subject

A reference to the Patient.

context 

A reference to the Episode Of Care. 

topic 

A reference to the Task that the Communication resource is notifying about.

sender 

A reference to the Organization that is legally responsible of the Patients Episode of Care (managingOrganization)

payload

The contents of the notification


Code Block
languagejava
titleCommunication Resource for Task notification in JSON
{
    "resourceType": "Communication",
    "id": "message-nemsms-notification",
    "meta": {
        "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-message"
        ]
    },
    "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: message-nemsms-valid</p><p><b>meta</b>: </p><p><b>status</b>: completed</p><p><b>category</b>: Besked <span style=\"background: LightGoldenRodYellow\">(Details : {http://ehealth.sundhed.dk/message-category code 'message' = 'message)</span></p><p><b>medium</b>: NemSMS <span style=\"background: LightGoldenRodYellow\">(Details : {http://ehealth.sundhed.dk/message-medium code 'nemsms' = 'nemsms)</span></p><p><b>recipient</b>: <a href=\"http://practitioner.ehealth.sundhed.dk/Practitioner/123\">http://practitioner.ehealth.sundhed.dk/Practitioner/123</a></p><p><b>sent</b>: Dec 12, 2018 6:01:10 PM</p><p><b>received</b>: Dec 12, 2018 6:01:11 PM</p><p><b>sender</b>: <a href=\"http://patient.ehealth.sundhed.dk/Patient/XXX\">http://patient.ehealth.sundhed.dk/Patient/XXX</a></p><h3>Payloads</h3><table class=\"grid\"><tr><td>-</td><td><b>Content[x]</b></td></tr><tr><td>*</td><td>Dit Care Team har modtaget en ny opgave. Den er nu tilgængelig via opgaveoversigten.</td></tr></table></div>"
    },
    "status": "completed",
    "category": [
        {
            "coding": [
                {
                    "system": "http://ehealth.sundhed.dk/message-category",
                    "code": "notification"
                }
            ],
            "text": "Notifikation"
        }
    ],
    "medium": [
        {
            "coding": [
                {
                    "system": "http://ehealth.sundhed.dk/message-medium",
                    "code": "nemsms"
                }
            ],
            "text": "NemSMS"
        }
    ],
    "recipient": [
        {
            "reference": "https://vendortest2.ehealth.sundhed.dk/organization/fhir/Practitioner/59"
        }
    ],
    "subject": {
        "reference": "https://vendortest2.ehealth.sundhed.dk/trifork-fhir-server/Patient/203"
    },
    "context": {
        "reference": "https://vendortest2.ehealth.sundhed.dk/hapi-fhir-server/fhir/EpisodeOfCare/67"
    },
    "topic": [
        {
            "reference": "https://vendortest2.ehealth.sundhed.dk/hapi-fhir-server/fhir/Task/269"
        }
    ],
    "sent": "2018-12-12T18:01:10-08:00",
    "received": "2018-12-12T18:01:11-08:00",
    "sender": {
        "reference": "https://vendortest2.ehealth.sundhed.dk/organization/fhir/Organization/58"
    },
    "payload": [
        {
            "contentString": "Der er nye målinger der skal behandles af dit team."
        }
    ]
}

...