Skip to content

Procedure Profile

Canonical../StructureDefinition/nexus-emr-core-procedure
Statusdraft · 1.26.0
BaseProcedure (constraint)
SourceFSH · JSON

Defines the Nexus EMR FHIR profile for Procedure resources, based on CA-Core Procedure constraints, for aggregating data from multiple EMRs.

FSH

The authored source of truth: resources/StructureDefinition-nexus-emr-core-procedure.fsh (edit on GitHub). One FSH file may define several related artifacts.

// NexusEmrCoreProcedure.fsh 

Alias: $NexusEmrCoreProcedure = ../StructureDefinition/nexus-emr-core-procedure


// Profile Definition
Profile:        NexusEmrCoreProcedure
Parent:         Procedure
Id:             nexus-emr-core-procedure
Title:          "Procedure Profile"
Description:    "Defines the Nexus EMR FHIR profile for Procedure resources, based on CA-Core Procedure constraints, for aggregating data from multiple EMRs."
* ^url = $NexusEmrCoreProcedure // Canonical URL from alias
* ^status = #draft
* insert NoResourceNoteExtension

// THE effective date for this profile (see the EffectiveDate / NoEffectiveDate
// RuleSets): one date concept per resource, declared here rather than guessed.
* insert EffectiveDate([[performedDateTime | performedPeriod.start]])

// Salient fields — the reader/render surface (see SalientField + the Salient RuleSet).
* insert Salient(code, code, coded)
* insert Salient(status, status, code)
* insert Salient(performed, [[performedDateTime | performedPeriod.start]], dateTime)
* insert Salient(reason_code, reasonCode, coded)
* insert Salient(body_site, bodySite, coded)
* insert Salient(outcome, outcome, coded)

// SMART on FHIR exposure -- this resource is reachable by an app, and these are the
// permissions each operation costs (see SmartExposed + the SmartExposed RuleSet).
* insert SmartExposed(procedure)

// --- Element Constraints ---

* . ^short      = "Nexus EMR Procedure Core"
* . ^definition = """
  Represents clinical procedures performed on patients, capturing key details
  like procedure code, status, performed date/time, and performer using standard
  Nexus EMR references. Uses instance-specific identifiers for tracking
  procedures across systems.
  """

* meta.source 0..1 MS
* meta.source ^short = "Identifies EMR instance & pipeline version the resource came from"
* meta.source ^definition = "A URI that identifies the EMR pipeline and version from which this resource originated.  This tells you which EMR instance (recommend using the instance identifier), and the version of the pipeline code/transformations."

* text 0..1 MS // Narrative element with human-readable summary
* text ^short = "Narrative"
* text ^definition = "A human-readable narrative summary of the NexusEmrCoreProcedure resource for human interpretation."

// Identifier: A business identifier is recommended but not required (any system).
* identifier 0..* MS
* identifier.system 1..1
* identifier.value 1..1

* identifier ^short = "Business identifier(s) for procedure"
* identifier ^definition = """
Unique identifiers for the procedure.

A business identifier is recommended but not required (identifier is 0..*). Where available, carry the source-system identifier using the most appropriate system URI. No specific canonical system is mandated.

A source system's own identifier SHOULD be carried alongside this one, flagged `use = secondary`. See [Carrying the raw code](../guide/patterns/raw-codes.md).
"""


// Status: preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
* status 1..1 MS
* status ^short = "preparation | in-progress | completed | entered-in-error"
* status ^definition = "A code specifying the state of the procedure. Generally this will be completed or entered-in-error."
* status ^comment = "This is a modifier element. The status affects the interpretation of the procedure."
* status from http://hl7.org/fhir/ValueSet/event-status (required)

