Example
CodeSystem/map-input-mode
(Turtle)
R3
:
R4
Conversion
maps
for
RelatedPerson.
Functional
status
for
this
map:
4
tests
that
all
execute
ok.
All
tests
pass
round-trip
testing
and
all
r3
resources
are
valid.
(
see
documentation)
8.2.9.1
R3
to
R4
-
Narrative
-
XML
map "http://hl7.org/fhir/StructureMap/RelatedPerson3to4" = "R3 to R4 Conversions for RelatedPerson"
uses "http://hl7.org/fhir/3.0/StructureDefinition/RelatedPerson" alias RelatedPersonR3 as source
uses "http://hl7.org/fhir/StructureDefinition/RelatedPerson" alias RelatedPerson as target
imports "http://hl7.org/fhir/StructureMap/*3to4"
group RelatedPerson(source src : RelatedPersonR3, target tgt : RelatedPerson) extends DomainResource <<type+>> {
src.identifier -> tgt.identifier;
src.active -> tgt.active;
src.patient -> tgt.patient;
src.relationship -> tgt.relationship;
src.name -> tgt.name;
src.telecom -> tgt.telecom;
src.gender -> tgt.gender;
src.birthDate -> tgt.birthDate;
src.address -> tgt.address;
src.photo -> tgt.photo;
src.period -> tgt.period;
}
8.2.9.2
-
R4
to
R3
JSON
-
TTL
Raw
Turtle
map "http://hl7.org/fhir/StructureMap/RelatedPerson4to3" = "R4 to R3 Conversion for RelatedPerson"
(+
also
see
Turtle/RDF
Format
Specification
)
Definition
for
Code
SystemStructureMapInputMode
@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
uses "http://hl7.org/fhir/StructureDefinition/RelatedPerson" alias RelatedPerson as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/RelatedPerson" alias RelatedPersonR3 as target
# - resource -------------------------------------------------------------------
imports "http://hl7.org/fhir/StructureMap/*4to3"
[] a fhir:CodeSystem;
fhir:Resource.id [ fhir:value "map-input-mode"];
fhir:Resource.meta [
fhir:Meta.lastUpdated [ fhir:value "2022-12-14T07:12:54.019+11:00" ];
fhir:Meta.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/shareablecodesystem" ]
];
fhir:DomainResource.text [
fhir:Narrative.status [ fhir:value "generated" ]
];
fhir:DomainResource.extension [
fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ];
fhir:Extension.value [ fhir:value "fhir" ]
], [
fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ];
fhir:Extension.value [ fhir:value "trial-use" ]
], [
fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm" ];
fhir:Extension.value [ fhir:value "2" ]
];
fhir:CanonicalResource.url [ fhir:value "http://hl7.org/fhir/map-input-mode"];
fhir:CanonicalResource.identifier [
fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ];
fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.4.642.4.678" ]
], [
fhir:Identifier.use [ fhir:value "old" ];
fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ];
fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.4.642.1.664" ]
];
fhir:CanonicalResource.version [ fhir:value "5.0.0-snapshot3"];
fhir:CanonicalResource.name [ fhir:value "StructureMapInputMode"];
fhir:CanonicalResource.title [ fhir:value "StructureMapInputMode"];
fhir:CanonicalResource.status [ fhir:value "active"];
fhir:CanonicalResource.experimental [ fhir:value "false"];
fhir:CanonicalResource.date [ fhir:value "2021-01-05T10:01:24+11:00"];
fhir:CanonicalResource.publisher [ fhir:value "HL7 (FHIR Project)"];
fhir:CanonicalResource.contact [
fhir:ContactDetail.telecom [
fhir:ContactPoint.system [ fhir:value "url" ];
fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
], [
fhir:ContactPoint.system [ fhir:value "email" ];
fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
]
];
fhir:CanonicalResource.description [ fhir:value "Mode for this instance of data."];
fhir:CanonicalResource.jurisdiction [
fhir:CodeableConcept.coding [
fhir:Coding.system [ fhir:value "http://unstats.un.org/unsd/methods/m49/m49.htm" ];
fhir:Coding.code [ fhir:value "001" ];
fhir:Coding.display [ fhir:value "World" ]
]
];
fhir:CodeSystem.url [ fhir:value "http://hl7.org/fhir/map-input-mode"];
fhir:CodeSystem.identifier [
fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ];
fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.4.642.4.678" ]
], [
fhir:Identifier.use [ fhir:value "old" ];
fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ];
fhir:Identifier.value [ fhir:value "urn:oid:2.16.840.1.113883.4.642.1.664" ]
];
fhir:CodeSystem.version [ fhir:value "5.0.0-snapshot3"];
fhir:CodeSystem.name [ fhir:value "StructureMapInputMode"];
fhir:CodeSystem.title [ fhir:value "StructureMapInputMode"];
fhir:CodeSystem.status [ fhir:value "active"];
fhir:CodeSystem.experimental [ fhir:value "false"];
fhir:CodeSystem.date [ fhir:value "2021-01-05T10:01:24+11:00"];
fhir:CodeSystem.publisher [ fhir:value "HL7 (FHIR Project)"];
fhir:CodeSystem.contact [
fhir:ContactDetail.telecom [
fhir:ContactPoint.system [ fhir:value "url" ];
fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ]
], [
fhir:ContactPoint.system [ fhir:value "email" ];
fhir:ContactPoint.value [ fhir:value "fhir@lists.hl7.org" ]
]
];
fhir:CodeSystem.description [ fhir:value "Mode for this instance of data."];
fhir:CodeSystem.jurisdiction [
fhir:CodeableConcept.coding [
fhir:Coding.system [ fhir:value "http://unstats.un.org/unsd/methods/m49/m49.htm" ];
fhir:Coding.code [ fhir:value "001" ];
fhir:Coding.display [ fhir:value "World" ]
]
];
fhir:CodeSystem.caseSensitive [ fhir:value "true"];
fhir:CodeSystem.valueSet [ fhir:value "http://hl7.org/fhir/ValueSet/map-input-mode"];
fhir:CodeSystem.content [ fhir:value "complete"];
fhir:CodeSystem.concept [
fhir:ConceptDefinitionComponent.code [ fhir:value "source" ];
fhir:ConceptDefinitionComponent.display [ fhir:value "Source Instance" ];
fhir:ConceptDefinitionComponent.definition [ fhir:value "Names an input instance used a source for mapping." ]
], [
fhir:ConceptDefinitionComponent.code [ fhir:value "target" ];
fhir:ConceptDefinitionComponent.display [ fhir:value "Target Instance" ];
fhir:ConceptDefinitionComponent.definition [ fhir:value "Names an instance that is being populated." ]
] .
group RelatedPerson(source src : RelatedPersonR3, target tgt : RelatedPerson) extends DomainResource <<type+>> {
src.identifier -> tgt.identifier;
src.active -> tgt.active;
src.patient -> tgt.patient;
src.relationship -> tgt.relationship;
src.name -> tgt.name;
src.telecom -> tgt.telecom;
src.gender -> tgt.gender;
src.birthDate -> tgt.birthDate;
src.address -> tgt.address;
src.photo -> tgt.photo;
src.period -> tgt.period;
}
# -------------------------------------------------------------------------------------
8.2.9.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.