Skip to content

Medication Strength Extension

Canonical../StructureDefinition/nexus-emr-medication-strength
Statusdraft · 1.26.0
BaseExtension (constraint)
ContextMedicationRequest (element)
SourceFSH · JSON

Extension to capture medication strength information when using medicationCodeableConcept

FSH

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

// NexusEmrCoreMedicationRequest.fsh

Alias: $NexusEmrCoreMedicationRequest = ../StructureDefinition/nexus-emr-core-medicationrequest
Alias: $NexusEmrMedicationStrength = ../StructureDefinition/nexus-emr-medication-strength

// Extension Definition for Medication Strength
Extension: NexusEmrMedicationStrength
Id: nexus-emr-medication-strength
Title: "Medication Strength Extension"
Description: "Extension to capture medication strength information when using medicationCodeableConcept"
* ^url = $NexusEmrMedicationStrength
* ^context[0].type = #element
* ^context[0].expression = "MedicationRequest"
* ^status = #draft
* . ^short = "Medication strength details"
* . ^definition = "Captures medication strength as text and optionally as a structured quantity"
* extension contains
    strengthText 1..1 MS and
    strengthQuantity 0..1 MS
* extension[strengthText] ^short = "Human-readable strength description"
* extension[strengthText] ^definition = "Plain text representation of the medication strength (e.g., '500mg', '10mg/5mL')"
* extension[strengthText].url = "strengthText" (exactly)
* extension[strengthText].value[x] only string
* extension[strengthText].valueString 1..1
* extension[strengthText].valueString ^short = "Strength as text"
* extension[strengthText].valueString ^example.label = "General"
* extension[strengthText].valueString ^example.valueString = "500mg"
* extension[strengthQuantity] ^short = "Structured strength representation"
* extension[strengthQuantity] ^definition = "Optional structured representation of medication strength using numerator/denominator"
* extension[strengthQuantity].url = "strengthQuantity" (exactly)
* extension[strengthQuantity].extension contains
    numerator 0..1 MS and
    denominator 0..1 MS
* extension[strengthQuantity].extension[numerator] ^short = "Strength numerator"
* extension[strengthQuantity].extension[numerator].url = "numerator" (exactly)
* extension[strengthQuantity].extension[numerator].value[x] only Quantity
* extension[strengthQuantity].extension[numerator].valueQuantity 1..1
* extension[strengthQuantity].extension[denominator] ^short = "Strength denominator"
* extension[strengthQuantity].extension[denominator].url = "denominator" (exactly)
* extension[strengthQuantity].extension[denominator].value[x] only Quantity
* extension[strengthQuantity].extension[denominator].valueQuantity 0..1


// Profile Definition
Profile:        NexusEmrCoreMedicationRequest
Parent:         MedicationRequest
Id:             nexus-emr-core-medicationrequest
Title:          "MedicationRequest Profile"
Description:    "Defines the Nexus EMR FHIR profile for MedicationRequest resources, based on CA-Core constraints, for aggregating prescription data from multiple EMRs."
* ^url = $NexusEmrCoreMedicationRequest // 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([[authoredOn]])

// Salient fields — the reader/render surface (see SalientField + the Salient RuleSet).
* insert Salient(medication, [[medicationCodeableConcept.text | medicationCodeableConcept.coding.first().display | medicationReference.display]], string)
* insert Salient(status, status, code)
* insert Salient(intent, intent, code)
* insert Salient(dosage, [[dosageInstruction.first().text]], string)
* insert Salient(authored, [[authoredOn]], dateTime)
* insert Salient(reason_code, reasonCode, coded)
* insert Salient(requester, [[requester.display]], string)

// 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(medicationrequest)

// --- Element Constraints ---

* . ^short      = "Nexus EMR Medication Request Core"
* . ^definition = """
  Represents prescriptions and medication orders, capturing key details
  like medication, dosage, route, frequency, and prescriber using standard
  Nexus EMR references. Uses instance-specific identifiers for tracking
  medication requests 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 NexusEmrCoreMedicationRequest 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 medicationrequest"
* identifier ^definition = """
Unique identifiers for the medicationrequest.

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: active, completed, stopped, etc. Mandatory and MS.
* status 1..1 MS
* status ^short = "Where the prescription is in its lifecycle"
* status ^definition = "The current state of the medication request. Indicates whether the prescription is active, completed, or cancelled."
* status ^comment = "This is a modifier element. Cancelled or stopped prescriptions should not be dispensed."
* status from http://hl7.org/fhir/ValueSet/medicationrequest-status (required)

