Generation and Control of Infrastructure Communication (Messages and NemSMS)
The messages are represented by FHIR Communication resources and can be created either by the infrastructure itself—often as part of automated processing workflows—or by User Systems, depending on the context of the interaction or the operational requirements.
Contents
Introduction
In the infrastructure messages are represented by FHIR Communication resources. These can be created both by the infrastructure itself, as part of some of its automated processing, and by the User Systems. The technical constraints and definitions of the Communication resources can be found here:
Depending on how the medium
-variable is set in the Communication a message can be sent to the recipient in different ways. One example of a possible way is an SMS through the NemSMS system.
Message Medium
The medium
in the Communication, if set, indicates the manner in which the message should be delivered to the recipient.
When a Communication is created with medium=nemsms
it is automatically also passed on to the external NemSMS-system and delivered to the recipient as an SMS. This is also further explained in the NemSMS Notifications segment in http://ehealth-documentation.s3-website-eu-west-1.amazonaws.com/latest-released/ig/StructureDefinition-ehealth-message.html.
When Communication is created without a medium there is no automatic delivery. It is in that case up to the User Systems themselves to deliver the message to the user.
Messages Generated By the Infrastructure
On multiple occasions the infrastructure has the possibility of automatically generating messages, however, whether it actually does so by default is dependent on the situation and the recipient. In some cases, the Communications have medium=nemsms
as the default medium and will therefore be delivered as an SMS, in other cases the medium
is not set and it is therefore solely represented by the Communication resource created in the infrastructure.
If a Communication is created by default and by default has medium=nemsms
an SMS will be sent to the recipient when the situation/trigger happens. If a Communication is not created by default, nothing happens. Nothing is created in the infrastructure, nothing is passed to the external NemSMS system and nothing is sent to the recipient.
While the table below shows a complete list of the situations of automated messages, there is more information to be found on the content of the created Communications created by automated processing.
Situation/Trigger | Created by Default | Default medium | Recipient | Payload |
---|---|---|---|---|
Measurement submitted at an unexpected time | No | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Uventet måling“ |
No | Not set | Patient | ||
Automated processing rule requests Communication(s) to be made. | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | Dependent on the output from the specific rule. |
No | Not set | Patient | ||
Missing measurement | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Afklaring af årsag til manglende målinger“ |
No | Not set | Patient | ||
Creation of EpisodeOfCare | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Der er oprettet nyt forløb den %s. Se det i din telemedicinske løsning.“ |
No | Not set | Patient | ||
Creation of CarePlan ($apply) | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Der er oprettet ny plan den %s. Se den i din telemedicinske løsning.“ |
No | Not set | Patient | ||
Change in CarePlan of CareTeam, scheduled CareTeam, status or scheduled status | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Der er sket ændringer i din plan den %s. Se i din telemedicinske løsning.“ |
No | Not set | Patient | ||
Change in EpisodeOfCare of CareTeam, scheduled CareTeam, status or scheduled status | Yes | Not set | One Communication will be created for each CareTeam associated with the CarePlan. | “Der er sket ændringer i dit forløb den %s. Se i din telemedicinske løsning.“ |
No | Not set | Patient | ||
Reminder to submit measurement | Yes |
| Patient | “Du har en opgave. Se den i din telemedicinske løsning.” |
If a contract has a reminder days setup and a matching order/orderline have an agreedDateFrom – reminder days = current day | Yes |
| Patient | “Der kommer en leverance af telemedicinsk udstyr mellem %s og %s.“
|
Reminder about appointment | Yes |
| Patient | “Husk din aftale den %. Se den i din telemedicinske løsning.“ |
Reminder about the video appointment | Yes |
| Patient | “Husk din videoaftale den %. Åbn din telemedicinske løsning for at deltage i videomødet.“ |
Automated creation of Communication with | No |
| Patient | "Du har modtaget en ny besked. Se den i din telemedicinske løsning.“ |
If a situation’s default creation and medium is not as wanted, one can override it by use of a CommunicationRequest to opt in/out of creation, or to override the medium.
Overriding default Communications
Overriding the default settings for the automated Communication creations is done using the CommunicationRequest resource.
The table below outlines the override possibilities with respect to default creation and default medium. However, more control is possible and is described in Controlling Creation of Messages.
Situation/Trigger | Recipient | Default Creation Overridable | Default Medium Overridable |
---|---|---|---|
Measurement submitted at unexpected time | CareTeam | Yes | No |
Patient | Yes | Yes | |
Automated processing rule requests Communication(s) to be made. | CareTeam | Yes | No |
Patient | Yes | Yes | |
Missing measurement | CareTeam | Yes | No |
Patient | Yes | Yes | |
Creation of EpisodeOfCare | CareTeam | Yes | No |
Patient | Yes | Yes | |
Creation of CarePlan ($apply) | CareTeam | Yes | No |
Patient | Yes | Yes | |
Change in CarePlan of CareTeam, scheduled CareTeam, status or scheduled status | CareTeam | Yes | No |
Patient | Yes | Yes | |
Change in EpisodeOfCare of CareTeam, scheduled CareTeam, status or scheduled status | CareTeam | Yes | No |
Patient | Yes | Yes | |
Reminder to submit measurement | Patient | Yes | Yes |
If a contract has a reminder days setup and a matching order/Orderline has an agreedDateFrom – reminder days = current day | Patient | Yes | Yes |
Reminder about appointment | Patient | Yes | Yes |
Reminder about the video appointment | Patient | Yes | Yes |
Automated creation of Communication with | Patient | Yes | No |
Overriding whether a Communication is made by default is done by use of the doNotPerform
-field which can be set to either true
or false
. If a Communication is by default not created for a situation, one can set doNotPerform=false
to opt in and actually have Communications created, additionally, if a Communication is created by default for a situation, it can be opted out of by setting doNotPerform=true
.
Overriding the medium is done setting the medium-field of the CommunicationRequest. For example, if one wants to change the medium to nemsms
when it is by default not set, one will set medium=nemsms
as described in Controlling Creation of Messages | Overriding the Payload and/or Medium. Additionally, If the medium is by default nemsms
but one overrides it to be not set, an SMS will no longer be sent, however, a Communication will still be created in the infrastructure.
Related documentation
https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-communication.html
https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-message.html
https://ehealth.sundhed.dk/fhir/StructureDefinition-ehealth-communication-request.html
https://ehealth.sundhed.dk/fhir/ValueSet-message-medium.html
Automated Processing | AutomatedProcessing OverviewofCommunicationcreatedbytheInfrastructure
Controlling Creation of Messages