Template Profile¶
| Canonical | ../StructureDefinition/nexus-template-list |
|---|---|
| Status | draft · 1.26.0 |
| Base | List (constraint) |
| Source | FSH · JSON |
A reusable template: a List that names and identifies the template, carrying the resources it
produces as prototypes inside a contained transaction Bundle.
TypedFhir API / Pydantic schema
The typed accessor surface List exposes for List — 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 ListSchema — model_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.
class ListSchema(BaseModel):
"""AI-facing shape of the List 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")
status: Literal["current", "entered-in-error", "retired"] | None = Field(
None,
description=(
"current (live assembly) | retired (superseded) | entered-in-error. Indicates the "
"current state of this list. Note: This element is labeled as a modifier because the "
"status contains codes that mark the resource as not currently valid. List.status — "
"1..1"
),
)
mode: Literal["changes", "snapshot", "working"] | None = Field(
None,
description=(
"working | snapshot | changes. How this list was prepared - whether it is a working "
"list that is suitable for being maintained on an ongoing basis, or if it represents "
"a snapshot of a list of items from another source, or whether it is a prepared list "
"where items may be marked as added, modified or deleted. Note: This element is "
"labeled as a modifier because a change list must not be misunderstood as a complete "
"list. List.mode — 1..1"
),
)
title: str | None = Field(
None,
description=(
"The packet's name, as shown where it is assembled and reviewed. A human-readable "
"name for this assembly, shown in the attachment surface that built it and beside the "
"record of what was sent. Names the packet's purpose rather than its members "
"(\"Enclosures - Internal Medicine referral letter\"), because membership is `entry` "
"and changes while the packet is being assembled. List.title — 1..1"
),
)
code: Concept | None = Field(
None,
description=(
"What the purpose of this list is. This code defines the purpose of the list - why it "
"was created. Note: If there is no code, the purpose of the list is implied where it "
"is used, such as in a document section using Document.section.code. List.code — 0..1"
),
)
subject: Reference | None = Field(
None,
description=(
"The patient whose chart these items came from. The common subject (or patient) of "
"the resources that are in the list if there is one. Note: Some purely arbitrary "
"lists do not have a common subject, so this is optional. List.subject — 1..1"
),
)
ordered_by: Concept | None = Field(
None,
description=(
"What order the list has. What order applies to the items in the list. Note: "
"Applications SHOULD render ordered lists in the order provided, but MAY allow users "
"to re-order based on their own preferences as well. If there is no order specified, "
"the order is unknown, though there may still be some order. List.orderedBy — 0..1. "
"codes (preferred): alphabetic | category | entry-date | event-date | patient | "
"priority | system | user"
),
)
entry: dict | None = Field(
None,
description=(
"The members, in order. One member of the packet. `List.entry` is ORDERED, and the "
"order is the order the members appear in the outbound render. `entry.item` is "
"deliberately unconstrained as to resource type: the packet carries what a clinician "
"chose to send, and enumerating the types would reintroduce the per-type modelling "
"this profile exists to replace. A consumer renders the kinds it knows and reports "
"the ones it does not, rather than dropping them silently. An entry MAY carry "
"`nexus-attachment-packet-excluded-page` extensions naming pages of that member the "
"assembler left out. Note: If there are no entries in the list, an emptyReason SHOULD "
"be provided. List.entry — 1..*"
),
)
empty_reason: Concept | None = Field(
None,
description=(
"Why list is empty. If the list is empty, why the list is empty. Note: The various "
"reasons for an empty list make a significant interpretation to its interpretation. "
"Note that this code is for use when the entire list has been suppressed, and not for "
"when individual items are omitted - implementers may consider using a text note or a "
"flag on an entry in these cases. List.emptyReason — 0..1. codes (preferred): closed "
"| nilknown | notasked | notstarted | unavailable | withheld"
),
)