MessageHeader Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-messageheader |
|---|---|
| Status | draft (experimental) · 1.26.0 |
| Base | MessageHeader (constraint) |
| Source | FSH · JSON |
Nexus EMR profile for MessageHeader -- the routing envelope on an eReferral message bundle, consumed by the gateway's operation-routing middleware. Infrastructure rather than clinical content: no effective date, and R4 gives it no identifier element. First pass: the event vocabulary is not settled.
TypedFhir API / Pydantic schema
The typed accessor surface MessageHeader exposes for MessageHeader — generated from this IG's compiled profile; each typed accessor has a validating raw-FHIR twin (xRaw) where marked. The three ports are parity-enforced.
The AI-facing shape: from typed_fhir.facade.generated.schemas import MessageHeaderSchema — model_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.
class MessageHeaderSchema(BaseModel):
"""AI-facing shape of the MessageHeader profile: the facade's typed accessor
surface (curated + salient fields) as a pydantic model. `model_json_schema()` is a
structured-output / tool schema; instantiating validates an extraction."""
model_config = ConfigDict(extra="forbid")
destination: dict | None = Field(
None,
description=(
"The intended receiver(s). The destination application which the message is intended "
"for. Note: There SHOULD be at least one destination, but in some circumstances, the "
"source system is unaware of any particular destination system. "
"MessageHeader.destination — 0..*"
),
)
sender: Reference | None = Field(
None,
description=(
"The organization or person responsible for the message content. Identifies the "
"sending system to allow the use of a trust relationship. Note: Distinct from "
"`source`, which is the technical sending system. `sender` is who is accountable for "
"the content -- for inbound partner traffic this is usually an Organization. "
"MessageHeader.sender — 0..1"
),
)
source: dict | None = Field(
None,
description=(
"The system that sent the message. The source application from which this message "
"originated. MessageHeader.source — 1..1"
),
)
responsible: Reference | None = Field(
None,
description=(
"The party accountable for the message. The person or organization that accepts "
"overall responsibility for the contents of the message. The implication is that the "
"message event happened under the policies of the responsible party. Note: Usually "
"only for the request but can be used in a response. MessageHeader.responsible — 0..1"
),
)
reason: Concept | None = Field(
None,
description=(
"Cause of event. Coded indication of the cause for the event - indicates a reason for "
"the occurrence of the event that is a focus of this message. MessageHeader.reason — "
"0..1"
),
)
response: dict | None = Field(
None,
description=(
"Present when this message is a response to an earlier one. Information about the "
"message that this message is a response to. Only present if this message is a "
"response. MessageHeader.response — 0..1"
),
)
focus: Reference | None = Field(
None,
description=(
"The resource(s) this message concerns. The actual data of the message - a reference "
"to the root/focus class of the event. Note: Points at the other entries in the "
"message bundle -- typically a ServiceRequest or Task for an eReferral, plus the "
"Patient. These are intra-bundle references and resolve within the bundle, NOT "
"against the server, which is the usual reason a naive resolver reports them missing. "
"MessageHeader.focus — 0..*"
),
)