// Status reason: why something that was recommended was not carried out. DELIBERATELY UNBOUND --
// a `not-done` Procedure carrying only a SNOMED reason is legitimate chart data written by another
// path, and a binding stronger than a hint would start flagging it. The reachable vocabulary is the
// Care Satisfier Reason code system; the ^comment below states the shape that is actually written.
* statusReason 0..1 MS
* statusReason ^short = "Why the procedure was not done"
* statusReason ^definition = "The reason a procedure that was expected or recommended was not carried out. Meaningful only where `status` is `not-done`."
* statusReason ^comment = """
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.
"""
// Code: What procedure was performed. Mandatory and MS per CA-Core.
* code 1..1 MS
* code ^short = "Procedure performed with raw code support"
* insert SourceCoding(code)
* code ^definition = """
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.
"""
* code.text 1..1 MS
* code.text ^short = "Human-readable procedure description (required)"
* code.text ^definition = "Plain text representation of the procedure, required for all entries"

* code.coding 0..* MS
* code.coding ^short = "A coded form of the procedure"
* code.coding ^comment = "Optional overall (aggregation from source EMRs cannot always code). For ORIGINATING writes (a clinician recording a procedure directly), a coded value SHOULD be captured -- SNOMED CT preferred -- for IPS / US Core / Ontario forward interop. Text-primary remains valid where no raw coding exists."

// CCI slot (FHIR-29): a NAMED slice for the Canadian Classification of Health Interventions,
// same posture as Condition's icd10ca slice -- the IG declares the SLOT and the system URI
// (Infoway-registered; provisional until the terminology-server lane confirms), codes are NOT
// enumerated (CIHI-licensed; paperwork in flight).
* code.coding ^slicing.discriminator[0].type = #value
* code.coding ^slicing.discriminator[0].path = "system"
* code.coding ^slicing.rules = #open
* code.coding contains cci 0..*
* code.coding[cci].system = $CCI (exactly)
* code.coding[cci].code 1..1
* code.coding[cci] ^short = "CCI coding (system slot only; codes not enumerated -- CIHI-licensed)"



// Subject (Patient): Who procedure was performed on. Mandatory and MS. Use ID.
* subject 1..1 MS
* subject ^short = "Who the procedure was performed on"
* subject ^definition = "The patient on whom the procedure was performed. Must reference using Nexus EMR patient identifier."
* subject ^comment = "References should use identifier-based references following Nexus EMR patterns."
* subject only Reference(NexusEmrCorePatient)

// Encounter: Context of procedure. Optional but MS per CA-Core. Use ID.
* encounter 0..1
* encounter ^short = "Encounter when procedure was performed"
* encounter ^definition = "The encounter during which the procedure was performed. Optional but provides important clinical context."
* encounter ^comment = "Linking to encounter helps establish the clinical context and timing of the procedure."
* encounter only Reference(NexusEmrCoreEncounter)

// Performed[x]: When performed. Mandatory and MS per CA-Core.
* performed[x] 0..1 MS
* performed[x] ^short = "When the procedure was performed"
* performed[x] ^definition = "The date, period, or age when the procedure was performed. For procedures that span time, use Period."
* performed[x] ^comment = "Use the appropriate data type: dateTime for single point in time, Period for procedures spanning time."
* performed[x] only dateTime or Period or string or Age or Range

// Category: Classification of the procedure
* category 0..1 MS
* category ^short = "Classification of the procedure"
* category ^definition = "A code that classifies the procedure for searching, sorting and display purposes."
* category ^comment = "Examples include: surgical, diagnostic, therapeutic, preventive."
* category from http://hl7.org/fhir/ValueSet/procedure-category (example)

// Body Site: Target body sites
* bodySite 0..* MS
* bodySite ^short = "Target body sites"
* bodySite ^definition = "Detailed and structured anatomical location information."
* bodySite ^comment = "Multiple body sites can be specified for procedures affecting multiple areas."
* bodySite.text 1..1 MS

// Outcome: The result of procedure
* outcome 0..1
* outcome ^short = "The result of procedure"
* outcome ^definition = "The outcome of the procedure - successful, partially successful, unsuccessful, etc."
* outcome ^comment = "If outcome contains narrative text only, it can be captured using the CodeableConcept.text."

// Complication: Complication following the procedure
* complication 0..*
* complication ^short = "Complication following the procedure"
* complication ^definition = "Any complications that occurred during or following the procedure."
* complication ^comment = "If complications are tracked as separate conditions, reference them here."

* note 0..* MS
* note ^short = "Additional information about the procedure"
* note ^definition = "Any additional information or comments about the procedure."