An ehealth-message defines written communication and comes in four flavours depending on the “category” of the message:
An ehealth-message may refer related resources (eg. Device, CarePlan, Appointment etc) using the “topic” field, no matter which category it is. Different instances of ehealth-message may be logically organized into “threads” by assigning the same thread-id in the provided extension. Similarly, they may be organized in a group (eg. group messages) by assigning the same group-id in that extension. The message subject may be provided in the title extension, and an optional priority may be provided in the ehealth-priority extension.
The ehealth-message profile contains two status fields:
The following custom search parameters may be used when searching for ehealth-message instances:
In the eHealth Infrastructure the ehealth-message resource is used in conjunction with the following resources:
The following rules apply for the ehealth-message profile:
The Patient service will forward ehealth-messages to the public danish NemSMS service given the following conditions:
The message is forwarded asynchronously. To track the progress of the NemSMS, the notDone flag and notDoneReason code is used:
Initially, when the ehealth-message is created message.notDone is true and message.notDoneReason is ‘in-progress’ (defined in http://hl7.org/fhir/event-status)
If the NemSMS dispatch is successful, message.notDone will be set to false.
If the NemSMS dispatch fails, message.notDone is true and message.notDoneReason is either ‘system-error’ or ‘recipient-unavailable’ (defined in http://hl7.org/fhir/communication-not-done-reason)
The Patient service will generate NemSMS ehealth-messages, notifying the recipient that they have received a message, given the following conditions:
The Patient service will generate NemSMS ehealth-messages, notifying patients that they have an appointment or video appointment scheduled for de following day, given the following conditions:
An ehealth-message may not have its category changed, eg. from ‘note’ to ‘message’.
When status is “preparation”, message contents may be updated, but not after status has been set to “completed”.
An ehealth-message may be PATCH updated on paths complying with the regular expressions below.
Path | Description |
---|---|
/implicitRules.* | For category ‘note’ or status ‘preparation’ |
/category.* | For category ‘note’ or status ‘preparation’ |
/contained.* | For category ‘note’ or status ‘preparation’ |
/recipient.* | For category ‘note’ or status ‘preparation’ |
/definition.* | For category ‘note’ or status ‘preparation’ |
/basedOn.* | For category ‘note’ or status ‘preparation’ |
/partOf.* | For category ‘note’ or status ‘preparation’ |
/topic.* | For category ‘note’ or status ‘preparation’ |
/notDone.* | For category ‘note’ or status ‘preparation’ |
/notDoneReason.* | For category ‘note’ or status ‘preparation’ |
/context.* | For category ‘note’ or status ‘preparation’ |
/received.* | For all values of category |
/reasonCode.* | For category ‘note’ or status ‘preparation’ |
/reasonReference.* | For category ‘note’ or status ‘preparation’ |
/payload.* | For category ‘note’ or status ‘preparation’ |
/note.* | For category ‘note’ or status ‘preparation’ |
/status.* | For category ‘note’ or status ‘preparation’ |
/extension.* | For category ‘note’ or status ‘preparation’ |
The official URL for this profile is:
http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-message
This is the profile for general messaging in the eHealth platform. It covers four different message types: messages, notifications, advice, and notes. This is specified using the message category (value set "Message category"). When needed, message medium NemSMS may also be specified (value set "Message medium").
Message-related state, such as whether a message has been read etc, is handled through the use of the administrative-status extension.
This profile builds on Communication.
This profile was published on Tue Oct 27 14:11:48 UTC 2020 as a draft by ehealth.sundhed.dk.
Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.
Path | Conformance | ValueSet |
Communication.language | extensible | Common Languages Max Binding: All Languages |
Communication.extension:restrictionCategory.value[x]:valueCodeableConcept | required | RestrictionCategory |
Communication.extension:restrictionCategory.value[x]:valueCodeableConcept.coding | required | RestrictionCategory |
Communication.extension:priority.value[x]:valueCode | required | Priority |
Communication.status | required | EventStatus |
Communication.notDoneReason | required | CommunicationNotDoneReason |
Communication.category | example | CommunicationCategory |
Communication.category:DkTmCategory | example | CommunicationCategory |
Communication.category:DkTmCategory.coding | required | MessageCategory |
Communication.category:DkTmCategory.coding.code | required | MessageCategory |
Communication.medium | example | v3 Code System ParticipationMode |
Communication.medium:DkTmMedium | example | MessageMedium |
Communication.medium:DkTmMedium.coding.code | required | MessageMedium |
Communication.reasonCode | example | SNOMED CT Clinical Findings |
Communication.reasonCode.coding | required | eHealth Message Reason Code |
Id | Path | Details | Requirements |
dom-2 | Communication | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() | |
dom-1 | Communication | If the resource is contained in another resource, it SHALL NOT contain any narrative : contained.text.empty() | |
dom-4 | Communication | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() | |
dom-3 | Communication | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource : contained.where(('#'+id in %resource.descendants().reference).not()).empty() | |
com-1 | Communication | Not Done Reason can only be specified if NotDone is "true" : notDone or notDoneReason.exists().not() | |
nemsms-1 | Communication | If communication resource is a NemSMS payload cannot exceed 160 : medium.coding.where(code = 'nemsms').exists() implies payload.contentString.length() <= 160 | |
note-invariant | Communication | Category note invariant : category.coding.code = 'note' implies (sender.reference = recipient.reference) or (recipient.reference.exists().not() and extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-recipientCareTeam').valueReference.exists()) | |
notification-invariant | Communication | Category notification invariant : category.coding.code = 'notification' implies recipient.reference.contains('Patient/') and ( sender.reference.contains('Practitioner/') or extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-senderCareTeam').valueReference.exists()) | |
message-invariant | Communication | Category message invariant : category.coding.code = 'message' implies (recipient.reference.contains('Patient/') and ( sender.reference.contains('Device/') or contained.ofType(Device).where('#' + id = %resource.sender.reference).empty().not() or extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-senderCareTeam').valueReference.exists())) or (( extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-recipientCareTeam').valueReference.exists()) and (sender.reference.contains('Patient/') or sender.reference.contains('Device/'))) or (extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-recipientCareTeam').valueReference.exists() and extension.where(url = 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-communication-senderCareTeam').valueReference.exists() ) | |
ele-1 | Communication.extension:recipientCareTeam | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:recipientCareTeam | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:senderCareTeam | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:senderCareTeam | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:restrictionCategory | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:restrictionCategory | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:threadId | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:threadId | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:period | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:period | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:administrativeStatus | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:administrativeStatus | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:title | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:title | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:priority | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:priority | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:groupId | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:groupId | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.extension:onBehalfOf | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) | |
ext-1 | Communication.extension:onBehalfOf | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
ele-1 | Communication.payload | All FHIR elements must have a @value or children : hasValue() | (children().count() > id.count()) |