Requisition Version Reason Extension¶
| Canonical | ../StructureDefinition/nexus-requisition-version-reason |
|---|---|
| Status | draft · 1.26.0 |
| Base | Extension (constraint) |
| Context | ServiceRequest (element) |
| Source | FSH · JSON |
Why this version of a laboratory requisition was written -- saved, signed and printed, or printed without a signature.
FSH
The authored source of truth: extensions/RequisitionVersionReasonExtension.fsh (edit on GitHub). One FSH file may define several related artifacts.
// RequisitionVersionReasonExtension.fsh
// Why a version of a laboratory requisition was written: saved, signed and printed, or printed
// without a signature.
//
// WHAT IT ADDS THAT VERSIONING ALREADY GIVES. A resource's version history says who changed it and
// when. It does not say what they did. Against the same timestamp and the same author, "saved" and
// "printed" are different events with different consequences -- a printed requisition may already
// be in a patient's hand, and a saved one has not left the building. This element is what makes the
// history readable as a list of what happened rather than a list of writes.
//
// IT RIDES ON THE VERSION, NOT ON THE RESOURCE. Each stored version carries its own reason,
// describing the write that produced THAT version. Reading the current version tells you only how
// the requisition last changed; the sequence is read from the version history.
//
// A CODE, NOT A SENTENCE. The history is rendered in more than one language, and a stored English
// sentence would be shown unchanged to a reader of another. The wording belongs with the surface
// that renders it, so only the code is stored.
//
// ABSENCE IS ORDINARY. Requisitions have versions written before this was recorded, and they carry
// no reason at all. A consumer must render an absent reason as "changed" or similar rather than
// treating it as an error or as any particular one of the three.
//
// NOT A STATUS AND NOT A SIGNATURE. `ServiceRequest.status` is the state of the order.
// `signed-printed` versus `printed-unsigned` records what a particular write DID; whether the
// requisition is signed at that version is read from the signature extension, which is the element
// that carries it.
Extension: NexusRequisitionVersionReason
Id: nexus-requisition-version-reason
Title: "Requisition Version Reason Extension"
Description: """
Why this version of a laboratory requisition was written -- saved, signed and printed, or printed
without a signature.
**It describes the write, not the resource.** A resource's version history records who changed the
requisition and when, but not what they did; against the same author and timestamp, a save and a
print are very different events. Each stored version carries its own reason, describing the write
that produced that version. Reading the current version tells you only how the requisition last
changed -- read the version history for the sequence.
**A code, not a sentence.** The history is rendered in more than one language, so only the code is
stored and the wording belongs with the surface that renders it.
**Absence is ordinary.** Versions written before this was recorded carry no reason. A consumer must
render an absent reason neutrally and must not treat it as an error, or infer any particular one of
the three.
**Not a status, and not a signature.** `ServiceRequest.status` is the state of the order. Whether a
version is signed is read from the requisition's signature extension, not inferred from
`signed-printed` here.
**At most one per version.**
"""
* ^url = "../StructureDefinition/nexus-requisition-version-reason"
* ^status = #draft
* ^context[0].type = #element
* ^context[0].expression = "ServiceRequest"
* extension 0..0
* url 1..1
* value[x] 1..1 MS
* value[x] only code
* valueCode ^short = "Why this version was written: saved | signed-printed | printed-unsigned"
* valueCode ^definition = """
Which exit produced this version of the requisition. One of three codes:
- `saved` -- the requisition was saved without being printed.
- `signed-printed` -- the requisition was signed and printed.
- `printed-unsigned` -- the requisition was printed without a signature.
This element is not bound to a value set. A consumer must treat any other value the same way it
treats an absent one: render the version neutrally rather than failing or guessing, because a value
outside the three says nothing this guide defines.
"""