Skip to content

Medication Statement Profile

Canonical../StructureDefinition/nexus-emr-core-medicationstatement
Statusdraft (experimental) · 1.26.0
BaseMedicationStatement (constraint)
SourceFSH · JSON

Nexus EMR profile for MedicationStatement -- patient-reported medication use, distinct from prescriptions. First pass: status, text-first medication concept, effective timing, free-text dosage. Closed to SMART apps pending an exposure decision.

TypedFhir API / Pydantic schema

The typed accessor surface MedicationStatement exposes for MedicationStatement — 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 MedicationStatementSchemamodel_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.

class MedicationStatementSchema(BaseModel):
    """AI-facing shape of the MedicationStatement 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[
        "active",
        "completed",
        "entered-in-error",
        "intended",
        "not-taken",
        "on-hold",
        "stopped",
        "unknown",
    ] | None = Field(
        None,
        description=(
            "active | completed | entered-in-error | intended | stopped | on-hold | unknown | "
            "not-taken. A code representing the patient or other source's judgment about the "
            "state of the medication used that this statement is about. Generally, this will be "
            "active or completed. Note: This is a modifier element; `not-taken` inverts the "
            "meaning of the whole statement and consumers must read it. "
            "MedicationStatement.status — 1..1"
        ),
    )
    status_reason: Concept | None = Field(
        None,
        description=(
            "Reason for current status. Captures the reason for the current state of the "
            "MedicationStatement. Note: This is generally only used for \"exception\" statuses such "
            "as \"not-taken\", \"on-hold\", \"cancelled\" or \"entered-in-error\". The reason for "
            "performing the event at all is captured in reasonCode, not here. "
            "MedicationStatement.statusReason — 0..*"
        ),
    )
    category: Concept | None = Field(
        None,
        description=(
            "Type of medication usage. Indicates where the medication is expected to be consumed "
            "or administered. MedicationStatement.category — 0..1. codes (preferred): community | "
            "inpatient | outpatient | patientspecified"
        ),
    )
    subject: Reference | None = Field(
        None,
        description=(
            "The patient. The person, animal or group who is/was taking the medication. "
            "MedicationStatement.subject — 1..1"
        ),
    )
    date_asserted: FuzzyDate | None = Field(
        None,
        description=(
            "When the statement was captured. The date when the medication statement was asserted "
            "by the information source. MedicationStatement.dateAsserted — 0..1"
        ),
    )
    reason_code: Concept | None = Field(
        None,
        description=(
            "Reason for why the medication is being/was taken. A reason for why the medication is "
            "being/was taken. Note: This could be a diagnosis code. If a full condition record "
            "exists or additional detail is needed, use reasonForUseReference. "
            "MedicationStatement.reasonCode — 0..*"
        ),
    )
    dosage: dict | None = Field(
        None,
        description=(
            "Details of how medication is/was taken or should be taken. Indicates how the "
            "medication is/was or should be taken by the patient. Note: The dates included in the "
            "dosage on a Medication Statement reflect the dates for a given dose. For example, "
            "\"from November 1, 2016 to November 3, 2016, take one tablet daily and from November "
            "4, 2016 to November 7, 2016, take two tablets daily.\" It is expected that this "
            "specificity may only be populated where the patient brings in their labeled "
            "container or where the Medication Statement is derived from a MedicationRequest. "
            "MedicationStatement.dosage — 0..*"
        ),
    )
    medication: str | None = Field(
        None,
        description=(
            "Plain text representation of the concept. A human language representation of the "
            "concept as seen/selected/uttered by the user who entered the data and/or which "
            "represents the intended meaning of the user. Note: Text first, then the first "
            "coding's display. `medication[x]` is constrained to CodeableConcept on this profile, "
            "so there is no reference arm to fall back to. Salient field — "
            "medicationCodeableConcept.text | medicationCodeableConcept.coding.first().display"
        ),
    )
    effective: FuzzyDate | None = Field(
        None,
        description=(
            "When the use applies (dateTime or period). The interval of time during which it is "
            "being asserted that the patient is/was/will be taking the medication (or was not "
            "taking, when the MedicationStatement.taken element is No). Note: When the reported "
            "use APPLIES -- the dateTime, or the start of the period. This is not when the "
            "statement was captured; that is `asserted`. Salient field — effectiveDateTime | "
            "effectivePeriod.start"
        ),
    )
    asserted: FuzzyDate | None = Field(
        None,
        description=(
            "When the statement was captured. The date when the medication statement was asserted "
            "by the information source. Salient field — dateAsserted"
        ),
    )