* statusReason 0..1
* statusReason ^short = "Reason for current status"
* statusReason ^definition = "Captures the reason for the current status of the medication request, if known."

// Intent: Must be 'order' for prescriptions. Mandatory and MS.
* intent 1..1 MS
* intent ^short = "proposal | plan | order | instance-order"
* intent ^definition = "Whether the request is a proposal, plan, or an original order. For prescriptions, this must be 'order'."
* intent ^comment = "This element distinguishes between different stages of the medication workflow."
* intent = #order (exactly)
* intent from http://hl7.org/fhir/ValueSet/medicationrequest-intent (required)

// Medication: use medicationCodeableConcept.
//
// The deprecated contained-Medication pattern (medicationReference + a contained
// NexusEmrContainedMedicationCore resource) has been removed. Medication detail is
// carried inline on medicationCodeableConcept, with strength on the extension below.
//
* medication[x] 1..1 MS
* medication[x] only CodeableConcept
* medicationCodeableConcept ^short = "Medication, with raw code support"
* insert SourceCoding(medicationCodeableConcept)
* medicationCodeableConcept ^definition = """
Identifies the medication being requested.

REQUIRED: text element for human readability
RECOMMENDED: an ingredient-level code whenever the source has one. CCDD is preferred; where
there is no CCDD the Health Canada DPD active-ingredient group number is the one to carry,
with ATC for class-level records. This is the level at which two prescriptions can be compared
to each other, or a prescription to a recorded allergy.
RECOMMENDED: the DIN when the source has one, which says WHICH marketed product was ordered
OPTIONAL: raw EMR codes (FDB, internal codes) for source-system preservation

Nexus EMR does not require a coded medication but mandates the text element. The two coding
levels answer different questions and neither substitutes for the other; the coding slices
below declare both. When strength must be documented separately from the medication code,
use the medicationStrength extension below.
"""
* medicationCodeableConcept.text 1..1 MS
* medicationCodeableConcept.text ^short = "The medication as written, in human-readable form"
* medicationCodeableConcept.text ^comment = "Required."

// Drug identity at both levels -- product (DIN) and ingredient (CCDD, ATC, and the Health
// Canada DPD active-ingredient group). The two-level model is documented on the
// MedicationCoding RuleSet.
// The DIN system is http://hl7.org/fhir/NamingSystem/ca-hc-din -- HL7 Terminology's official
// canonical for it, and what it is served at. An earlier revision of this specification fixed
// http://hl7.org/fhir/sid/ca-hc-din, which no publisher declares; see the din slice for what an
// implementer holding that value should do.
// See: https://terminology.hl7.org/NamingSystem-ca-hc-din.html
* insert MedicationCoding(medicationCodeableConcept)

// Medication strength (optional; carried alongside medicationCodeableConcept)
* extension contains $NexusEmrMedicationStrength named medicationStrength 0..1 MS
* extension[medicationStrength] ^short = "Medication strength information"
* extension[medicationStrength] ^definition = "Captures medication strength (text plus optional structured quantity) alongside medicationCodeableConcept."

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

// Encounter: Associated encounter. Optional. Use ID.
* encounter 0..1 MS
* encounter ^short = "Encounter during which prescription was written"
* encounter ^definition = "The encounter during which this medication was prescribed. Optional but provides important clinical context."
* encounter ^comment = "Linking to encounter helps establish the clinical context of the prescription."
* encounter only Reference(NexusEmrCoreEncounter)

// Authored On Date: When written. Mandatory and MS.
* authoredOn 1..1 MS
* authoredOn ^short = "When prescription was written"
* authoredOn ^definition = "The date and time when the prescription was written or created in the system."
* authoredOn ^comment = "This represents the prescribing date, not when the medication was dispensed."

