ServiceRequest Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-servicerequest |
|---|---|
| Status | draft · 1.26.0 |
| Base | ServiceRequest (constraint) |
| Source | FSH · JSON |
Defines the Nexus EMR FHIR profile for ORDER-shaped ServiceRequest resources -- laboratory, diagnostic-imaging and procedure orders -- aggregated from multiple EMRs. Referrals are NOT in scope: a referral is intent=proposal and carries the receiving service or specialty in category, neither of which this profile permits. Referrals use NexusCoreReferral (../StructureDefinition/nexus-core-referral).
FSH
The authored source of truth: resources/StructureDefinition-nexus-emr-core-servicerequest.fsh (edit on GitHub). One FSH file may define several related artifacts.
// NexusEmrCoreServiceRequest.fsh
Alias: $NexusEmrCoreServiceRequest = ../StructureDefinition/nexus-emr-core-servicerequest
// Profile Definition
Profile: NexusEmrCoreServiceRequest
Parent: ServiceRequest
Id: nexus-emr-core-servicerequest
Title: "ServiceRequest Profile"
Description: "Defines the Nexus EMR FHIR profile for ORDER-shaped ServiceRequest resources -- laboratory, diagnostic-imaging and procedure orders -- aggregated from multiple EMRs. Referrals are NOT in scope: a referral is intent=proposal and carries the receiving service or specialty in category, neither of which this profile permits. Referrals use NexusCoreReferral (../StructureDefinition/nexus-core-referral)."
// THE effective date for this profile (see the EffectiveDate / NoEffectiveDate
// RuleSets): one date concept per resource, declared here rather than guessed.
* insert EffectiveDate([[authoredOn]])
// 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(servicerequest)
* ^url = $NexusEmrCoreServiceRequest // Canonical URL from alias
* ^status = #draft
* insert NoResourceNoteExtension
// --- Element Constraints ---
* . ^short = "Nexus EMR Service Request Core (orders)"
* . ^definition = """
Represents ORDERS for diagnostic procedures and other services -- laboratory tests,
diagnostic imaging and procedures -- capturing key details like request type, status,
intent and requester using standard Nexus EMR references. Uses instance-specific
identifiers for tracking service requests across systems.
SCOPE: this profile is order-shaped. `intent` is fixed to `order` and `category` is
bound (required) to the five-concept base FHIR ServiceRequest category value set. A
referral fits neither: it is `intent = proposal`, and its category is the receiving
service or clinical specialty, which that value set does not contain. Referrals are
profiled separately as NexusCoreReferral.
"""
* 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 NexusEmrCoreServiceRequest resource for human interpretation."
// Identifier: A business identifier is recommended but not required (any system). MS per CA-Core.
* identifier 0..* MS
* identifier.system 1..1
* identifier.value 1..1
* identifier ^short = "Business identifier(s) for servicerequest"
* identifier ^definition = """
Unique identifiers for the servicerequest.
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: draft, active, completed, etc. Mandatory and MS.
* status 1..1 MS
* status ^short = "draft | active | on-hold | revoked | completed | entered-in-error"
* status ^definition = "The status of the order. Indicates the current state of the service request."
* status ^comment = "This is a modifier element. The status affects how the request should be processed."
* status from http://hl7.org/fhir/ValueSet/request-status (required)
// Intent: Fixed to 'order' because this profile governs orders only. Supports CII G/I/K
// requirements. Mandatory and MS. A referral is intent=proposal and uses NexusCoreReferral.
* intent 1..1 MS
* intent ^short = "order"
* intent ^definition = "Whether the request is a proposal, plan, an original order or a reflex order. Fixed to `order` on this profile, which governs laboratory, imaging and procedure ORDERS. A referral is `proposal` -- it asks a receiving service to accept the patient and carries no authorization to act -- and is profiled as NexusCoreReferral."
* intent ^comment = "This element distinguishes between different stages of the ordering workflow. A resource that needs `proposal` is not an order and does not belong on this profile."
* intent = #order (exactly)
* intent from http://hl7.org/fhir/ValueSet/request-intent (required)
* category 1..1 MS // Category of service (Lab, DI, procedure). Mandatory and MS.
* category ^short = "Service Category"
* category ^definition = """
The category of service being ORDERED: laboratory tests, diagnostic imaging, or procedures.
The bound value set is the base FHIR ServiceRequest category value set, which enumerates
exactly five concepts (108252007 Laboratory procedure, 363679005 Imaging, 409063005
Counselling, 409073007 Education, 387713003 Surgical procedure). It contains no referral
concept and is not a subtree one could be added under, so a referral is NOT expressible
here and must not be forced into the nearest neighbour. Referrals carry the receiving
service or specialty in category and are profiled as NexusCoreReferral.
"""
* category from http://hl7.org/fhir/ValueSet/servicerequest-category (required)
// Code: What service is ordered (Lab, DI, procedure). Mandatory, MS.
* code 1..1 MS
* code ^short = "Service requested with raw code support"
* code ^definition = """
What service is being ordered (e.g., specific lab test, imaging study, or procedure).
REQUIRED: text element for human readability
RECOMMENDED: SNOMED CT, LOINC, or other standard terminology when available
OPTIONAL: Raw EMR codes for source system preservation
Nexus EMR does not mandate a specific coding system for service request codes.
The text element ensures human readability even when coded values are not recognized.
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).
"""
* code.text 1..1 MS
* code.text ^short = "Human-readable service description (required)"
* code.text ^definition = "Plain text representation of the requested service, required for all entries"
// Subject (Patient): Who service is for. Mandatory and MS. Use ID.
* subject 1..1 MS
* subject ^short = "Individual or entity the service is ordered for"
* subject ^definition = "The patient for whom the service is being requested. 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 request. Optional. Use ID.
* encounter 0..1 MS
* encounter ^short = "Encounter in which the request was created"
* encounter ^definition = "The encounter during which this service request was created. Optional but provides important clinical context."
* encounter ^comment = "Linking to encounter helps establish the clinical context of the request."
* encounter only Reference(NexusEmrCoreEncounter)
// Occurrence[x]: When service occurred. Optional but MS.
* occurrence[x] 0..1 MS
* occurrence[x] ^short = "When service should occur"
* occurrence[x] ^definition = "The date/time or age when the service should occur. Can be a specific time, period, or timing schedule."
* occurrence[x] ^comment = "Use the appropriate data type based on the ordering requirements."
// Authored On Date: When created. Mandatory and MS. Maps to G2/I2/K2.
* authoredOn 1..1 MS
* authoredOn ^short = "Date request was initially authored"
* authoredOn ^definition = "When the request was originally authored/created in the system."
* authoredOn ^comment = "This is the creation date, not when the service should be performed."