Skip to content

Condition Profile

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

Nexus EMR profile for Condition resource, representing health concerns (CII E11) or clinical assessments (CII E34). Constrains necessary elements, requires a Nexus EMR identifier, and adds support for required extensions and security labels.

FSH

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

// NexusEmrCoreCondition.fsh
// Defines the Nexus EMR Condition profile, representing health concerns


Alias: $NexusEmrCoreCondition = ../StructureDefinition/nexus-emr-core-condition


// Profile Definition
Profile:        NexusEmrCoreCondition
Parent:         Condition
Id:             nexus-emr-core-condition
Title:          "Condition Profile"
Description:    "Nexus EMR profile for Condition resource, representing health concerns (CII E11) or clinical assessments (CII E34). Constrains necessary elements, requires a Nexus EMR identifier, and adds support for required extensions and security labels."
* ^url = $NexusEmrCoreCondition // 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([[onsetDateTime | onsetPeriod.start | recordedDate]])

// Salient fields — the reader/render surface (see SalientField + the Salient RuleSet).
* insert Salient(code, code, coded)
* insert Salient(clinical_status, clinicalStatus, code)
* insert Salient(verification_status, verificationStatus, code)
* insert Salient(category, category, coded)
* insert Salient(onset, [[onsetDateTime | onsetPeriod.start]], dateTime)
* insert Salient(recorded_date, recordedDate, dateTime)
* insert Salient(body_site, bodySite, 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(condition)

// --- Element Constraints ---

* . ^short      = "Nexus EMR Condition Core"
* . ^definition = """
  Represents clinical conditions, problems, or diagnoses, capturing key details
  like condition code, clinical status, verification status, and onset using standard
  Nexus EMR references. Uses instance-specific identifiers for tracking conditions
  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 NexusEmrCoreCondition resource for human interpretation."

// Identifier: optional (0..*), Must Support. A Nexus EMR Condition Identifier is recommended.
// Originating writes (e.g. the CPP) legitimately carry no identifier.
* identifier 0..* MS
* identifier.system 1..1
* identifier.value 1..1


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

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).
"""


// Code: The specific condition/finding. Mandatory and MS.
// Maps to CII E11 (Health Concern) or E34 (Clinical Assessment).
* code 1..1 MS
* code ^short = "Condition/diagnosis with raw code support"
* insert SourceCoding(code)
* code ^definition = """
The specific condition, problem, or diagnosis.

REQUIRED: text element for human readability
OPTIONAL: Standard terminology codes (ICD-10, SNOMED CT, etc.)
OPTIONAL: Raw EMR condition codes for source system preservation

Nexus EMR does not mandate a specific coding system for conditions.
The text element ensures human readability even when coded values are not recognized.
"""
* code.text 1..1 MS
* code.text ^short = "Human-readable condition description (required)"
* code.text ^definition = "Plain text representation of the condition, required for all entries"
* code.coding 0..* MS
* code.coding ^short = "A coded form of the condition"
* code.coding ^comment = "Optional overall (aggregation from source EMRs cannot always code). For ORIGINATING writes (a clinician entering a problem directly, e.g. the CPP), a coded value SHOULD be captured -- SNOMED CT preferred -- to meet the IPS / US Core / Ontario-patient-summary coded-problem bar and avoid a re-code migration later. Text-primary remains valid where no raw coding exists."

// ICD-10-CA slot (FHIR-29): a NAMED slice for the Canadian classification coding, so consumers
// (billing, Ontario reporting, the terminology-server lane) find it without sniffing systems.
// Codes are deliberately NOT enumerated in the IG -- ICD-10-CA content is CIHI-licensed and the
// licence paperwork is in flight (the prevention-catalog pattern: the IG declares the SLOT and
// the system; content governance lives outside). The slot is optional: most conditions carry
// SNOMED or text only.
* code.coding ^slicing.discriminator[0].type = #value
* code.coding ^slicing.discriminator[0].path = "system"
* code.coding ^slicing.rules = #open
* code.coding contains icd10ca 0..*
* code.coding[icd10ca].system = $ICD10CA (exactly)
* code.coding[icd10ca].code 1..1
* code.coding[icd10ca] ^short = "ICD-10-CA coding (system slot only; codes not enumerated -- CIHI-licensed)"



// Clinical Status: active | recurrence | relapse | inactive | remission | resolved
* clinicalStatus ^short = "Whether the condition is still current"
* clinicalStatus ^definition = "The clinical status of the condition. Indicates whether the condition is currently active or resolved."
* clinicalStatus ^comment = "This is a modifier element that affects how the condition should be interpreted in clinical decision support."
* clinicalStatus from http://hl7.org/fhir/ValueSet/condition-clinical (required)

// Verification Status: unconfirmed | provisional | differential | confirmed | refuted | entered-in-error
* verificationStatus ^short = "How confident the recorder is that the condition is real"
* verificationStatus ^definition = "The verification status to support the clinical status of the condition. Indicates the confidence in the condition."
* verificationStatus ^comment = "This is a modifier element. Unconfirmed conditions should be interpreted with caution."
* verificationStatus from http://hl7.org/fhir/ValueSet/condition-ver-status (required)

// Category: problem-list-item | encounter-diagnosis
* category 1..* MS
* category ^short = "problem-list-item | encounter-diagnosis"
* category ^definition = """
A category assigned to the condition. Distinguishes problem list items from encounter diagnoses.

**Binding guidance for downstream converters:**
- Conditions sourced from `dxresearch` (disease registry) → `problem-list-item`
- Conditions sourced from `casemgmt_issue` with CPP types (e.g. `MedHistory`) → `problem-list-item`
- Conditions referenced from an Invoice line item or appointment → `encounter-diagnosis`
"""
* category ^comment = "Multiple categories can be assigned. Problem list items persist across encounters."
* category from http://hl7.org/fhir/ValueSet/condition-category (extensible)

// Severity: Subjective severity of condition
* severity ^short = "Subjective severity of condition"
* severity ^definition = "A subjective assessment of the severity of the condition as evaluated by the clinician."
* severity ^comment = "Severity may be used for clinical decision support and prioritization."
* severity from http://hl7.org/fhir/ValueSet/condition-severity (preferred)

// Subject: Reference MUST use identifier. Maps to CII subject.
* subject 1..1 MS
* subject ^short = "Who has the condition"
* subject ^definition = "The patient who has the condition, problem, or diagnosis. Must reference using Nexus EMR patient identifier."
* subject ^comment = "References should use identifier-based references following Nexus EMR patterns."
* subject only Reference(NexusEmrCorePatient)

// Encounter: Optional reference, MUST use identifier if present.
* encounter 0..1 MS
* encounter ^short = "Encounter when condition was documented"
* encounter ^definition = "The encounter during which this condition was recorded or diagnosed. Optional but provides important clinical context."
* encounter ^comment = "Linking to encounter helps establish when and where the condition was identified or managed."
* encounter only Reference(NexusEmrCoreEncounter)

// Onset: Optional date/time of condition onset. MS per CA Core.
* onset[x] MS
* onset[x] ^short = "When the condition started"
* onset[x] ^definition = "The date/time or age when the condition first manifested or was first observed. Can be a specific date, age, period, or range."
* onset[x] ^comment = "The onset may be vague (e.g., 'childhood') or precise. Use the most appropriate data type."

* abatement[x] MS

// Recorded Date: When the condition was recorded. MS per CA Core.
* recordedDate MS
* recordedDate ^short = "Date condition was first recorded"
* recordedDate ^definition = "The date on which the condition was first recorded in this system. This may differ from the onset date."
* recordedDate ^comment = "This represents when the condition was documented, not when it first occurred."

* asserter


// Note: THE RESOURCE'S CLINICAL COMMENTS, and nothing else. Unprofiled until now, which left every
// reader to guess both what the element was for and whether its attribution could be relied on.
//
// PLAIN ANNOTATION, DELIBERATELY -- NOT THE TASK NOTE PROFILE. `Task.note` is typed to Task Note
// because a task is a conversation handed between parties and a turn with no author is a statement
// in the record with nobody behind it. A comment on a problem or diagnosis is a different animal: a remark
// about the record, not a turn addressed to someone, and requiring an author and a time on every
// one of them would make unattributed comments -- including every comment arriving from a source
// system that never carried the fields -- non-conformant for attribution nothing reads. The
// Resource Note extension is likewise not used here: it exists for resources R4 gives NO note
// element, and this resource has one.
* note 0..* MS
* note ^short = "Clinical comments on the condition -- one whole comment per repeat"
* note ^definition = """
Free-text clinical comment about a problem or diagnosis: what a person wanted to say about it that no other
element carries.

**One whole comment per repeat.** `note.text` is the comment in full, and a consumer renders it
verbatim.

**`note.text` is not a carrier for other fields.** A consumer MUST NOT parse it for prefixes,
markers, keys or any other in-band convention, and a producer MUST NOT encode in it a value that
belongs to an element or an extension of its own. Anything with its own editing lifecycle -- one
box, edited and cleared on its own -- gets its own address, as an element of this resource or as an
extension declared by this guide.
"""
* note ^comment = "Attribution is OPTIONAL here, unlike on a task. `author[x]` and `time` keep their base R4 cardinality: a producer that has them SHOULD write them, a consumer displays them when present, and no consumer may require them -- comments reaching this element from a source system routinely carry neither. This is why the element is a plain `Annotation` rather than the [Task Note](../fhir/StructureDefinition-nexus-emr-task-note.md) profile, which requires both because a task's turns must each say who said it. Where both are absent, the comment is attributable only to the resource's own provenance."