This
page
is
part
of
the
FHIR
Specification
(v3.0.2:
(v4.0.1:
R4
-
Mixed
Normative
and
STU
3).
)
in
it's
permanent
home
(it
will
always
be
available
at
this
URL).
The
current
version
which
supercedes
this
version
is
5.0.0
.
For
a
full
list
of
available
versions,
see
the
Directory
of
published
versions
.
Page
versions:
R5
R4B
R4
R3
R4
R3
Patient
Care
Work
Group
|
Maturity Level : N/A |
| Security Category : Patient | Compartments : Encounter , Patient , Practitioner , RelatedPerson |
R2
:
R3
Converson
:
R4
Conversion
maps
for
Condition.
Functional
status
for
this
map:
14
12
tests
that
all
execute
ok.
11
fail
All
tests
pass
round-trip
testing
and
14
1
r3
resources
are
invalid
(14
(0
errors).
(
see
documentation)
map "http://hl7.org/fhir/StructureMap/Condition2to3" = "R2 to R3 Conversions for Condition" conceptmap "ConditionClinicalStatus" { prefix s = "http://hl7.org/fhir/devicestatus" prefix t = "http://hl7.org/fhir/devicestatus" s:available = t:active s:inactive = t:"not-available" s:"entered-in-error" = t:"entered-in-error" } uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Condition" alias ConditionR2 as source uses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as target imports "http://hl7.org/fhir/StructureMap/*2to3"map "http://hl7.org/fhir/StructureMap/Condition3to4" = "R3 to R4 Conversions for Condition"group for type+types Condition extends DomainResource input src : ConditionR2 as source input tgt : Condition as targetuses "http://hl7.org/fhir/3.0/StructureDefinition/Condition" alias ConditionR3 as source uses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as target"Condition-identifier" : for src.identifier make tgt.identifier "Condition-patient" : for src.patient make tgt.subject "Condition-encounter" : for src.encounter make tgt.context "Condition-asserter" : for src.asserter make tgt.asserter "Condition-dateRecorded" : for src.dateRecorded make tgt.assertedDate "Condition-code" : for src.code make tgt.code "Condition-category" : for src.category make tgt.category "Condition-clinicalStatus" : for src.clinicalStatus as v make tgt.clinicalStatus = translate(v, "#ConditionClinicalStatus", "code") "Condition-verificationStatus" : for src.verificationStatus make tgt.verificationStatus "Condition-severity" : for src.severity make tgt.severity "Condition-onset" : for src.onset make tgt.onset "Condition-abatement" : for src.abatement make tgt.abatement "Condition-stage" : for src.stage as vs0 make tgt.stage as vt0 then cndStage(vs0, vt0) "Condition-evidence" : for src.evidence as vs0 make tgt.evidence as vt0 then cndEvidence(vs0, vt0) "Condition-bodySite" : for src.bodySite make tgt.bodySite "Condition-notes" : for src.notes as v make tgt.note as n, n.text = v endgroupimports "http://hl7.org/fhir/StructureMap/*3to4"group cndStage extends BackboneElement input src : ConditionR2 as source input tgt : Condition as targetgroup Condition(source src : ConditionR3, target tgt : Condition) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; src.clinicalStatus as vs -> tgt.clinicalStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/condition-clinical', c.code = vs; src.verificationStatus as vs -> tgt.verificationStatus as vt, vt.coding as c, c.system = 'http://terminology.hl7.org/CodeSystem/condition-ver-status', c.code = vs; src.category -> tgt.category; src.severity -> tgt.severity; src.code -> tgt.code; src.bodySite -> tgt.bodySite; src.subject -> tgt.subject; src.context -> tgt.encounter; src.onset : dateTime as vs -> tgt.onset = create('dateTime') as vt then dateTime(vs, vt); src.onset : Age as vs -> tgt.onset = create('Age') as vt then Age(vs, vt); src.onset : Period as vs -> tgt.onset = create('Period') as vt then Period(vs, vt); src.onset : Range as vs -> tgt.onset = create('Range') as vt then Range(vs, vt); src.onset : string as vs -> tgt.onset = create('string') as vt then string(vs, vt); src.abatement : dateTime as vs -> tgt.abatement = create('dateTime') as vt then dateTime(vs, vt); src.abatement : Age as vs -> tgt.abatement = create('Age') as vt then Age(vs, vt); src.abatement : Period as vs -> tgt.abatement = create('Period') as vt then Period(vs, vt); src.abatement : Range as vs -> tgt.abatement = create('Range') as vt then Range(vs, vt); src.abatement : string as vs -> tgt.abatement = create('string') as vt then string(vs, vt); src.assertedDate -> tgt.recordedDate; src.asserter -> tgt.asserter; src.stage as s -> tgt.stage as t then stage(s, t); src.evidence as s -> tgt.evidence as t then evidence(s, t); src.note -> tgt.note; }"Condition.stage-summary" : for src.summary make tgt.summary "Condition.stage-assessment" : for src.assessment make tgt.assessment endgroupgroup stage(source src, target tgt) extends BackboneElement { src.summary -> tgt.summary; src.assessment -> tgt.assessment; src.type -> tgt.type; }group cndEvidence extends BackboneElement input src : ConditionR2 as source input tgt : Condition as targetgroup evidence(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.detail -> tgt.detail; }"Condition.evidence-code" : for src.code make tgt.code "Condition.evidence-detail" : for src.detail make tgt.detail endgroup
map "http://hl7.org/fhir/StructureMap/Condition3to2" = "R3 to R2 Conversion for Condition" conceptmap "ConditionClinicalStatus" { prefix s = "http://hl7.org/fhir/devicestatus" prefix t = "http://hl7.org/fhir/devicestatus" s:available = t:active s:"not-available" = t:inactive s:"entered-in-error" = t:"entered-in-error" } uses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as source uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Condition" alias ConditionR2 as target imports "http://hl7.org/fhir/StructureMap/*3to2"map "http://hl7.org/fhir/StructureMap/Condition4to3" = "R4 to R3 Conversion for Condition"group for type+types Condition extends DomainResource input src : Condition as source input tgt : ConditionR2 as targetuses "http://hl7.org/fhir/StructureDefinition/Condition" alias Condition as source uses "http://hl7.org/fhir/3.0/StructureDefinition/Condition" alias ConditionR3 as target"Condition-identifier" : for src.identifier make tgt.identifier "Condition-patient" : for src.subject make tgt.patient "Condition-encounter" : for src.context make tgt.encounter "Condition-asserter" : for src.asserter make tgt.asserter "Condition-dateRecorded" : for src.assertedDate make tgt.dateRecorded "Condition-code" : for src.code make tgt.code "Condition-category" : for src.category make tgt.category "Condition-clinicalStatus" : for src.clinicalStatus as v check $this != 'inactive' make tgt.clinicalStatus = translate(v, "#ConditionClinicalStatus", "code") "Condition-verificationStatus" : for src.verificationStatus make tgt.verificationStatus "Condition-severity" : for src.severity make tgt.severity "Condition-onset" : for src.onset make tgt.onset "Condition-abatement" : for src.abatement make tgt.abatement "Condition-stage" : for src.stage as vs0 make tgt.stage as vt0 then cndStage(vs0, vt0) "Condition-evidence" : for src.evidence as vs0 make tgt.evidence as vt0 then cndEvidence(vs0, vt0) "Condition-bodySite" : for src.bodySite make tgt.bodySite "Condition-note" : for src.note as n then { "Condition.notes-text" : for n.text make tgt.notes } endgroupimports "http://hl7.org/fhir/StructureMap/*4to3"group cndStage extends BackboneElement input src : ConditionR2 as source input tgt : Condition as targetgroup Condition(source src : Condition, target tgt : ConditionR3) extends DomainResource <<type+>> { src.identifier -> tgt.identifier; src.clinicalStatus as vs then { vs.coding as c where system = 'http://terminology.hl7.org/CodeSystem/condition-clinical' then { c.code -> tgt.clinicalStatus; }; }; src.verificationStatus as vs then { vs.coding as c where system = 'http://terminology.hl7.org/CodeSystem/condition-ver-status' then { c.code -> tgt.verificationStatus; }; }; src.category -> tgt.category; src.severity -> tgt.severity; src.code -> tgt.code; src.bodySite -> tgt.bodySite; src.subject -> tgt.subject; src.encounter -> tgt.context; src.onset : dateTime as vs -> tgt.onset = create('dateTime') as vt then dateTime(vs, vt); src.onset : Age as vs -> tgt.onset = create('Age') as vt then Age(vs, vt); src.onset : Period as vs -> tgt.onset = create('Period') as vt then Period(vs, vt); src.onset : Range as vs -> tgt.onset = create('Range') as vt then Range(vs, vt); src.onset : string as vs -> tgt.onset = create('string') as vt then string(vs, vt); src.abatement : dateTime as vs -> tgt.abatement = create('dateTime') as vt then dateTime(vs, vt); src.abatement : Age as vs -> tgt.abatement = create('Age') as vt then Age(vs, vt); src.abatement : Period as vs -> tgt.abatement = create('Period') as vt then Period(vs, vt); src.abatement : Range as vs -> tgt.abatement = create('Range') as vt then Range(vs, vt); src.abatement : string as vs -> tgt.abatement = create('string') as vt then string(vs, vt); src.recordedDate -> tgt.assertedDate; src.recorder -> tgt.recorder; src.asserter -> tgt.asserter; src.stage as s -> tgt.stage as t then stage(s, t); src.evidence as s -> tgt.evidence as t then evidence(s, t); src.note -> tgt.note; }"Condition.stage-summary" : for src.summary make tgt.summary "Condition.stage-assessment" : for src.assessment make tgt.assessment endgroupgroup stage(source src, target tgt) extends BackboneElement { src.summary -> tgt.summary; src.assessment -> tgt.assessment; src.type -> tgt.type; }group cndEvidence extends BackboneElement input src : ConditionR2 as source input tgt : Condition as targetgroup evidence(source src, target tgt) extends BackboneElement { src.code -> tgt.code; src.detail -> tgt.detail; }"Condition.evidence-code" : for src.code make tgt.code "Condition.evidence-detail" : for src.detail make tgt.detail endgroup