Example
ClinicalImpression/example
(XML)
R3
:
R4
Conversion
maps
for
Consent.
Functional
status
for
this
map:
12
tests
that
all
execute
ok.
All
tests
pass
round-trip
testing
and
12
r3
resources
are
invalid
(0
errors).
(
see
documentation)
-
6.2.13.1
Narrative
R3
to
R4
-
XML
map "http://hl7.org/fhir/StructureMap/Consent3to4" = "R3 to R4 Conversions for Consent"
uses "http://hl7.org/fhir/3.0/StructureDefinition/Consent" alias ConsentR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Consent" alias Consent as target
imports "http://hl7.org/fhir/StructureMap/*3to4"
group Consent(source src : ConsentR3, target tgt : Consent) extends DomainResource <<type+>> {
src.identifier -> tgt.identifier;
src.status -> tgt.status;
src.category -> tgt.category;
src.patient -> tgt.patient;
src.dateTime -> tgt.dateTime;
src.consentingParty -> tgt.performer;
src.organization -> tgt.organization;
src.source -> tgt.source;
src.policy as vs -> tgt.policy as vt then policy(vs, vt);
src.policyRule as v -> tgt.policyRule as cc, cc.coding as c, c.system = 'urn:ietf:rfc:3986', c.code = v;
src where securityLabel.exists() or period.exists() or actor.exists() or action.exists() or purpose.exists() or dataPeriod.exists() or data.exists() or except.exists() -> tgt.provision as vt then base(src, vt) "securityLabel";
}
group base(source src, target tgt) {
src.period -> tgt.period;
src.actor as vs -> tgt.actor as vt then actor(vs, vt);
src.action -> tgt.action;
src.securityLabel -> tgt.securityLabel;
src.purpose -> tgt.purpose;
src.dataPeriod -> tgt.dataPeriod;
src.data as vs -> tgt.data as vt then data(vs, vt);
src.except as vs -> tgt.provision as vt then provision(vs, vt);
}
group policy(source src, target tgt) extends BackboneElement {
src.authority -> tgt.authority;
src.uri -> tgt.uri;
}
group provision(source src, target tgt) extends BackboneElement {
src.type -> tgt.type;
src.period -> tgt.period;
src.actor as vs -> tgt.actor as vt then actor(vs, vt);
src.action -> tgt.action;
src.securityLabel -> tgt.securityLabel;
src.purpose -> tgt.purpose;
src.class -> tgt.class;
src.code -> tgt.code;
src.dataPeriod -> tgt.dataPeriod;
src.data as vs -> tgt.data as vt then data(vs, vt);
}
group actor(source src, target tgt) extends BackboneElement {
src.role -> tgt.role;
src.reference -> tgt.reference;
}
group data(source src, target tgt) extends BackboneElement {
src.meaning -> tgt.meaning;
src.reference -> tgt.reference;
}
6.2.13.2
-
JSON
R4
to
R3
-
TTL
Raw
XML
(
canonical
form
+
also
see
XML
Format
Specification
)
Jump
past
Narrative
map "http://hl7.org/fhir/StructureMap/Consent4to3" = "R4 to R3 Conversion for Consent"
uses "http://hl7.org/fhir/StructureDefinition/Consent" alias Consent as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Consent" alias ConsentR3 as target
imports "http://hl7.org/fhir/StructureMap/*4to3"
group Consent(source src : Consent, target tgt : ConsentR3) extends DomainResource <<type+>> {
src.identifier -> tgt.identifier;
src.status -> tgt.status;
src.category -> tgt.category;
src.patient -> tgt.patient;
src.dateTime -> tgt.dateTime;
src.performer -> tgt.consentingParty;
src.organization -> tgt.organization;
src.source -> tgt.source;
src.policy as vs -> tgt.policy as vt then policy(vs, vt);
src.policyRule as cc then {
cc.coding as c where system = 'urn:ietf:rfc:3986' then {
c.code -> tgt.policyRule;
};
};
src.provision as vs then baseProvision(vs, tgt);
}
group baseProvision(source src, target tgt) {
src.period -> tgt.period;
src.actor as vs -> tgt.actor as vt then actor(vs, vt);
src.action -> tgt.action;
src.securityLabel -> tgt.securityLabel;
src.purpose -> tgt.purpose;
src.dataPeriod -> tgt.dataPeriod;
src.data as vs -> tgt.data as vt then data(vs, vt);
src.provision as vs -> tgt.except as vt then provision(vs, vt);
}
group policy(source src, target tgt) extends BackboneElement {
src.authority -> tgt.authority;
src.uri -> tgt.uri;
}
group provision(source src, target tgt) extends BackboneElement {
src.type -> tgt.type;
src.period -> tgt.period;
src.actor as vs -> tgt.actor as vt then actor(vs, vt);
src.action -> tgt.action;
src.securityLabel -> tgt.securityLabel;
src.purpose -> tgt.purpose;
src.class -> tgt.class;
src.code -> tgt.code;
src.dataPeriod -> tgt.dataPeriod;
src.data as vs -> tgt.data as vt then data(vs, vt);
}
group actor(source src, target tgt) extends BackboneElement {
src.role -> tgt.role;
src.reference -> tgt.reference;
}
group data(source src, target tgt) extends BackboneElement {
src.meaning -> tgt.meaning;
src.reference -> tgt.reference;
}
Example
of
clinicalimpression
(id
=
"example")
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalImpression xmlns="http://hl7.org/fhir">
<id value="example"/>
<text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"><p> <b> Generated Narrative: ClinicalImpression</b> <a name="example"> </a> </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 ClinicalImpression "example" </p> </div> <p> <b> identifier</b> : id: 12345</p> <p> <b> status</b> : completed</p> <p> <b> description</b> : This 26 yo male patient is brought into ER by ambulance after being involved
in a motor vehicle accident</p> <p> <b> subject</b> : <a href="patient-example.html">Patient/example</a> "Peter CHALMERS"</p> <p> <b> encounter</b> : <a href="encounter-example.html">Encounter/example</a> </p> <p> <b> effective</b> : 2014-12-06T20:00:00+11:00 --> 2014-12-06T22:33:00+11:00</p> <p> <b> date</b> : 2014-12-06T22:33:00+11:00</p> <p> <b> performer</b> : <a href="practitioner-example.html">Practitioner/example</a> "Adam CAREFUL"</p> <p> <b> problem</b> : <span> : MVA</span> </p> <p> <b> summary</b> : <span title="
<investigation>
<code>
<text value="Initial Examination"/>
</code>
<item>
<display value="deep laceration of the scalp (left temporo-occipital)"/>
;
</item>
<item>
<display value="decreased level of consciousness"/>
</item>
<item>
<display value="disoriented to time and place"/>
</item>
<item>
<display value="restless"/>
</item>
</investigation>
">provisional diagnoses of laceration of head and traumatic brain injury (TBI)</span> </p> <blockquote> <p> <b> finding</b> </p> <h3> Items</h3> <table class="grid"><tr> <td> -</td> <td> <b> Concept</b> </td> </tr> <tr> <td> *</td> <td> 850.0 <span style="background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki"> (ICD-9#850.0)</span> </td> </tr> </table> </blockquote> </div> </text> <identifier>
<value value="12345"/>
</identifier>
<status value="completed"/>
<description value="This 26 yo male patient is brought into ER by ambulance after being involved in
a motor vehicle accident"/>
<subject>
<reference value="Patient/example"/>
</subject>
<encounter>
<reference value="Encounter/example"/>
</encounter>
<effectivePeriod>
<start value="2014-12-06T20:00:00+11:00"/>
<end value="2014-12-06T22:33:00+11:00"/>
</effectivePeriod>
<date value="2014-12-06T22:33:00+11:00"/>
<performer>
<reference value="Practitioner/example"/>
</performer>
<problem>
<display value="MVA"/>
</problem>
<summary value="provisional diagnoses of laceration of head and traumatic brain injury (TBI)"/>
<finding>
<item>
<concept>
<coding>
<system value="http://hl7.org/fhir/sid/icd-9"/>
<code value="850.0"/>
</coding>
</concept>
</item>
</finding>
6.2.13.3
</
ClinicalImpression
>
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.