This
page
is
part
of
the
Continuous
Integration
Build
of
FHIR
Specification
(v4.0.1:
R4
-
Mixed
Normative
and
STU
)
in
it's
permanent
home
(it
will
always
(will
be
available
incorrect/inconsistent
at
this
URL).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
of
available
versions,
see
times).
See
the
Directory
of
published
versions
.
Page
versions:
R4B
R4
Extension-valueset-rules-text.json
Devicerequest.shex
Raw
JSON
(
canonical
form
+
also
see
JSON
Format
Specification
ShEx
)
rules-text
ShEx
statement
for
devicerequest
{
"resourceType" : "StructureDefinition",
"id" : "valueset-rules-text",
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "vocab"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger" : 1
}],
"url" : "http://hl7.org/fhir/StructureDefinition/valueset-rules-text",
"version" : "4.0.1",
"name" : "rules-text",
"status" : "draft",
"date" : "2019-11-01T09:29:23+11:00",
"publisher" : "HL7",
"description" : "An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human.",
"fhirVersion" : "4.0.1",
"mapping" : [{
"identity" : "rim",
"uri" : "http://hl7.org/v3",
"name" : "RIM Mapping"
}],
"kind" : "complex-type",
"abstract" : false,
"context" : [{
"type" : "element",
"expression" : "ValueSet"
}],
"type" : "Extension",
"baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation" : "constraint",
"snapshot" : {
"element" : [{
"id" : "Extension",
"path" : "Extension",
"short" : "An alternative non-computable expression of the value set content",
"definition" : "An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human.",
"min" : 0,
"max" : "1",
"base" : {
"path" : "Extension",
"min" : 0,
"max" : "*"
},
"condition" : ["ele-1"],
"constraint" : [{
"key" : "ele-1",
"severity" : "error",
"human" : "All FHIR elements must have a @value or children",
"expression" : "hasValue() or (children().count() > id.count())",
"xpath" : "@value|f:*|h:div",
"source" : "http://hl7.org/fhir/StructureDefinition/Element"
},
{
"key" : "ext-1",
"severity" : "error",
"human" : "Must have either extensions or value[x], not both",
"expression" : "extension.exists() != value.exists()",
"xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
"source" : "http://hl7.org/fhir/StructureDefinition/Extension"
}],
"isModifier" : false
},
{
"id" : "Extension.id",
"path" : "Extension.id",
"representation" : ["xmlAttr"],
"short" : "Unique id for inter-element referencing",
"definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
"min" : 0,
"max" : "1",
"base" : {
"path" : "Element.id",
"min" : 0,
"max" : "1"
},
"type" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
"valueUrl" : "string"
}],
"code" : "http://hl7.org/fhirpath/System.String"
}],
"isModifier" : false,
"isSummary" : false,
"mapping" : [{
"identity" : "rim",
"map" : "n/a"
}]
},
{
"id" : "Extension.extension",
"path" : "Extension.extension",
"slicing" : {
"discriminator" : [{
"type" : "value",
"path" : "url"
}],
"description" : "Extensions are always sliced by (at least) url",
"rules" : "open"
},
"short" : "Extension",
"definition" : "An Extension",
"min" : 0,
"max" : "0",
"base" : {
"path" : "Element.extension",
"min" : 0,
"max" : "*"
},
"type" : [{
"code" : "Extension"
}],
"constraint" : [{
"key" : "ele-1",
"severity" : "error",
"human" : "All FHIR elements must have a @value or children",
"expression" : "hasValue() or (children().count() > id.count())",
"xpath" : "@value|f:*|h:div",
"source" : "http://hl7.org/fhir/StructureDefinition/Element"
},
{
"key" : "ext-1",
"severity" : "error",
"human" : "Must have either extensions or value[x], not both",
"expression" : "extension.exists() != value.exists()",
"xpath" : "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
"source" : "http://hl7.org/fhir/StructureDefinition/Extension"
}],
"isModifier" : false,
"isSummary" : false
},
{
"id" : "Extension.url",
"path" : "Extension.url",
"representation" : ["xmlAttr"],
"short" : "identifies the meaning of the extension",
"definition" : "Source of the definition for the extension code - a logical name or a URL.",
"comment" : "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
"min" : 1,
"max" : "1",
"base" : {
"path" : "Extension.url",
"min" : 1,
"max" : "1"
},
"type" : [{
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
"valueUrl" : "uri"
}],
"code" : "http://hl7.org/fhirpath/System.String"
}],
"fixedUri" : "http://hl7.org/fhir/StructureDefinition/valueset-rules-text",
"isModifier" : false,
"isSummary" : false,
"mapping" : [{
"identity" : "rim",
"map" : "N/A"
}]
},
{
"id" : "Extension.value[x]",
"path" : "Extension.value[x]",
"short" : "Value of extension",
"definition" : "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/extensibility.html) for a list).",
"min" : 1,
"max" : "1",
"base" : {
"path" : "Extension.value[x]",
"min" : 0,
"max" : "1"
},
"type" : [{
"code" : "markdown"
}],
"constraint" : [{
"key" : "ele-1",
"severity" : "error",
"human" : "All FHIR elements must have a @value or children",
"expression" : "hasValue() or (children().count() > id.count())",
"xpath" : "@value|f:*|h:div",
"source" : "http://hl7.org/fhir/StructureDefinition/Element"
}],
"isModifier" : false,
"isSummary" : false,
"mapping" : [{
"identity" : "rim",
"map" : "N/A"
}]
}]
},
"differential" : {
"element" : [{
"id" : "Extension",
"path" : "Extension",
"short" : "An alternative non-computable expression of the value set content",
"definition" : "An expression that provides an alternative definition of the content of the value set in some form that is not computable - e.g instructions that could only be followed by a human.",
"min" : 0,
"max" : "1"
},
{
"id" : "Extension.extension",
"path" : "Extension.extension",
"max" : "0"
},
{
"id" : "Extension.url",
"path" : "Extension.url",
"fixedUri" : "http://hl7.org/fhir/StructureDefinition/valueset-rules-text"
},
{
"id" : "Extension.value[x]",
"path" : "Extension.value[x]",
"min" : 1,
"type" : [{
"code" : "markdown"
}]
}]
}
}
PREFIX fhir: <http://hl7.org/fhir/>
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# ShEx Version 2.2
IMPORT <Code.shex>
IMPORT <Group.shex>
IMPORT <Range.shex>
IMPORT <Device.shex>
IMPORT <Period.shex>
IMPORT <Timing.shex>
IMPORT <Boolean.shex>
IMPORT <Integer.shex>
IMPORT <Patient.shex>
IMPORT <Location.shex>
IMPORT <DateTime.shex>
IMPORT <CareTeam.shex>
IMPORT <Quantity.shex>
IMPORT <Resource.shex>
IMPORT <Coverage.shex>
IMPORT <Reference.shex>
IMPORT <Canonical.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Provenance.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <ClaimResponse.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <DeviceDefinition.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>
start=@<DeviceRequest> AND {fhir:nodeRole [fhir:treeRoot]}
# Medical device request
<DeviceRequest> EXTENDS @<DomainResource> CLOSED {
a [fhir:DeviceRequest]?;fhir:nodeRole [fhir:treeRoot]?;
fhir:identifier @<OneOrMore_Identifier>?; # External Request identifier
fhir:basedOn @<OneOrMore_Reference_Resource>?; # What request fulfills
fhir:replaces @<OneOrMore_Reference_DeviceRequest>?; # What request replaces
fhir:groupIdentifier @<Identifier>?; # Identifier of composite request
fhir:status @<Code> AND
{fhir:v @fhirvs:request-status}?; # draft | active | on-hold |
# entered-in-error | ended |
# completed | revoked | unknown
fhir:intent @<Code> AND
{fhir:v @fhirvs:request-intent}; # proposal | solicit-offer |
# offer-response | plan | directive
# | order | original-order |
# reflex-order | filler-order |
# instance-order | option
fhir:priority @<Code> AND
{fhir:v @fhirvs:request-priority}?; # routine | urgent | asap | stat
fhir:doNotPerform @<Boolean>?; # True if the request is to stop or
# not to start using the device
fhir:product @<CodeableConcept> OR
(@<Reference> AND {fhir:l @<Device> }) OR
(@<Canonical> AND {fhir:l @<DeviceDefinition> }) ; # Device requested
fhir:quantity @<Integer>?; # Quantity of devices to supply
fhir:parameter @<OneOrMore_DeviceRequest.parameter>?; # Device details
fhir:subject @<Reference> AND {fhir:l
@<Device> OR
@<Group> OR
@<Location> OR
@<Patient> ? }; # Focus of request
fhir:encounter @<Reference> AND {fhir:l
@<Encounter> ? }?; # Encounter motivating request
fhir:occurrence @<DateTime> OR
@<Period> OR
@<Timing> ?; # Desired time or schedule for use
fhir:authoredOn @<DateTime>?; # When recorded
fhir:requester @<Reference> AND {fhir:l
@<CareTeam> OR
@<Device> OR
@<Group> OR
@<Organization> OR
@<Patient> OR
@<Practitioner> OR
@<PractitionerRole> OR
@<RelatedPerson> ? }?; # Who/what submitted the device
# request
fhir:performer @<CodeableReference>?; # Requested Filler
fhir:location @<OneOrMore_CodeableReference>?; # Requested location
fhir:reason @<OneOrMore_CodeableReference>?; # Coded/Linked Reason for request
fhir:asNeeded @<Boolean>?; # PRN status of request
fhir:asNeededFor @<CodeableConcept>?; # Device usage reason
fhir:insurance @<OneOrMore_Reference_ClaimResponse_OR_Coverage>?; # Associated insurance coverage
fhir:supportingInfo @<OneOrMore_Reference_Resource>?; # Additional clinical information
fhir:note @<OneOrMore_Annotation>?; # Notes or comments
fhir:relevantHistory @<OneOrMore_Reference_Provenance>?; # Request provenance
}
# Device details
<DeviceRequest.parameter> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<CodeableConcept>?; # Device detail
fhir:value @<CodeableConcept> OR
@<Quantity> OR
@<Range> OR
@<Boolean> ?; # Value of detail
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
rdf:first @<Identifier> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Identifier>
}
<OneOrMore_Reference_Resource> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<Resource> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource>
}
<OneOrMore_Reference_DeviceRequest> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<DeviceRequest> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_DeviceRequest>
}
<OneOrMore_DeviceRequest.parameter> CLOSED {
rdf:first @<DeviceRequest.parameter> ;
rdf:rest [rdf:nil] OR @<OneOrMore_DeviceRequest.parameter>
}
<OneOrMore_CodeableReference> CLOSED {
rdf:first @<CodeableReference> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference>
}
<OneOrMore_Reference_ClaimResponse_OR_Coverage> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<ClaimResponse> OR
@<Coverage> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_ClaimResponse_OR_Coverage>
}
<OneOrMore_Annotation> CLOSED {
rdf:first @<Annotation> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Annotation>
}
<OneOrMore_Reference_Provenance> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<Provenance> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Provenance>
}
#---------------------- Value Sets ------------------------
# Codes indicating the degree of authority/intentionality associated with a request.
fhirvs:request-intent ["proposal" "solicit-offer" "offer-response" "plan" "directive" "order" "original-order" "reflex-order" "filler-order" "instance-order" "option"]
# Identifies the level of importance to be assigned to actioning the request.
fhirvs:request-priority ["routine" "urgent" "asap" "stat"]
# Codes identifying the lifecycle stage of a request.
fhirvs:request-status ["draft" "active" "on-hold" "entered-in-error" "ended" "completed" "revoked" "unknown"]
Usage
note:
every
effort
has
been
made
to
ensure
that
the
examples
ShEx
files
are
correct
and
useful,
but
they
are
not
a
normative
part
of
the
specification.