Skip to content

Location Profile

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

Generic Nexus EMR core profile for Location, represents an EMR 'location' or 'site' -- basically whatever the EMR uses to break the EMR up into separate slices (often for multisite clinics using the same EMR instance) For single-site clinics, at least one Location object must exist that represents the main site: this makes downstream consumers of the FHIR data easier to write as they can always assume Locations exist. Also, note that NexusEmrAppointment REQUIRES a Location as a participant.

TypedFhir API / Pydantic schema

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

class LocationSchema(BaseModel):
    """AI-facing shape of the Location 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", "inactive", "suspended"] | None = Field(
        None,
        description=(
            "active | suspended | inactive. The operational status of the location. Indicates if "
            "the location is still in use. Note: Locations can be temporarily suspended or "
            "permanently inactive. Location.status — 0..1"
        ),
    )
    operational_status: dict | None = Field(
        None,
        description=(
            "The operational status of the location (typically only for a bed/room). The "
            "operational status covers operation values most relevant to beds (but can also apply "
            "to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically "
            "covers concepts such as contamination, housekeeping, and other activities like "
            "maintenance. Location.operationalStatus — 0..1. codes (preferred): C | H | I | K | O "
            "| U"
        ),
    )
    name: str | None = Field(
        None,
        description=(
            "Name of the location as used by humans. The name of the location as commonly "
            "displayed. This does not need to be unique. Note: The name is what people call the "
            "location, not necessarily its formal or unique name. Location.name — 0..1"
        ),
    )
    description: str | None = Field(
        None,
        description=(
            "Additional details about the location. Additional information to locate or identify "
            "the location beyond its address and name. Note: May include directions, landmarks, "
            "or special instructions. Location.description — 0..1"
        ),
    )
    mode: Literal["instance", "kind"] | None = Field(
        None,
        description=(
            "instance | kind. Whether this represents a specific location (instance) or a class "
            "of locations (kind). Note: Most locations are instances. Kind is used for location "
            "types or templates. Location.mode — 0..1"
        ),
    )
    type: Concept | None = Field(
        None,
        description=(
            "Location type with raw code support. Type of function performed at the location "
            "(e.g., hospital, clinic, pharmacy). RECOMMENDED: Standard terminology codes when "
            "available OPTIONAL: Raw EMR codes for source system preservation. 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). Location.type — 0..*"
        ),
    )
    telecom: dict | None = Field(
        None,
        description=(
            "Contact details of the location. The contact details of communication devices "
            "available at the location. Note: May include phone, fax, email, website, etc. "
            "Location.telecom — 0..*"
        ),
    )
    address: dict | None = Field(
        None,
        description=(
            "Physical location address. The physical address where the location can be found. "
            "Note: This is the address where services are provided or where the physical building "
            "is located. Location.address — 0..1"
        ),
    )
    physical_type: Concept | None = Field(
        None,
        description=(
            "Physical type with raw code support. Physical form of the location (e.g., building, "
            "room, vehicle, house). RECOMMENDED: Standard terminology codes when available "
            "OPTIONAL: Raw EMR codes for source system preservation. Location.physicalType — 0..1"
        ),
    )
    managing_organization: Reference | None = Field(
        None,
        description=(
            "Organization responsible for provisioning and upkeep. The organization responsible "
            "for the provisioning and upkeep of the location. Note: This can also be used as the "
            "part of the organization hierarchy where this location provides services. These "
            "services can be defined through the HealthcareService resource. "
            "Location.managingOrganization — 0..1"
        ),
    )
    part_of: Reference | None = Field(
        None,
        description=(
            "Another Location this one is physically a part of. Another Location of which this "
            "Location is physically a part of. Location.partOf — 0..1"
        ),
    )