GF#21004: validation examples to illustrate

This commit is contained in:
Oliver Egger 2019-04-26 16:26:55 +02:00
parent 99273c6e60
commit c3bc29f06a
5 changed files with 402 additions and 0 deletions

View File

@ -467,6 +467,21 @@
"source" : "extension-slice-profile.xml",
"errorCount": 0
}
},
"observation-cholesterol-good.xml" : {
"errorCount": 0
},
"observation-cholesterol-bad-referencerangemissing.xml" : {
"errorCount": 1,
"errors": ["ERROR: Observation: Profile http://hl7.org/fhir/StructureDefinition/cholesterol, Element 'Observation.referenceRange': minimum required = 1, but only found 0"]
},
"observation-cholesterol-bad-referencerangehighfixedquantitywrong.xml" : {
"errorCount": 1,
"errors": ["ERROR: Observation.referenceRange.high.value: Value is '0' but must be '4.5'"]
},
"observation-cholesterol-bad-wrongcode.xml" : {
"errorCount": 2,
"errors": ["ERROR: Observation.code.coding.code: Value is '13457-7' but must be '35200-5'","ERROR: Observation.code.coding.display: Value is 'Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation' but must be 'Cholesterol [Moles/volume] in Serum or Plasma'"]
}
}
}

View File