// Dosage Instruction: How to take. Optional but MS per CA-Core.
* dosageInstruction 0..* MS
* dosageInstruction ^short = "How medication should be taken"
* dosageInstruction ^definition = "Complete instructions for how the medication should be administered, including dose, route, frequency, and duration."
* dosageInstruction ^comment = "Free text sig instructions are required. Structured elements provide additional detail."
* dosageInstruction.text 1..1 MS
* dosageInstruction.text ^short = "Free text dosage instructions (sig)"
* dosageInstruction.text ^definition = "Complete dosage instructions as they should appear on the prescription label."
* dosageInstruction.route 0..1 MS
* dosageInstruction.route ^short = "Route of administration with raw code support"
* dosageInstruction.route ^definition = """
Route of medication administration (e.g., oral, intravenous, topical).

REQUIRED: text element for human readability
RECOMMENDED: SNOMED CT or other standard terminology when available
OPTIONAL: Raw EMR codes for source system preservation

The text element ensures human readability even when coded values are not recognized.
"""
* dosageInstruction.route from http://hl7.org/fhir/ValueSet/route-codes (preferred)
* dosageInstruction.route.text 1..1 MS
* dosageInstruction.route.text ^short = "Human-readable route description (required)"
* dosageInstruction.route.text ^definition = "Plain text representation of the route of administration, required for all entries"


* dosageInstruction.timing 0..1 MS
* dosageInstruction.timing ^short = "When medication should be taken"
* dosageInstruction.timing ^definition = "Structured timing instructions including frequency, duration, and when to take."
* dosageInstruction.timing.repeat 0..1
* dosageInstruction.timing.repeat.boundsPeriod 0..1
* dosageInstruction.timing.repeat.boundsPeriod.start 0..1
* dosageInstruction.timing.repeat.boundsPeriod.end 0..1
* dosageInstruction.timing.repeat.boundsDuration 0..1
* dosageInstruction.timing.repeat.boundsDuration.value 0..1
* dosageInstruction.timing.repeat.boundsDuration.unit 0..1
* dosageInstruction.doseAndRate 0..*
* dosageInstruction.doseAndRate.doseQuantity 0..1
* dosageInstruction.doseAndRate.doseQuantity ^short = "Patient-administered dose quantity (e.g., 2 tablets)"
* dosageInstruction.doseAndRate.doseQuantity only SimpleQuantity
* dosageInstruction.doseAndRate.doseQuantity.value 1..1
* dosageInstruction.doseAndRate.doseQuantity.unit 1..1
* dosageInstruction.doseAndRate.doseQuantity.code 0..1
* dosageInstruction.doseAndRate.doseQuantity.code from http://hl7.org/fhir/ValueSet/ucum-units (required)
* dosageInstruction.doseAndRate.doseRange 0..1
* dosageInstruction.doseAndRate.doseRange ^short = "Patient-administered dose range (e.g., 2-5 tablets)"

// Dispense Request: Pharmacy dispensing instructions
* dispenseRequest 0..1 MS
* dispenseRequest ^short = "Pharmacy dispensing instructions"
* dispenseRequest ^definition = "Instructions for the dispensing pharmacist including quantity to dispense and refills."
* dispenseRequest.quantity 0..1 MS
* dispenseRequest.quantity ^short = "Amount to dispense"
* dispenseRequest.numberOfRepeatsAllowed 0..1 MS
* dispenseRequest.numberOfRepeatsAllowed ^short = "Number of refills authorized"
* dispenseRequest.validityPeriod 0..1
* dispenseRequest.validityPeriod.start 0..1
* dispenseRequest.validityPeriod.end 0..1
* dispenseRequest.expectedSupplyDuration 0..1
* dispenseRequest.expectedSupplyDuration.value 1..1
* dispenseRequest.expectedSupplyDuration.unit 1..1
* dispenseRequest.expectedSupplyDuration.system 1..1
* dispenseRequest.expectedSupplyDuration.system = $ucum (exactly)
* dispenseRequest.expectedSupplyDuration.code 1..1

// Requester: Who prescribed the medication
* requester 0..1 MS
* requester ^short = "Who prescribed the medication"
* requester ^definition = "The healthcare provider who prescribed the medication. Should reference a Nexus EMR practitioner."
* requester only Reference(NexusEmrCorePractitionerRole or NexusEmrCorePractitioner)