Skip to content

Communication Request Profile

Canonicalhttps://fhir.apps.health/StructureDefinition/nexus-core-communicationrequest
Statusdraft · 1.33.0
BaseCommunicationRequest (constraint)
SourceFSH · JSON

The request a client submits to send one message by fax, SMS or email: to which recipients, by which channel and sending account, and what to send. It is the input to the message exchange service's $send-message operation, validated against this profile and not stored. Each send is recorded as an outbound-delivery Communication. One channel, or fax with email. Recipients are contained Organizations holding the name and address to use. First pass.

Invariants

Every rule in force on a conforming instance. This profile rows are stated here; inherited rows come from the base resource and are listed so that a constraint named on an element is findable. Invariant keys elsewhere on this page link into this table.

Key Source Severity On Rule
nexus-commreq-address-matches-medium this profile error CommunicationRequest Every address is for a channel on the request.
contained.telecom.all((system = 'fax' and %resource.medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'FAXWRIT').exists()) or (system = 'email' and %resource.medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'EMAILWRIT').exists()) or (system = 'sms' and %resource.medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'SMSWRIT').exists()))
nexus-commreq-channel-has-addressee this profile error CommunicationRequest Every channel on the request has at least one address.
(medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'FAXWRIT').exists() implies contained.telecom.where(system = 'fax').exists()) and (medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'EMAILWRIT').exists() implies contained.telecom.where(system = 'email').exists()) and (medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'SMSWRIT').exists() implies contained.telecom.where(system = 'sms').exists())
nexus-commreq-channels this profile error CommunicationRequest One channel, or fax with email.
medium.count() = 1 or (medium.count() = 2 and medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'FAXWRIT').exists() and medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'EMAILWRIT').exists())
nexus-commreq-email-body this profile error CommunicationRequest An email has at most one body string.
medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'EMAILWRIT').exists() implies payload.content.ofType(string).count() <= 1
nexus-commreq-email-subject this profile error CommunicationRequest An email has a subject; nothing else does.
medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'EMAILWRIT').exists() = extension.where(url = 'https://fhir.apps.health/StructureDefinition/nexus-communication-email-subject').exists()
nexus-commreq-fax-document this profile error CommunicationRequest A fax sends exactly one document, version-specific.
medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'FAXWRIT').exists() implies (payload.content.ofType(Reference).count() = 1 and payload.content.ofType(Reference).all(reference.matches('^DocumentReference/[^/]+/_history/[^/]+$')))
nexus-commreq-one-address-per-channel this profile error CommunicationRequest A recipient has at most one address per channel.
contained.all(telecom.where(system = 'fax').count() <= 1 and telecom.where(system = 'email').count() <= 1 and telecom.where(system = 'sms').count() <= 1)
nexus-commreq-recipient-contained this profile error CommunicationRequest Every recipient is a contained Organization.
recipient.all(reference.startsWith('#'))
nexus-commreq-recipient-named this profile error CommunicationRequest Every contained Organization has a name and at least one address.
contained.all(name.exists() and telecom.exists())
nexus-commreq-sms-text this profile error CommunicationRequest An SMS is one string.
medium.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode' and code = 'SMSWRIT').exists() implies (payload.count() = 1 and payload.content.ofType(string).exists())
nexus-commreq-status this profile error CommunicationRequest A request is active.
status = 'active'
nexus-note-extension-not-where-native this profile error CommunicationRequest The resource-note extension is not used on a resource that has a native note element -- that element is the home
extension('https://fhir.apps.health/StructureDefinition/nexus-emr-resource-note').empty()
dom-2 inherited error CommunicationRequest If the resource is contained in another resource, it SHALL NOT contain nested Resources
contained.contained.empty()
dom-3 inherited error CommunicationRequest If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource
contained.where((('#'+id in (%resource.descendants().reference
dom-4 inherited error CommunicationRequest 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-5 inherited error CommunicationRequest If a resource is contained in another resource, it SHALL NOT have a security label
contained.meta.security.empty()
dom-6 inherited warning CommunicationRequest A resource should have narrative for robust management
text.div.exists()
ele-1 inherited error CommunicationRequest.meta All FHIR elements must have a @value or children
hasValue() or (children().count() > id.count())
ext-1 inherited error CommunicationRequest.extension Must have either extensions or value[x], not both
extension.exists() != value.exists()