@ -0,0 +1,98 @@
<Observation xmlns="http://hl7.org/fhir">
<!-- extract from http://www.hl7.org/fhir/diagnosticreport-example-lipids.xml.html,
changed id from cholesterol and added explizit profile reference to http://hl7.org/fhir/StructureDefinition/cholesterol -->
<id
value="observation-cholesterol-bad-referencerangehighfixedquantitywrong" />
<meta>
<profile
value="http://hl7.org/fhir/StructureDefinition/cholesterol" />
</meta>
<text>
<status value="generated" />
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
<b> Generated Narrative with Details</b>
</p>
<p>
<b> id</b>
: cholesterol
</p>
<p>
<b> status</b>
: final
</p>
<p>
<b> code</b>
: Cholesterol
<span> (Details : {LOINC code '35200-5' = 'Cholesterol [Mass or
Moles/volume] in Serum or Plasma',
given as 'Cholesterol
[Moles/â€volume] in Serum or Plasma'})
</span>
</p>
<p>
<b> subject</b>
:
<a> Patient/pat2</a>
</p>
<p>
<b> performer</b>
:
<a> Acme Laboratory, Inc</a>
</p>
<p>
<b> value</b>
: 6.3 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</p>
<h3> ReferenceRanges</h3>
<table>
<tr>
<td> -</td>
<td>
<b> High</b>
</td>
</tr>
<tr>
<td> *</td>
<td>
4.5 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</td>
</tr>
</table>
</div>
</text>
<status value="final" />
<code>
<coding>
<system value="http://loinc.org" />
<code value="35200-5" />
<display
value="Cholesterol [Moles/volume] in Serum or Plasma" />
</coding>
<text value="Cholesterol" />
</code>
<subject>
<reference value="Patient/pat2" />
</subject>
<performer>
<reference
value="Organization/1832473e-2fe0-452d-abe9-3cdb9879522f" />
<display value="Acme Laboratory, Inc" />
</performer>
<valueQuantity>
<value value="6.3" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</valueQuantity>
<referenceRange>
<high>
<value value="0" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</high>
</referenceRange>
</Observation>

View File

@ -0,0 +1,92 @@
<Observation xmlns="http://hl7.org/fhir">
<!-- extract from http://www.hl7.org/fhir/diagnosticreport-example-lipids.xml.html,
changed id from cholesterol and added explizit profile reference to http://hl7.org/fhir/StructureDefinition/cholesterol-->
<id value="observation-cholesterol-good" />
<meta>
<profile
value="http://hl7.org/fhir/StructureDefinition/cholesterol" />
</meta>
<text>
<status value="generated" />
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
<b> Generated Narrative with Details</b>
</p>
<p>
<b> id</b>
: cholesterol
</p>
<p>
<b> status</b>
: final
</p>
<p>
<b> code</b>
: Cholesterol
<span> (Details : {LOINC code '35200-5' = 'Cholesterol [Mass or
Moles/volume] in Serum or Plasma',
given as 'Cholesterol
[Moles/â€volume] in Serum or Plasma'})
</span>
</p>
<p>
<b> subject</b>
:
<a> Patient/pat2</a>
</p>
<p>
<b> performer</b>
:
<a> Acme Laboratory, Inc</a>
</p>
<p>
<b> value</b>
: 6.3 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</p>
<h3> ReferenceRanges</h3>
<table>
<tr>
<td> -</td>
<td>
<b> High</b>
</td>
</tr>
<tr>
<td> *</td>
<td>
4.5 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</td>
</tr>
</table>
</div>
</text>
<status value="final" />
<code>
<coding>
<system value="http://loinc.org" />
<code value="35200-5" />
<display
value="Cholesterol [Moles/volume] in Serum or Plasma" />
</coding>
<text value="Cholesterol" />
</code>
<subject>
<reference value="Patient/pat2" />
</subject>
<performer>
<reference
value="Organization/1832473e-2fe0-452d-abe9-3cdb9879522f" />
<display value="Acme Laboratory, Inc" />
</performer>
<valueQuantity>
<value value="6.3" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</valueQuantity>
<!-- <referenceRange> <high> <value value="0" /> <unit value="mmol/L" />
<system value="http://unitsofmeasure.org" /> <code value="mmol/L" /> </high>
</referenceRange> -->
</Observation>

View File

@ -0,0 +1,100 @@
<Observation xmlns="http://hl7.org/fhir">
<!-- extract from http://www.hl7.org/fhir/diagnosticreport-example-lipids.xml.html,
changed id from cholesterol and added explizit profile reference to http://hl7.org/fhir/StructureDefinition/cholesterol -->
<id value="observation-cholesterol-bad-wrongcode" />
<meta>
<profile
value="http://hl7.org/fhir/StructureDefinition/cholesterol" />
</meta>
<text>
<status value="generated" />
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
<b> Generated Narrative with Details</b>
</p>
<p>
<b> id</b>
: cholesterol
</p>
<p>
<b> status</b>
: final
</p>
<p>
<b> code</b>
: Cholesterol
<span> (Details : {LOINC code '35200-5' = 'Cholesterol [Mass or
Moles/volume] in Serum or Plasma',
given as 'Cholesterol
[Moles/â€volume] in Serum or Plasma'})
</span>
</p>
<p>
<b> subject</b>
:
<a> Patient/pat2</a>
</p>
<p>
<b> performer</b>
:
<a> Acme Laboratory, Inc</a>
</p>
<p>
<b> value</b>
: 6.3 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</p>
<h3> ReferenceRanges</h3>
<table>
<tr>
<td> -</td>
<td>
<b> High</b>
</td>
</tr>
<tr>
<td> *</td>
<td>
4.5 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</td>
</tr>
</table>
</div>
</text>
<status value="final" />
<code>
<!-- <coding> <system value="http://loinc.org" /> <code value="35200-5"
/> <display value="Cholesterol [Mass or Moles/volume] in Serum or Plasma"
/> </coding> -->
<coding>
<system value="http://loinc.org" />
<code value="13457-7" />
<display
value="Cholesterol in LDL [Mass/volume] in Serum or Plasma by calculation" />
</coding>
<text value="Cholesterol" />
</code>
<subject>
<reference value="Patient/pat2" />
</subject>
<performer>
<reference
value="Organization/1832473e-2fe0-452d-abe9-3cdb9879522f" />
<display value="Acme Laboratory, Inc" />
</performer>
<valueQuantity>
<value value="6.3" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</valueQuantity>
<referenceRange>
<high>
<value value="4.5" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</high>
</referenceRange>
</Observation>

View File

@ -0,0 +1,97 @@
<Observation xmlns="http://hl7.org/fhir">
<!-- extract from http://www.hl7.org/fhir/diagnosticreport-example-lipids.xml.html,
changed id from cholesterol and added explizit profile reference to http://hl7.org/fhir/StructureDefinition/cholesterol-->
<id value="observation-cholesterol-bad-referencerangemissing" />
<meta>
<profile
value="http://hl7.org/fhir/StructureDefinition/cholesterol" />
</meta>
<text>
<status value="generated" />
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
<b> Generated Narrative with Details</b>
</p>
<p>
<b> id</b>
: cholesterol
</p>
<p>
<b> status</b>
: final
</p>
<p>
<b> code</b>
: Cholesterol
<span> (Details : {LOINC code '35200-5' = 'Cholesterol [Mass or
Moles/volume] in Serum or Plasma',
given as 'Cholesterol
[Moles/â€volume] in Serum or Plasma'})
</span>
</p>
<p>
<b> subject</b>
:
<a> Patient/pat2</a>
</p>
<p>
<b> performer</b>
:
<a> Acme Laboratory, Inc</a>
</p>
<p>
<b> value</b>
: 6.3 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</p>
<h3> ReferenceRanges</h3>
<table>
<tr>
<td> -</td>
<td>
<b> High</b>
</td>
</tr>
<tr>
<td> *</td>
<td>
4.5 mmol/L
<span> (Details: UCUM code mmol/L = 'mmol/L')</span>
</td>
</tr>
</table>
</div>
</text>
<status value="final" />
<code>
<coding>
<system value="http://loinc.org" />
<code value="35200-5" />
<display
value="Cholesterol [Moles/volume] in Serum or Plasma" />
</coding>
<text value="Cholesterol" />
</code>
<subject>
<reference value="Patient/pat2" />
</subject>
<performer>
<reference
value="Organization/1832473e-2fe0-452d-abe9-3cdb9879522f" />
<display value="Acme Laboratory, Inc" />
</performer>
<valueQuantity>
<value value="6.3" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</valueQuantity>
<referenceRange>
<high>
<value value="4.5" />
<unit value="mmol/L" />
<system value="http://unitsofmeasure.org" />
<code value="mmol/L" />
</high>
</referenceRange>
</Observation>