Example
GenomicStudy/genomicServiceRequest3
(Turtle)
R3
:
R4
Conversion
maps
for
NamingSystem.
Functional
status
for
this
map:
3
tests
that
all
execute
ok.
1
fail
round-trip
testing
and
3
r3
resources
are
invalid
(0
errors).
(
see
documentation)
4.11.11.1
R3
to
R4
-
Narrative
-
XML
map "http://hl7.org/fhir/StructureMap/NamingSystem3to4" = "R3 to R4 Conversions for NamingSystem"
uses "http://hl7.org/fhir/3.0/StructureDefinition/NamingSystem" alias NamingSystemR3 as source
uses "http://hl7.org/fhir/StructureDefinition/NamingSystem" alias NamingSystem as target
imports "http://hl7.org/fhir/StructureMap/*3to4"
group NamingSystem(source src : NamingSystemR3, target tgt : NamingSystem) extends DomainResource <<type+>> {
src.name -> tgt.name;
src.status -> tgt.status;
src.kind -> tgt.kind;
src.date -> tgt.date;
src.publisher -> tgt.publisher;
src.contact -> tgt.contact;
src.responsible -> tgt.responsible;
src.type -> tgt.type;
src.description -> tgt.description;
src.useContext -> tgt.useContext;
src.jurisdiction -> tgt.jurisdiction;
src.usage -> tgt.usage;
src.uniqueId as vs0 -> tgt.uniqueId as vt0 then {
vs0.type -> vt0.type;
vs0.value -> vt0.value;
vs0.preferred -> vt0.preferred;
vs0.comment -> vt0.comment;
vs0.period -> vt0.period;
};
}
4.11.11.2
-
R4
to
R3
JSON
-
TTL
Raw
Turtle
map "http://hl7.org/fhir/StructureMap/NamingSystem4to3" = "R4 to R3 Conversion for NamingSystem"
(+
also
see
Turtle/RDF
Format
Specification
)
ServiceRequest
-
Genomic
Example
3
@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
uses "http://hl7.org/fhir/StructureDefinition/NamingSystem" alias NamingSystem as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/NamingSystem" alias NamingSystemR3 as target
# - resource -------------------------------------------------------------------
imports "http://hl7.org/fhir/StructureMap/*4to3"
[a fhir:ServiceRequest ;
fhir:nodeRole fhir:treeRoot ;
fhir:id [ fhir:v "genomicServiceRequest3"] ; #
fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource "genomicServiceRequest" </p></div><p><b>identifier</b>: Laboratory Accession ID: 111111111</p><p><b>status</b>: active</p><p><b>intent</b>: plan</p><p><b>code</b>: Carrier detection, molecular genetics (procedure) <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#3981005)</span></p><p><b>subject</b>: <a href=\"Patient-denovoChild.html\">Patient/denovoChild</a> " DOE"</p><p><b>encounter</b>: <a href=\"Encounter-denovoEncounter.html\">Encounter/denovoEncounter</a></p></div>"
] ; #
fhir:identifier ( [
fhir:type [
fhir:coding ( [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
fhir:code [ fhir:v "LACSN" ]
] ) ;
fhir:text [ fhir:v "Laboratory Accession ID" ]
] ;
fhir:system [ fhir:v "http://www.somesystemabc.net/identifiers/serviceRequests"^^xsd:anyURI ] ;
fhir:value [ fhir:v "111111113" ]
] ) ; #
fhir:status [ fhir:v "active"] ; #
fhir:intent [ fhir:v "plan"] ; #
fhir:code [
fhir:concept [
fhir:coding ( [
a sct:3981005 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "3981005" ] ;
fhir:display [ fhir:v "Carrier detection, molecular genetics (procedure)" ]
] )
]
] ; #
fhir:subject [
fhir:reference [ fhir:v "Patient/denovoMother" ]
] ; #
fhir:encounter [
fhir:reference [ fhir:v "Encounter/denovoEncounter" ]
]] . #
group NamingSystem(source src : NamingSystem, target tgt : NamingSystemR3) extends DomainResource <<type+>> {
src.name -> tgt.name;
src.status -> tgt.status;
src.kind -> tgt.kind;
src.date -> tgt.date;
src.publisher -> tgt.publisher;
src.contact -> tgt.contact;
src.responsible -> tgt.responsible;
src.type -> tgt.type;
src.description -> tgt.description;
src.useContext -> tgt.useContext;
src.jurisdiction -> tgt.jurisdiction;
src.usage -> tgt.usage;
src.uniqueId as vs0 -> tgt.uniqueId as vt0 then {
vs0.type -> vt0.type;
vs0.value -> vt0.value;
vs0.preferred -> vt0.preferred;
vs0.comment -> vt0.comment;
vs0.period -> vt0.period;
};
}
# -------------------------------------------------------------------------------------
4.11.11.3
R4
Validation
Errors
<p>No
validation
errors
-
all
conversions
Usage
note:
every
effort
has
been
made
to
ensure
that
the
examples
are
clean</p>
correct
and
useful,
but
they
are
not
a
normative
part
of
the
specification.