Merge branch 'master' of github.com:hapifhir/org.hl7.fhir.core

This commit is contained in:
James Agnew 2019-02-05 17:44:32 -05:00
commit 8ae39ccf4f
36 changed files with 10563 additions and 15 deletions

View File

@ -512,12 +512,12 @@ public class Element extends Base {
@SuppressWarnings("unchecked")
List<ElementDecoration> decorations = (List<ElementDecoration>) getUserData("fhir.decorations");
if (decorations == null) {
decorations = new ArrayList<ElementDecoration>();
decorations = new ArrayList<>();
setUserData("fhir.decorations", decorations);
}
decorations.add(new ElementDecoration(DecorationType.TYPE, profile.getUserString("path"), definition.getPath()));
if (tail(definition.getId()).contains(":")) {
String[] details = tail(definition.getId()).split("\\:");
if (definition.getId() != null && tail(definition.getId()).contains(":")) {
String[] details = tail(definition.getId()).split(":");
decorations.add(new ElementDecoration(DecorationType.SLICE, null, details[1]));
}
}

View File

@ -0,0 +1,18 @@
Patient(http://hl7.org/fhir/us/core/Patient) {
managingOrganization cardinality 0..1 'description of item' :
Organization(http://hl7.org/fhir/us/core/Organization) {
endpoint : Endpoint
};
Basic;
Group {
item : Patient
},
generalPractitioner : Organization,
search Observation?patient={ref} cardinality 0..10 'Observations for the patient' {
performer : Practitioner,
related.where(type='has-member').target : Observation require matching Patient,
related.where(type='derived-from').target : Observation where identical Patient,
related.where(type='sequel-to').target : Observation where different Patient,
related.where(type='qualified-by').target : Observation where custom Patient = path
}
}

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bundle xmlns="http://hl7.org/fhir">
<entry>
<fullUrl value="http://hl7.org/fhir/test/Patient/example"/>
<resource>
<Patient>
<id value="example"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table>
<tbody>
<tr>
<td>Name</td>
<td>Peter James
<b>Chalmers</b>("Jim") </td> </tr>
<tr>
<td>Address</td>
<td>534 Erewhon, Pleasantville, Vic, 3999</td> </tr>
<tr>
<td>Contacts</td>
<td>Home: unknown. Work: (03) 5555 6473</td> </tr>
<tr>
<td>Id</td>
<td>MRN: 12345 (Acme Healthcare)</td> </tr> </tbody> </table> </div>
</text>
<!--MRN assigned by ACME healthcare on 6-May 2001-->
<identifier>
<use value="usual"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
<code value="MR"/>
</coding>
</type>
<system value="urn:oid:1.2.36.146.595.217.0.1"/>
<value value="12345"/>
<period>
<start value="2001-05-06"/>
</period>
<assigner>
<display value="Acme Healthcare"/>
</assigner>
</identifier>
<active value="true"/>
<!--Peter James Chalmers, but called "Jim"-->
<name>
<use value="official"/>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<name>
<use value="usual"/>
<given value="Jim"/>
</name>
<name>
<!--Maiden names apply for anyone whose name changes as a result of marriage - irrespective of gender-->
<use value="maiden"/>
<family value="Windsor"/>
<given value="Peter"/>
<given value="James"/>
<period>
<end value="2002"/>
</period>
</name>
<telecom>
<use value="home"/>
<!--home communication details aren't known-->
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
<rank value="1"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 3410 5613"/>
<use value="mobile"/>
<rank value="2"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 8834"/>
<use value="old"/>
<period>
<end value="2014"/>
</period>
</telecom>
<!--use FHIR code system for male / female-->
<gender value="male"/>
<birthDate value="1974-12-25">
<extension url="http://hl7.org/fhir/StructureDefinition/patient-birthTime">
<valueDateTime value="1974-12-25T14:35:45-05:00"/>
</extension>
</birthDate>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<type value="both"/>
<text value="534 Erewhon St PeasantVille, Rainbow, Vic 3999"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="Vic"/>
<postalCode value="3999"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<contact>
<relationship>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="N"/>
</coding>
</relationship>
<name>
<family value="du March&#233;">
<!--the "du" part is a family name prefix (VV in iso 21090)-->
<extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix">
<valueString value="VV"/>
</extension>
</family>
<given value="B&#233;n&#233;dicte"/>
</name>
<telecom>
<system value="phone"/>
<value value="+33 (237) 998327"/>
</telecom>
<address>
<use value="home"/>
<type value="both"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="Vic"/>
<postalCode value="3999"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<gender value="female"/>
<period>
<!--The contact relationship started in 2012-->
<start value="2012"/>
</period>
</contact>
<managingOrganization>
<reference value="Organization/1"/>
</managingOrganization>
</Patient>
</resource>
</entry>
<entry>
<fullUrl value="http://hl7.org/fhir/test/Organization/1"/>
<resource>
<Organization>
<id value="1"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Gastroenterology @ Acme Hospital. ph: +1 555 234 3523, email:
<a href="mailto:gastro@acme.org">gastro@acme.org</a> </p> </div>
</text>
<!--Clinical Team "Gastroenterology" at Acme Hospital-->
<identifier>
<system value="http://www.acme.org.au/units"/>
<value value="Gastro"/>
</identifier>
<name value="Gastroenterology"/>
<telecom>
<system value="phone"/>
<value value="+1 555 234 3523"/>
<use value="mobile"/>
</telecom>
<telecom>
<system value="email"/>
<value value="gastro@acme.org"/>
<use value="work"/>
</telecom>
</Organization>
</resource>
</entry>
</Bundle>

View File

@ -0,0 +1,9 @@
<graphdef-tests>
<test name="simple" source="simple.gdl" context="Patient/example/$graph">
<rule description="Must be 2 resources in the bundle" expression="Bundle.entry.count() = 2"/>
</test>
<test name="full-syntax" source="full-syntax.gdl" context="Patient/example/$graph">
<rule description="Must be 2 resources in the bundle" expression="Bundle.entry.count() = 2"/>
</test>
</graphdef-tests>

View File

@ -0,0 +1 @@
Patient{managingOrganization:Organization{endpoint:Endpoint}}

View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bundle xmlns="http://hl7.org/fhir">
<entry>
<fullUrl value="http://hl7.org/fhir/test/Patient/example"/>
<resource>
<Patient>
<id value="example"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table>
<tbody>
<tr>
<td>Name</td>
<td>Peter James
<b>Chalmers</b>("Jim") </td> </tr>
<tr>
<td>Address</td>
<td>534 Erewhon, Pleasantville, Vic, 3999</td> </tr>
<tr>
<td>Contacts</td>
<td>Home: unknown. Work: (03) 5555 6473</td> </tr>
<tr>
<td>Id</td>
<td>MRN: 12345 (Acme Healthcare)</td> </tr> </tbody> </table> </div>
</text>
<!--MRN assigned by ACME healthcare on 6-May 2001-->
<identifier>
<use value="usual"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
<code value="MR"/>
</coding>
</type>
<system value="urn:oid:1.2.36.146.595.217.0.1"/>
<value value="12345"/>
<period>
<start value="2001-05-06"/>
</period>
<assigner>
<display value="Acme Healthcare"/>
</assigner>
</identifier>
<active value="true"/>
<!--Peter James Chalmers, but called "Jim"-->
<name>
<use value="official"/>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<name>
<use value="usual"/>
<given value="Jim"/>
</name>
<name>
<!--Maiden names apply for anyone whose name changes as a result of marriage - irrespective of gender-->
<use value="maiden"/>
<family value="Windsor"/>
<given value="Peter"/>
<given value="James"/>
<period>
<end value="2002"/>
</period>
</name>
<telecom>
<use value="home"/>
<!--home communication details aren't known-->
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
<rank value="1"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 3410 5613"/>
<use value="mobile"/>
<rank value="2"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 8834"/>
<use value="old"/>
<period>
<end value="2014"/>
</period>
</telecom>
<!--use FHIR code system for male / female-->
<gender value="male"/>
<birthDate value="1974-12-25">
<extension url="http://hl7.org/fhir/StructureDefinition/patient-birthTime">
<valueDateTime value="1974-12-25T14:35:45-05:00"/>
</extension>
</birthDate>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<type value="both"/>
<text value="534 Erewhon St PeasantVille, Rainbow, Vic 3999"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="Vic"/>
<postalCode value="3999"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<contact>
<relationship>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="N"/>
</coding>
</relationship>
<name>
<family value="du March&#233;">
<!--the "du" part is a family name prefix (VV in iso 21090)-->
<extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix">
<valueString value="VV"/>
</extension>
</family>
<given value="B&#233;n&#233;dicte"/>
</name>
<telecom>
<system value="phone"/>
<value value="+33 (237) 998327"/>
</telecom>
<address>
<use value="home"/>
<type value="both"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="Vic"/>
<postalCode value="3999"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<gender value="female"/>
<period>
<!--The contact relationship started in 2012-->
<start value="2012"/>
</period>
</contact>
<managingOrganization>
<reference value="Organization/1"/>
</managingOrganization>
</Patient>
</resource>
</entry>
<entry>
<fullUrl value="http://hl7.org/fhir/test/Organization/1"/>
<resource>
<Organization>
<id value="1"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Gastroenterology @ Acme Hospital. ph: +1 555 234 3523, email:
<a href="mailto:gastro@acme.org">gastro@acme.org</a> </p> </div>
</text>
<!--Clinical Team "Gastroenterology" at Acme Hospital-->
<identifier>
<system value="http://www.acme.org.au/units"/>
<value value="Gastro"/>
</identifier>
<name value="Gastroenterology"/>
<telecom>
<system value="phone"/>
<value value="+1 555 234 3523"/>
<use value="mobile"/>
</telecom>
<telecom>
<system value="email"/>
<value value="gastro@acme.org"/>
<use value="work"/>
</telecom>
</Organization>
</resource>
</entry>
</Bundle>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,272 @@
[{
"comment": "4.1. add with missing object",
"doc": {
"q": {
"bar": 2
}
},
"patch": [{
"op": "add",
"path": "/a/b",
"value": 1
}],
"error": "path /a does not exist -- missing objects are not created recursively"
},
{
"comment": "A.1. Adding an Object Member",
"doc": {
"foo": "bar"
},
"patch": [{
"op": "add",
"path": "/baz",
"value": "qux"
}],
"expected": {
"baz": "qux",
"foo": "bar"
}
},
{
"comment": "A.2. Adding an Array Element",
"doc": {
"foo": ["bar",
"baz"]
},
"patch": [{
"op": "add",
"path": "/foo/1",
"value": "qux"
}],
"expected": {
"foo": ["bar",
"qux",
"baz"]
}
},
{
"comment": "A.3. Removing an Object Member",
"doc": {
"baz": "qux",
"foo": "bar"
},
"patch": [{
"op": "remove",
"path": "/baz"
}],
"expected": {
"foo": "bar"
}
},
{
"comment": "A.4. Removing an Array Element",
"doc": {
"foo": ["bar",
"qux",
"baz"]
},
"patch": [{
"op": "remove",
"path": "/foo/1"
}],
"expected": {
"foo": ["bar",
"baz"]
}
},
{
"comment": "A.5. Replacing a Value",
"doc": {
"baz": "qux",
"foo": "bar"
},
"patch": [{
"op": "replace",
"path": "/baz",
"value": "boo"
}],
"expected": {
"baz": "boo",
"foo": "bar"
}
},
{
"comment": "A.6. Moving a Value",
"doc": {
"foo": {
"bar": "baz",
"waldo": "fred"
},
"qux": {
"corge": "grault"
}
},
"patch": [{
"op": "move",
"from": "/foo/waldo",
"path": "/qux/thud"
}],
"expected": {
"foo": {
"bar": "baz"
},
"qux": {
"corge": "grault",
"thud": "fred"
}
}
},
{
"comment": "A.7. Moving an Array Element",
"doc": {
"foo": ["all",
"grass",
"cows",
"eat"]
},
"patch": [{
"op": "move",
"from": "/foo/1",
"path": "/foo/3"
}],
"expected": {
"foo": ["all",
"cows",
"eat",
"grass"]
}
},
{
"comment": "A.8. Testing a Value: Success",
"doc": {
"baz": "qux",
"foo": ["a",
2,
"c"]
},
"patch": [{
"op": "test",
"path": "/baz",
"value": "qux"
},
{
"op": "test",
"path": "/foo/1",
"value": 2
}],
"expected": {
"baz": "qux",
"foo": ["a",
2,
"c"]
}
},
{
"comment": "A.9. Testing a Value: Error",
"doc": {
"baz": "qux"
},
"patch": [{
"op": "test",
"path": "/baz",
"value": "bar"
}],
"error": "string not equivalent"
},
{
"comment": "A.10. Adding a nested Member Object",
"doc": {
"foo": "bar"
},
"patch": [{
"op": "add",
"path": "/child",
"value": {
"grandchild": {
}
}
}],
"expected": {
"foo": "bar",
"child": {
"grandchild": {
}
}
}
},
{
"comment": "A.11. Ignoring Unrecognized Elements",
"doc": {
"foo": "bar"
},
"patch": [{
"op": "add",
"path": "/baz",
"value": "qux",
"xyz": 123
}],
"expected": {
"foo": "bar",
"baz": "qux"
}
},
{
"comment": "A.12. Adding to a Non-existent Target",
"doc": {
"foo": "bar"
},
"patch": [{
"op": "add",
"path": "/baz/bat",
"value": "qux"
}],
"error": "add to a non-existent target"
},
{
"comment": "A.14. ~ Escape Ordering",
"doc": {
"/": 9,
"~1": 10
},
"patch": [{
"op": "test",
"path": "/~01",
"value": 10
}],
"expected": {
"/": 9,
"~1": 10
}
},
{
"comment": "A.15. Comparing Strings and Numbers",
"doc": {
"/": 9,
"~1": 10
},
"patch": [{
"op": "test",
"path": "/~01",
"value": "10"
}],
"error": "number is not equal to string"
},
{
"comment": "A.16. Adding an Array Value",
"doc": {
"foo": ["bar"]
},
"patch": [{
"op": "add",
"path": "/foo/-",
"value": ["abc",
"def"]
}],
"expected": {
"foo": ["bar",
["abc",
"def"]]
}
}]

View File

@ -0,0 +1,531 @@
<tests>
<case name="Missing patch operation">
<target>
<test/>
</target>
<patch xmlns="http://hl7.org/fhir">
</patch>
<error message="No Patch Operations Found"/>
</case>
<case name="Missing target document">
<target>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="doc/foo"/>
</patch>
<error message="No Target Document Found"/>
</case>
<!-- removal tests -->
<case name="Remove Element - simplest">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir"/>
</patched>
</case>
<case name="Remove Element - error">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
<foo>test</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo"/>
</patch>
<error message="The xpath foo matched multiple nodes"/>
</case>
<case name="Remove Element - duplicate 1">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
<foo>test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[1]"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo>test1</foo>
</doc>
</patched>
</case>
<case name="Remove Element - duplicate 2">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
<foo>test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[2]"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
</doc>
</patched>
</case>
<case name="Remove By Attribute - duplicate 1">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
<foo t="2">test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[@t='1']"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo t="2">test1</foo>
</doc>
</patched>
</case>
<case name="Remove By Attribute - duplicate 2">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
<foo t="2">test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[@t='2']"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
</doc>
</patched>
</case>
<case name="Remove Attribute - duplicate 1">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
<foo t="2">test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[@t='1']/@t"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
<foo t="2">test1</foo>
</doc>
</patched>
</case>
<case name="Remove Text">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
<foo t="2">test1</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[@t='2']/text()"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo t="1">test</foo>
<foo t="2"></foo>
</doc>
</patched>
</case>
<case name="Remove Element - NS1">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo>test</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir"/>
</patched>
</case>
<case name="Remove Element - NS error">
<target>
<doc xmlns="http://hl7.org/fhir1">
<foo>test</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo"/>
</patch>
<error message="Nothing to delete found for xpath foo"/>
</case>
<!-- addition -->
<case name="Add simple case">
<target>
<doc xmlns="http://hl7.org/fhir"/>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc"><foo id="ert4773">This is a new child</foo></add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo id="ert4773">This is a new child</foo>
</doc>
</patched>
</case>
<case name="Add text">
<target>
<doc xmlns="http://hl7.org/fhir"/>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc">This is new text</add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">This is new text</doc>
</patched>
</case>
<case name="Add attribute">
<target>
<doc xmlns="http://hl7.org/fhir"/>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc" type="@user">Attribute text</add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir" user="Attribute text"/>
</patched>
</case>
<case name="Add other NS">
<target>
<doc xmlns="http://hl7.org/fhir"/>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc"><div xmlns="http://www.w3.org/1999/xhtml">some html</div></add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir"><div xmlns="http://www.w3.org/1999/xhtml">some html</div></doc>
</patched>
</case>
<!-- Appendix A -->
<case name="A.1. Adding an Element">
<target>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc"><foo id="ert4773">This is a new child</foo></add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</patched>
</case>
<case name="A.2. Adding an Attribute">
<target>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc/f:foo[@id='ert4773']" type="@user">Bob</add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773" user="Bob">This is a new child</foo>
</doc>
</patched>
</case>
<case name="A.3. Adding a Prefixed Namespace Declaration">
<target>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc" type="namespace::pref">urn:ns:xxx</add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir" xmlns:pref="urn:ns:xxx">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</patched>
</case>
<case name="A.4. Adding a Comment Node with the 'pos' Attribute">
<target>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc/f:foo[@id='ert4773']" pos="before"><!-- comment --></add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<!-- comment -->
<foo id="ert4773">This is a new child</foo>
</doc>
</patched>
</case>
<case name="A.5. Adding Multiple Nodes">
<target>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<add sel="f:doc"><foo id="ert4773">This is a new child</foo></add>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<note>This is a sample document</note>
<foo id="ert4773">This is a new child</foo>
</doc>
</patched>
</case>
<case name="A.6. Replacing an Element">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel="f:doc/f:foo[@a='1']"><bar a="2"/></replace>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<bar a="2"/>
</doc>
</patched>
</case>
<case name="A.7. Replacing an Attribute Value">
<target>
<doc a="test" xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel="f:doc/@a">new value</replace>
</patch>
<patched>
<doc a="new value" xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</patched>
</case>
<!--
no need for this
<case name="A.8. Replacing a Namespace Declaration URI">
<target>
<doc xmlns:pref="urn:test">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel="doc/namespace::pref">urn:new:xxx</replace>
</patch>
<patched>
<doc xmlns:pref="urn:new:xxx">
<foo a="1">This is a sample document</foo>
</doc>
</patched>
</case>
-->
<case name="A.9. Replacing a Comment Node">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
<!-- comment -->
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel="f:doc/comment()[1]"><!-- This is the new content --></replace>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
<!-- This is the new content -->
</doc>
</patched>
</case>
<!--
<case name="A.10. Replacing a Processing Instruction Node">
<target>
<doc>
<foo a="1">This is a sample document</foo>
<?test foo="bar"?>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel='doc/processing-instruction("test")'
><?test bar="foobar"?></replace>
</patch>
<patched>
<doc>
<foo a="1">This is a sample document</foo>
<?test bar="foobar"?>
</doc>
</patched>
</case>
-->
<case name="A.11. Replacing a Text Node">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<replace sel="f:doc/f:foo/text()[1]">This is the new text content</replace>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is the new text content</foo>
</doc>
</patched>
</case>
<case name="A.12. Removing an Element">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo[@a='1']"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir"/>
</patched>
</case>
<case name="A.13. Removing an Attribute">
<target>
<doc xmlns="http://hl7.org/fhir" a="foo">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/@a"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</patched>
</case>
<!--
<case name="A.14. Removing a Prefixed Namespace Declaration">
<target>
<doc>
<foo a="1" xmlns:pref="urn:test"
>This is a sample document</foo>
<!-.- comment -.->
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="doc/foo/namespace::pref"/>
</patch>
<patched>
<doc>
<foo a="1">This is a sample document</foo>
<!-.- comment -.->
</doc>
</patched>
</case>
-->
<case name="A.15. Removing a Comment Node">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
<!-- comment -->
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/comment()[1]"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</patched>
</case>
<!--
<case name="A.16. Removing a Processing Instruction Node">
<target>
<doc>
<foo a="1">This is a sample document</foo>
<?test?>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel='doc/processing-instruction("test")'/>
</patch>
<patched>
<doc>
<foo a="1">This is a sample document</foo>
</doc>
</patched>
</case>
-->
<case name="A.17. Removing a Text Node">
<target>
<doc xmlns="http://hl7.org/fhir">
<foo a="1">This is a sample document</foo>
</doc>
</target>
<patch xmlns="http://hl7.org/fhir">
<remove sel="f:doc/f:foo/text()[1]"/>
</patch>
<patched>
<doc xmlns="http://hl7.org/fhir">
<foo a="1"/>
</doc>
</patched>
</case>
</tests>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<comments value="test">
<extension>
<url value="http://hl7.org/fhir/test"/>
<valueString value="test"/>
</extension>
</comments>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<comments value="test">
<extension>
<url value="http://hl7.org/fhir/test"/>
<valueString value="test2"/>
</extension>
</comments>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<comments>
<extension>
<url value="http://hl7.org/fhir/test"/>
<valueString value="test2"/>
</extension>
</comments>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<comments value="test-test"/>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<comments value="test"/>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<issued value="2012-03-04T05:06:07+08:00"/>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<valueQuantity value="test">
<value value="23.0"/>
<code value="g/L"/>
</valueQuantity>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<valueQuantity value="test">
<value value="0.2"/>
<units value="umol/L"/>
</valueQuantity>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Observation xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ..\..\schema\observation.xsd">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">mandatory text</div>
</text>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="55284-4"/>
<display value="Blood pressure systolic and diastolic"/>
</coding>
</name>
<valueString value="test"/>
<status value="final"/>
<reliability value="ok"/>
</Observation>

View File

@ -0,0 +1,527 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<valueString value="test">
<extension>
<url value="http://hl7.org/fhir/test"/>
<valueString value="test2"/>
</extension>
</valueString>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,527 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<valueString>
<extension>
<url value="http://hl7.org/fhir/test"/>
<valueString value="test2"/>
</extension>
</valueString>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,522 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<valueString value="test"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,522 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<maxLength value="6"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="0"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,519 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,527 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<constraint>
<key value="1"/>
<severity value="warning"/>
<human value="length must be 4, value must be 'test'"/>
<xpath value="@value='test'"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,522 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<valueInstant value="2012-03-04T05:06:07+08:00"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,504 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<valueQuantity value="test">
<value value="0.2"/>
<units value="umol/L"/>
</valueQuantity>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,500 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,500 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.valueString"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,521 @@
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://hl7.org/fhir">
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">Text goes here</div>
</text>
<name value="profile-base"/>
<publisher value="FHIR Profile Tests"/>
<description value="Internal profile defined to test profile validation"/>
<status>
<code value="testing"/>
<date value="2013-07-02"/>
</status>
<structure>
<type value="Observation"/>
<element>
<path value="Observation"/>
<definition>
<short value="Simple observations"/>
<formal value="Simple assertions and measurements made about a patient, device or other subject"/>
<comments value="Used for simple observations such as device measures, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to descrive aggregate collections of observations such as Lab reports, etc"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Resource"/>
</type>
<constraint>
<key value="2"/>
<name value="normal range for quantity"/>
<severity value="error"/>
<human value="Can only have normal range if value is a quantity"/>
<xpath value="exists(f:valueQuantity) or not(exists(f:normalRange))"/>
</constraint>
<constraint>
<key value="1"/>
<name value="value or components"/>
<severity value="error"/>
<human value="Must have at least one of value or components"/>
<xpath value="exists(*[starts-with(local-name(.), &#39;value&#39;)]) or exists(f:component)"/>
</constraint>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.extension"/>
<definition>
<short value="Additional Content defined by implementations"/>
<formal value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that must be met as part of the definition of the extension"/>
<comments value="there can be no stigma
associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone"/>
<synonym value="extensions"/>
<synonym value="user content"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
</definition>
</element>
<element>
<path value="Observation.text"/>
<definition>
<short value="Text summary of the resource, for human interpretation"/>
<formal value="A human readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety"/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative"/>
<synonym value="narrative"/>
<synonym value="html"/>
<synonym value="xhtml"/>
<synonym value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
</definition>
</element>
<element>
<path value="Observation.contained"/>
<definition>
<short value="Contained, inline Resources"/>
<formal value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope"/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again"/>
<synonym value="inline resources"/>
<synonym value="anonymous resources"/>
<synonym value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
</definition>
</element>
<element>
<path value="Observation.name"/>
<definition>
<short value="Kind of observation"/>
<formal value="Identifies what type of observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.value[x]"/>
<definition>
<short value="Actual result"/>
<formal value="The information determined as a result of making the observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.interpretation"/>
<definition>
<short value="High, low, normal, etc."/>
<formal value="The assessment made based on the result of the observation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationInterpretation"/>
</definition>
</element>
<element>
<path value="Observation.comments"/>
<definition>
<short value="Comments about result"/>
<formal value="May include statements about significant, unexpected or unreliable. values, or information about the source of the value where this may be relevant to the interpretation of the result."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.applies[x]"/>
<definition>
<short value="Relevant time/time-period"/>
<formal value="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &quot;physiologically relevant time&quot;."/>
<comments value="At least a date should be present unless this observation is a historical report"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<type>
<code value="dateTime"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.issued"/>
<definition>
<short value="Date/Time this was made available"/>
<formal value="Date/Time this was made available"/>
<comments value="Updated when the result is updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.status"/>
<definition>
<short value="Registered|Interim|Final|Amended|Cancelled|Withdrawn"/>
<formal value="The status of the result value"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationStatus"/>
</definition>
</element>
<element>
<path value="Observation.reliability"/>
<definition>
<short value="If quality issues exist (mostly devices)"/>
<formal value="An estimate of the degree to which quality issues have impacted on the value reported"/>
<comments value="Note that in most contexts, unreliable results are not recorded, deleted, or otherwise excluded, but this is not always done or possible. Interpreters of a result, whether human or machine, must always either be aware of the status, or prevented from seeing the observation if the reliability is not &quot;ok&quot;"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<mustUnderstand value="true"/>
<binding value="ObservationReliability"/>
</definition>
</element>
<element>
<path value="Observation.bodySite"/>
<definition>
<short value="Observed body part"/>
<formal value="Indicates where on the subject&#39;s body the observation was made."/>
<comments value="Only used if not implicit in code found in Observation.name"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="BodySite"/>
</definition>
</element>
<element>
<path value="Observation.method"/>
<definition>
<short value="How it was done"/>
<formal value="Indicates the mechanism used to perform the observation"/>
<comments value="Only used if not implicit in code for SimpleObservation.result.type"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationMethod"/>
</definition>
</element>
<element>
<path value="Observation.identifier"/>
<definition>
<short value="Observation id"/>
<formal value="A unique identifier for the simple observation"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Identifier"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.subject"/>
<definition>
<short value="Who/what this is about"/>
<formal value="The thing the observation is being made about"/>
<comments value="The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation must be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Patient|Group|Device)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.performer"/>
<definition>
<short value="Who did the observation"/>
<formal value="Who was responsible for asserting the observed value as &quot;true&quot;"/>
<comments value="This would only be &quot;Device&quot; if the device is responsible for the measurement, not to capture the device used by a human to make the measurement. (The latter could be captured as an extension.)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference(Practitioner|Device|Organization)"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange"/>
<definition>
<short value="Provides guide for interpretation"/>
<formal value="Guidance on how to interpret the value by comparison to a normal or recommended range"/>
<comments value="Most results only have one reference range, might be generic or be specific to the patient&#39;s age, gender, weight and other factors. When these things are not known, multiple reference ranges may be provided"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.meaning"/>
<definition>
<short value="The meaning of this range"/>
<formal value="Code for the meaning of the reference range"/>
<comments value="This is only usually populated if there is more than one range"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationRangeMeaning"/>
</definition>
</element>
<element>
<path value="Observation.referenceRange.range[x]"/>
<definition>
<short value="Reference"/>
<formal value="Actual value of the reference range. May be a quantity (&lt;20mg/L), an range (10-20 umol/L), or some text"/>
<comments value="Text reference ranges are typically used in endocrinology, or for legacy data with string reference ranges"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="Range"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component"/>
<definition>
<short value="Component observation"/>
<formal value="Component observation"/>
<comments value="It would be usual to either have a value or components with values, but both may be used, such as for APGAR scores"/>
<min value="0"/>
<max value="*"/>
<mustUnderstand value="false"/>
</definition>
</element>
<element>
<path value="Observation.component.name"/>
<definition>
<short value="Kind of component observation"/>
<formal value="Identifies what type of sub-observation was performed"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<mustUnderstand value="false"/>
<binding value="ObservationType"/>
</definition>
</element>
<element>
<path value="Observation.component.value[x]"/>
<definition>
<short value="Actual component result"/>
<formal value="The information determined as a result of making the sub-observation"/>
<comments value="The datatype for this element should be determined by Observation.name"/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Quantity"/>
</type>
<type>
<code value="CodeableConcept"/>
</type>
<type>
<code value="Attachment"/>
</type>
<type>
<code value="Ratio"/>
</type>
<type>
<code value="Choice"/>
</type>
<type>
<code value="Period"/>
</type>
<type>
<code value="SampledData"/>
</type>
<type>
<code value="string"/>
</type>
<mustUnderstand value="false"/>
</definition>
</element>
<searchParam>
<name value="_id"/>
<type value="token"/>
<documentation value="The logical resource id associated with the resource (must be supported by all servers)"/>
</searchParam>
<searchParam>
<name value="status"/>
<type value="token"/>
<documentation value="The status of the observation"/>
</searchParam>
<searchParam>
<name value="subject"/>
<type value="reference"/>
<documentation value="The subject that the observation is about"/>
</searchParam>
<searchParam>
<name value="name"/>
<type value="token"/>
<documentation value="The name of the observation type or component type"/>
</searchParam>
<searchParam>
<name value="reliability"/>
<type value="token"/>
<documentation value="The reliability of the observation"/>
</searchParam>
<searchParam>
<name value="value"/>
<type value="token"/>
<documentation value="The code or value of a result"/>
</searchParam>
<searchParam>
<name value="performer"/>
<type value="reference"/>
<documentation value="who/what performed the observation"/>
</searchParam>
<searchParam>
<name value="name-value"/>
<type value="composite"/>
<documentation value="Both name and value"/>
</searchParam>
<searchParam>
<name value="date"/>
<type value="date"/>
<documentation value="obtained date/time. If obtained is a period, a date that falls in the period"/>
</searchParam>
</structure>
<binding>
<name value="ObservationMethod"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-methods"/>
</referenceReference>
</binding>
<binding>
<name value="BodySite"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/body-site"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationType"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-codes"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationRangeMeaning"/>
<isExtensible value="true"/>
<conformance value="example"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/referencerange-meaning"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationReliability"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-reliability"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationStatus"/>
<conformance value="required"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-status"/>
</referenceReference>
</binding>
<binding>
<name value="ObservationInterpretation"/>
<isExtensible value="true"/>
<conformance value="preferred"/>
<referenceReference>
<reference value="http://hl7.org/fhir/vs/observation-interpretation"/>
</referenceReference>
</binding>
</Profile>

View File

@ -0,0 +1,143 @@
<!--
Things to check about profile functionality:
* cardinality - yes
* fixed values - yes
* checking xpath invariants - yes
* choosing a type / restricting the type choice - yes
* bindings
* slicing
* profiles on targets
-->
<profile-tests>
<test name="Base">
<profile value="profile-base"/>
<instance value="instance-name-only"/>
<outcome value="ok"/>
</test>
<test name="Comments Required">
<profile value="profile-base+comments"/>
<instance value="instance-name-only"/>
<outcome value="1"/>
</test>
<test name="Comments Required, Yes">
<profile value="profile-base+comments"/>
<instance value="instance-name+comments"/>
<outcome value="ok"/>
</test>
<test name="Comments Prohibited, Present">
<profile value="profile-base-no-comments"/>
<instance value="instance-name+comments"/>
<outcome value="1"/>
</test>
<test name="Comments Prohibited, Absent">
<profile value="profile-base-no-comments"/>
<instance value="instance-name-only"/>
<outcome value="ok"/>
</test>
<test name="Comments Length, ok">
<profile value="profile-base+comments-length"/>
<instance value="instance-name+comments"/>
<outcome value="ok"/>
</test>
<test name="Comments Length, too long">
<profile value="profile-base+comments-length"/>
<instance value="instance-name+comments-long"/>
<outcome value="1"/>
</test>
<test name="Comments fixed, ok">
<profile value="profile-base+comments-fixed"/>
<instance value="instance-name+comments"/>
<outcome value="ok"/>
</test>
<test name="Comments fixed, not ok">
<profile value="profile-base+comments-fixed"/>
<instance value="instance-name+comments-long"/>
<outcome value="1"/>
</test>
<test name="Comments fixed, not ok">
<profile value="profile-base+comments-fixed"/>
<instance value="instance-name+comments-ext"/>
<outcome value="1"/>
</test>
<test name="Comments fixed+ext, not ok">
<profile value="profile-base+comments-ext"/>
<instance value="instance-name+comments-ext"/>
<outcome value="1"/>
</test>
<test name="Comments fixed+ext, ok">
<profile value="profile-base+comments-ext"/>
<instance value="instance-name+comments-ext2"/>
<outcome value="0"/>
</test>
<test name="Comments fixed+ext (no value), ok">
<profile value="profile-base+comments-ext3"/>
<instance value="instance-name+comments-ext3"/>
<outcome value="0"/>
</test>
<test name="fixed issued">
<profile value="profile-issued"/>
<instance value="instance-name+issued"/>
<outcome value="0"/>
</test>
<!-- todo: fixed integer (test primitive type handling) -->
<test name="Comments xpath">
<profile value="profile-comments-xpath"/>
<instance value="instance-name+comments"/>
<outcome value="0"/>
</test>
<test name="Comments xpath, fail">
<profile value="profile-comments-xpath"/>
<instance value="instance-name+comments-long"/>
<outcome value="1"/>
</test>
<test name="Require Value, not ok">
<profile value="profile-value"/>
<instance value="instance-name-only"/>
<outcome value="1"/>
</test>
<test name="Require Value, ok">
<profile value="profile-value"/>
<instance value="instance-name-value"/>
<outcome value="0"/>
</test>
<test name="Require Value=string, not ok">
<profile value="profile-value-string"/>
<instance value="instance-name-quantity"/>
<outcome value="1"/>
</test>
<test name="Require Value=string, ok">
<profile value="profile-value-string"/>
<instance value="instance-name-value"/>
<outcome value="0"/>
</test>
<test name="Require ValueString, not ok">
<profile value="profile-value-string-2"/>
<instance value="instance-name-quantity"/>
<outcome value="1"/>
</test>
<test name="Require ValueString, ok">
<profile value="profile-value-string-2"/>
<instance value="instance-name-value"/>
<outcome value="0"/>
</test>
<test name="Require Value:Quantity, not ok">
<profile value="profile-value-quantity"/>
<instance value="instance-name-value"/>
<outcome value="1"/>
</test>
<test name="Require Value:Quantity, ok">
<profile value="profile-value-quantity"/>
<instance value="instance-name-quantity"/>
<outcome value="0"/>
</test>
<test name="Require Value:Quantity - fixed, not ok">
<profile value="profile-value-quantity-fixed"/>
<instance value="instance-name-quantity"/>
<outcome value="3"/>
</test>
<test name="Require Value:Quantity, ok">
<profile value="profile-value-quantity-fixed"/>
<instance value="instance-name-quantity2"/>
<outcome value="0"/>
</test>
</profile-tests>

View File

@ -0,0 +1 @@
java -jar ..\..\tools\bin\org.hl7.fhir.validator.jar -profile-tests registry.xml -defn ..\..\publish\validation.zip

View File

@ -55,29 +55,63 @@
<build>
<plugins>
<!--
Build a fatjar containing all depenedncies
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<id>unpack-dependencies</id>
<phase>process-classes</phase>
<goals>
<goal>shade</goal>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<shadedClassifierName>standalone</shadedClassifierName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.hl7.fhir.r4.validation.Validator</mainClass>
</transformer>
</transformers>
<shadedArtifactAttached>true</shadedArtifactAttached>
<excludes>**/module-info.class</excludes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<excludeScope>test</excludeScope>
<includeScope>compile</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.hl7.fhir.r4.validation.Validator</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!--
These two plugins provide quality checks that don't make sense to perform
on a fatjar.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.basepom.maven</groupId>
<artifactId>duplicate-finder-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>