Procedure Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-procedure |
|---|---|
| Status | draft · 1.26.0 |
| Base | Procedure (constraint) |
| Source | FSH · JSON |
Defines the Nexus EMR FHIR profile for Procedure resources, based on CA-Core Procedure constraints, for aggregating data from multiple EMRs.
TypedFhir API / Pydantic schema
The typed accessor surface Procedure exposes for Procedure — 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 ProcedureSchema — model_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.
class ProcedureSchema(BaseModel):
"""AI-facing shape of the Procedure 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[
"completed",
"entered-in-error",
"in-progress",
"not-done",
"on-hold",
"preparation",
"stopped",
"unknown",
] | None = Field(
None,
description=(
"preparation | in-progress | completed | entered-in-error. A code specifying the "
"state of the procedure. Generally this will be completed or entered-in-error. Note: "
"This is a modifier element. The status affects the interpretation of the procedure. "
"Procedure.status — 1..1"
),
)
status_reason: Concept | None = Field(
None,
description=(
"Why the procedure was not done. The reason a procedure that was expected or "
"recommended was not carried out. Meaningful only where `status` is `not-done`. Note: "
"Where a care-gap recommendation is recorded as not carried out, `status` is "
"`not-done` and this element carries TWO codings on the one CodeableConcept. The "
"first is the local kind, from [the Care Satisfier Reason code "
"system](../fhir/CodeSystem-care-satisfier-reason.md) "
"(`../CodeSystem/care-satisfier-reason`): `declined`, or "
"`not-applicable`. The second is a SNOMED CT concept from R4's "
"`procedure-not-performed-reason` value set beside it -- `416432009` (Procedure not "
"wanted) for declined, `428119001` (Procedure not indicated) for not-applicable. "
"**The SNOMED coding is what an outside reader interprets; the local coding is what "
"the recording surface reads back.** Both are written, on purpose. The SNOMED "
"concepts are the nearest that value set offers rather than exact equivalents, so "
"recovering the recorded reason from them alone would be an inference rather than a "
"read. **The clinician's own words are in `statusReason.text`**, and are patient "
"information. **No binding is declared here, deliberately.** A `not-done` Procedure "
"carrying only a SNOMED reason -- or a reason from neither system -- was written by "
"some other path and is ordinary chart data. It is left alone rather than mapped "
"back. Read the local coding where it is present; do not require it, and do not treat "
"its absence as a defect. Procedure.statusReason — 0..1"
),
)
category: Concept | None = Field(
None,
description=(
"Classification of the procedure. A code that classifies the procedure for searching, "
"sorting and display purposes. Note: Examples include: surgical, diagnostic, "
"therapeutic, preventive. Procedure.category — 0..1"
),
)
code: Concept | None = Field(
None,
description=(
"Procedure performed with raw code support. The specific procedure that was "
"performed. REQUIRED: text element for human readability RECOMMENDED: Standard "
"terminology codes (CPT, SNOMED CT, LOINC, etc.) OPTIONAL: Raw EMR procedure codes "
"for source system preservation Nexus EMR does not mandate a specific coding system "
"for procedures. The text element ensures human readability even when coded values "
"are not recognized. Note: Where this code was mapped from a source system's own "
"vocabulary, carry the raw coding alongside the mapped one, flagged `userSelected = "
"true`. See [Carrying the raw "
"code](../guide/patterns/raw-codes.md). Procedure.code — 1..1"
),
)
subject: Reference | None = Field(
None,
description=(
"Who the procedure was performed on. The patient on whom the procedure was performed. "
"Must reference using Nexus EMR patient identifier. Note: References should use "
"identifier-based references following Nexus EMR patterns. Procedure.subject — 1..1"
),
)
encounter: Reference | None = Field(
None,
description=(
"Encounter when procedure was performed. The encounter during which the procedure was "
"performed. Optional but provides important clinical context. Note: Linking to "
"encounter helps establish the clinical context and timing of the procedure. "
"Procedure.encounter — 0..1"
),
)
reason_code: Concept | None = Field(
None,
description=(
"Coded reason procedure performed. The coded reason why the procedure was performed. "
"This may be a coded entity of some type, or may simply be present as text. Note: Use "
"Procedure.reasonCode when a code sufficiently describes the reason. Use "
"Procedure.reasonReference when referencing a resource, which allows more information "
"to be conveyed, such as onset date. Procedure.reasonCode and "
"Procedure.reasonReference are not meant to be duplicative. For a single reason, "
"either Procedure.reasonCode or Procedure.reasonReference can be used. "
"Procedure.reasonCode may be a summary code, or Procedure.reasonReference may be used "
"to reference a very precise definition of the reason using Condition | Observation | "
"Procedure | DiagnosticReport | DocumentReference. Both Procedure.reasonCode and "
"Procedure.reasonReference can be used if they are describing different reasons for "
"the procedure. Procedure.reasonCode — 0..*"
),
)
body_site: Concept | None = Field(
None,
description=(
"Target body sites. Detailed and structured anatomical location information. Note: "
"Multiple body sites can be specified for procedures affecting multiple areas. "
"Procedure.bodySite — 0..*"
),
)
outcome: Concept | None = Field(
None,
description=(
"The result of procedure. The outcome of the procedure - successful, partially "
"successful, unsuccessful, etc. Note: If outcome contains narrative text only, it can "
"be captured using the CodeableConcept.text. Procedure.outcome — 0..1"
),
)
complication: Concept | None = Field(
None,
description=(
"Complication following the procedure. Any complications that occurred during or "
"following the procedure. Note: If complications are tracked as separate conditions, "
"reference them here. Procedure.complication — 0..*"
),
)
follow_up: Concept | None = Field(
None,
description=(
"Instructions for follow up. If the procedure required specific follow up - e.g. "
"removal of sutures. The follow up may be represented as a simple note or could "
"potentially be more complex, in which case the CarePlan resource can be used. "
"Procedure.followUp — 0..*"
),
)
note: dict | None = Field(
None,
description=(
"Additional information about the procedure. Any additional information or comments "
"about the procedure. Procedure.note — 0..*"
),
)
used_code: Concept | None = Field(
None,
description=(
"Coded items used during the procedure. Identifies coded items that were used as part "
"of the procedure. Note: For devices actually implanted or removed, use "
"Procedure.device. Procedure.usedCode — 0..*"
),
)
performed: FuzzyDate | None = Field(
None,
description=(
"When the procedure was performed. The date, period, or age when the procedure was "
"performed. For procedures that span time, use Period. Note: Use the appropriate data "
"type: dateTime for single point in time, Period for procedures spanning time. "
"Salient field — performedDateTime | performedPeriod.start"
),
)