From 9e583e8e353e3632ce449d88c80131a4a7c14986 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 29 Jan 2019 08:34:34 +1100 Subject: [PATCH] work on getting validation tests to pass --- .../fhir/r4/conformance/ProfileUtilities.java | 105 +- .../main/java/org/hl7/fhir/r4/model/Base.java | 2 +- .../hl7/fhir/r4/model/BaseDateTimeType.java | 8 +- .../org/hl7/fhir/r4/utils/FHIRPathEngine.java | 347 +- .../r4/tests/ValidationEngineTests.java | 91 +- .../r4/tests/ValidationTestSuite.java | 11 +- .../tests/utilities/TestUtilities.java | 18 + .../validation-examples/bundle-bad-empty.json | 27 + .../validation-examples/bundle-good.json | 27 + .../validation-examples/bundle-good.ttl | 38 + .../validation-examples/bundle-good.xml | 27 + .../validation-examples/ccda-example-bad.xml | 966 + .../validation-examples/ccda-example.xml | 911 + .../validation-examples/ccda-profile.xml | 1222 + .../validation-examples/code-correct.xml | 10 + .../code-wrong-display.xml | 10 + .../code-wrong-system-vs.xml | 9 + .../validation-examples/code-wrong-system.xml | 9 + .../document-bad-bad-sections.xml | 57 + .../document-bad-no-sections.xml | 17 + .../validation-examples/document-good.xml | 62 + .../document-section-library.xml | 104 + .../document-structure.xml | 84 + .../entry-resource-bad1.xml | 12 + .../group-choice-bad1.json | 14 + .../validation-examples/group-choice-bad1.ttl | 21 + .../validation-examples/group-choice-bad1.xml | 11 + .../group-choice-bad2.json | 14 + .../validation-examples/group-choice-bad2.ttl | 21 + .../validation-examples/group-choice-bad2.xml | 11 + .../group-choice-bad3.json | 14 + .../validation-examples/group-choice-bad3.ttl | 22 + .../validation-examples/group-choice-bad3.xml | 11 + .../group-choice-empty.json | 12 + .../group-choice-empty.ttl | 20 + .../group-choice-empty.xml | 10 + .../group-choice-good.json | 14 + .../validation-examples/group-choice-good.ttl | 22 + .../validation-examples/group-choice-good.xml | 11 + .../group-minimal-tiny.json | 1 + .../group-minimal-tiny.ttl | 14 + .../validation-examples/group-minimal.json | 5 + .../validation-examples/group-minimal.ttl | 14 + .../validation-examples/group-minimal.xml | 4 + .../validation-examples/list-bad-syntax.json | 14 + .../validation-examples/list-bad-syntax.xml | 8 + .../list-contained-bad.json | 15 + .../list-contained-bad.ttl | 23 + .../list-contained-bad.xml | 14 + .../validation-examples/list-contained.json | 15 + .../validation-examples/list-contained.ttl | 23 + .../validation-examples/list-contained.xml | 14 + .../validation-examples/list-empty1.json | 9 + .../validation-examples/list-empty1.ttl | 16 + .../validation-examples/list-empty1.xml | 9 + .../validation-examples/list-empty2.json | 8 + .../validation-examples/list-empty2.ttl | 15 + .../validation-examples/list-empty2.xml | 11 + .../validation-examples/list-extension.ttl | 22 + .../validation-examples/list-extension.xml | 12 + .../validation-examples/list-extension1.json | 22 + .../validation-examples/list-extension1.ttl | 22 + .../validation-examples/list-extension2.json | 22 + .../validation-examples/list-extension2.ttl | 21 + .../validation-examples/list-minimal.json | 14 + .../validation-examples/list-minimal.ttl | 15 + .../validation-examples/list-minimal.xml | 8 + .../validation-examples/list-text.ttl | 15 + .../validation-examples/list-text.xml | 8 + .../validation-examples/list-unknown-attr.ttl | 15 + .../validation-examples/list-unknown-attr.xml | 8 + .../list-unknown-element.ttl | 15 + .../list-unknown-element.xml | 9 + .../list-unknown-prop.json | 15 + .../validation-examples/list-unknown-prop.ttl | 15 + .../validation-examples/list-wrong-code.json | 6 + .../validation-examples/list-wrong-code.ttl | 15 + .../validation-examples/list-wrong-code.xml | 8 + .../validation-examples/list-wrong-ns.xml | 8 + .../validation-examples/list-wrong-ns1.ttl | 15 + .../validation-examples/list-wrong-ns1.xml | 8 + .../validation-examples/list-wrong-ns2.ttl | 15 + .../validation-examples/list-wrong-ns2.xml | 8 + .../validation-examples/list-wrong-order.json | 6 + .../validation-examples/list-wrong-order.ttl | 15 + .../validation-examples/list-wrong-order.xml | 5 + .../list-xhtml-attribute.json | 18 + .../list-xhtml-attribute.ttl | 18 + .../list-xhtml-attribute.xml | 14 + .../list-xhtml-correct1.json | 18 + .../list-xhtml-correct1.ttl | 18 + .../list-xhtml-correct1.xml | 14 + .../list-xhtml-correct2.json | 18 + .../list-xhtml-correct2.ttl | 18 + .../list-xhtml-correct2.xml | 14 + .../list-xhtml-element.json | 18 + .../list-xhtml-element.ttl | 18 + .../list-xhtml-element.xml | 15 + .../list-xhtml-syntax.json | 18 + .../validation-examples/list-xhtml-syntax.ttl | 18 + .../list-xhtml-wrongns1.json | 18 + .../list-xhtml-wrongns1.ttl | 18 + .../list-xhtml-wrongns1.xml | 14 + .../list-xhtml-wrongns2.json | 18 + .../list-xhtml-wrongns2.ttl | 18 + .../list-xhtml-wrongns2.xml | 14 + .../list-xhtml-wrongns3.ttl | 18 + .../list-xhtml-wrongns3.xml | 14 + .../validation-examples/list-xhtml-xxe.json | 10 + .../validation-examples/list-xhtml-xxe.ttl | 18 + .../validation-examples/list-xhtml-xxe1.xml | 14 + .../validation-examples/list-xhtml-xxe2.xml | 13 + .../validation-examples/manifest.json | 427 + .../message-infinite-loop.xml | 489 + .../validation-examples/observation102.json | 70 + .../validation-examples/observation301.xml | 66 + .../validation-examples/params-reference.xml | 22 + .../validation-examples/patient-example.json | 165 + .../validation-examples/patient-example.xml | 156 + .../validation-examples/patient-good.json | 8 + .../validation-examples/patient-good.xml | 9 + .../validation-examples/patient-lang1.json | 9 + .../validation-examples/patient-lang1.xml | 9 + .../validation-examples/patient-lang2.json | 9 + .../validation-examples/patient-lang2.xml | 9 + .../validation-examples/patient-lang3.json | 9 + .../validation-examples/patient-lang3.xml | 9 + .../validation-examples/patient102.xml | 140 + .../validation-examples/patient140.xml | 140 + .../validation-examples/patient301.xml | 156 + .../primitive-bad-empty.xml | 228 + .../validation-examples/primitive-bad.xml | 155 + .../primitive-good-ws.json | 9 + .../validation-examples/primitive-good-ws.xml | 7 + .../validation-examples/primitive-good.xml | 228 + .../test/resources/validation-examples/q.xml | 40 + .../test/resources/validation-examples/qr.xml | 37 + .../reference-bad-logical.xml | 13 + .../reference-bad-typed.xml | 10 + .../validation-examples/reference-bad.xml | 9 + .../reference-good-contained.xml | 17 + .../reference-good-logical-1.xml | 12 + .../reference-good-logical.xml | 12 + .../reference-good-typed.xml | 10 + .../validation-examples/reference-good.xml | 9 + .../validation-examples/simpl-example.json | 103 + .../validation-examples/simpl-profile.json | 20139 ++++++++++++++++ .../slice-by-polymorphic-type-profile.xml | 94 + .../slice-by-polymorphic-type.xml | 12 + .../slice-profile-and-local-patient.xml | 13 + .../slice-profile-and-local-profile.xml | 56 + .../slicing-types-by-string-profile.xml | 48 + .../slicing-types-by-string.xml | 17 + ...ing-extensions-and-constraints-example.xml | 15 + ...ing-extensions-and-constraints-profile.xml | 65 + .../validation-examples/synthea.json | 36 + .../validation-examples/uk-nhs-pat.xml | 97 + .../validation-examples/uk-nhs-sd-pat.xml | 15085 ++++++++++++ 158 files changed, 43724 insertions(+), 179 deletions(-) create mode 100644 org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/utilities/TestUtilities.java create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-bad-empty.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example-bad.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-profile.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/code-correct.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-display.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system-vs.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-bad-sections.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-no-sections.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/document-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/document-section-library.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/document-structure.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/entry-resource-bad1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.ttl create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/manifest.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/message-infinite-loop.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/observation102.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/observation301.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/params-reference.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient102.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient140.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/patient301.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad-empty.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/q.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/qr.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-logical.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-typed.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-contained.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical-1.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-typed.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-example.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-profile.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type-profile.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-patient.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-profile.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string-profile.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-example.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-profile.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/synthea.json create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-pat.xml create mode 100644 org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-sd-pat.xml diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java index 197991ce0..36905f69a 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/conformance/ProfileUtilities.java @@ -122,6 +122,31 @@ import org.hl7.fhir.utilities.xml.SchematronWriter.Section; */ public class ProfileUtilities extends TranslatingUtilities { + public class ElementRedirection { + + private String path; + private ElementDefinition element; + + public ElementRedirection(ElementDefinition element, String path) { + this.path = path; + this.element = element; + } + + public ElementDefinition getElement() { + return element; + } + + @Override + public String toString() { + return element.toString() + " : "+path; + } + + public String getPath() { + return path; + } + + } + private static int nextSliceId = 0; private static final int MAX_RECURSION_LIMIT = 10; @@ -390,7 +415,7 @@ public class ProfileUtilities extends TranslatingUtilities { // we actually delegate the work to a subroutine so we can re-enter it with a different cursors processPaths("", derived.getSnapshot(), base.getSnapshot(), derived.getDifferential(), baseCursor, diffCursor, base.getSnapshot().getElement().size()-1, - derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, derived.getId(), null, null, false, base.getUrl(), null, false, null); + derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, derived.getId(), null, null, false, base.getUrl(), null, false, new ArrayList()); if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty()) throw new Error("type on first snapshot element for "+derived.getSnapshot().getElementFirstRep().getPath()+" in "+derived.getUrl()+" from "+base.getUrl()); updateMaps(base, derived); @@ -506,9 +531,9 @@ public class ProfileUtilities extends TranslatingUtilities { * @throws Exception */ private ElementDefinition processPaths(String indent, StructureDefinitionSnapshotComponent result, StructureDefinitionSnapshotComponent base, StructureDefinitionDifferentialComponent differential, int baseCursor, int diffCursor, int baseLimit, - int diffLimit, String url, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone, ElementDefinition redirector) throws DefinitionException, FHIRException { + int diffLimit, String url, String profileName, String contextPathSrc, String contextPathDst, boolean trimDifferential, String contextName, String resultPathBase, boolean slicingDone, List redirector) throws DefinitionException, FHIRException { if (DEBUG) - System.out.println(indent+"PP @ "+resultPathBase+": base = "+baseCursor+" to "+baseLimit+", diff = "+diffCursor+" to "+diffLimit+" (slicing = "+slicingDone+")"); + System.out.println(indent+"PP @ "+resultPathBase+" / "+contextPathSrc+" : base = "+baseCursor+" to "+baseLimit+", diff = "+diffCursor+" to "+diffLimit+" (slicing = "+slicingDone+", redirector = "+(redirector == null ? "null" : redirector.toString())+")"); ElementDefinition res = null; // just repeat processing entries until we run out of our allowed scope (1st entry, the allowed scope is all the entries) while (baseCursor <= baseLimit) { @@ -548,7 +573,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), cpath+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor-1, url, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); + diffCursor-1, url, profileName, cpath, outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector); } baseCursor++; } else if (diffMatches.size() == 1 && (slicingDone || !(diffMatches.get(0).hasSlicing() || (isExtension(diffMatches.get(0)) && diffMatches.get(0).hasSliceName())))) {// one matching element in the differential @@ -641,17 +666,41 @@ public class ProfileUtilities extends TranslatingUtilities { int nbl = nbc; while (nbl < base.getElement().size() && base.getElement().get(nbl).getPath().startsWith(tgt.getPath()+".")) nbl++; - processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false, outcome); + processPaths(indent+" ", result, base, differential, nbc, start - 1, nbl-1, diffCursor - 1, url, profileName, tgt.getPath(), diffMatches.get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirectorStack(redirector, outcome, cpath)); } else { StructureDefinition dt = getProfileForDataType(outcome.getType().get(0)); if (dt == null) throw new DefinitionException(diffMatches.get(0).getPath()+" has children ("+differential.getElement().get(diffCursor).getPath()+") for type "+typeCode(outcome.getType())+" in profile "+profileName+", but can't find type"); contextName = dt.getUrl(); processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); + diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, new ArrayList()); } } } + } else if (diffsConstrainTypes(diffMatches)) { +// throw new Error("Not done yet @ "+cpath); + // copy the root diff, and then process any children it has + int start = 0; + int nbl = findEndOfElement(base, baseCursor); + int ndc = differential.getElement().indexOf(diffMatches.get(0)); + int ndl = findEndOfElement(differential, ndc); + ElementDefinition e = processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, + trimDifferential, contextName, resultPathBase, true, redirector); + if (e==null) + throw new FHIRException("Did not find type root: " + diffMatches.get(0).getPath()); + start++; + // now process the siblings, which should each be type constrained - and may also have their own children + // now we process the base scope repeatedly for each instance of the item in the differential list + for (int i = start; i < diffMatches.size(); i++) { + // our processing scope for the differential is the item in the list, and all the items before the next one in the list + ndc = differential.getElement().indexOf(diffMatches.get(i)); + ndl = findEndOfElement(differential, ndc); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, i), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, redirector); + } + // ok, done with that - next in the base list + baseCursor = nbl+1; + diffCursor = ndl+1; + } else { // ok, the differential slices the item. Let's check our pre-conditions to ensure that this is correct if (!unbounded(currentBase) && !isSlicedToOneOnly(diffMatches.get(0))) @@ -668,7 +717,8 @@ public class ProfileUtilities extends TranslatingUtilities { if (diffMatches.size() > 1 && diffMatches.get(0).hasSlicing() && (nbl > baseCursor || differential.getElement().indexOf(diffMatches.get(1)) > differential.getElement().indexOf(diffMatches.get(0))+1)) { // there's a default set before the slices int ndc = differential.getElement().indexOf(diffMatches.get(0)); int ndl = findEndOfElement(differential, ndc); - ElementDefinition e = processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, trimDifferential, contextName, resultPathBase, true, null); + ElementDefinition e = processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, 0), contextPathSrc, contextPathDst, + trimDifferential, contextName, resultPathBase, true, redirector); if (e==null) throw new FHIRException("Did not find single slice: " + diffMatches.get(0).getPath()); e.setSlicing(diffMatches.get(0).getSlicing()); @@ -805,7 +855,7 @@ public class ProfileUtilities extends TranslatingUtilities { int ndc = differential.getElement().indexOf(diffMatches.get(diffpos)); int ndl = findEndOfElement(differential, ndc); // now we process the base scope repeatedly for each instance of the item in the differential list - processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true, null); + processPaths(indent+" ", result, base, differential, baseCursor, ndc, nbl, ndl, url, profileName+pathTail(diffMatches, diffpos), contextPathSrc, contextPathDst, closed, contextName, resultPathBase, true, redirector); // ok, done with that - now set the cursors for if this is the end baseCursor = nbl; diffCursor = ndl+1; @@ -867,7 +917,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), diffMatches.get(0).getPath()+".")) diffCursor++; processPaths(indent+" ", result, base, differential, baseStart, start-1, baseMax-1, - diffCursor - 1, url, profileName+pathTail(diffMatches, 0), base.getElement().get(0).getPath(), base.getElement().get(0).getPath(), trimDifferential, contextName, resultPathBase, false, null); + diffCursor - 1, url, profileName+pathTail(diffMatches, 0), base.getElement().get(0).getPath(), base.getElement().get(0).getPath(), trimDifferential, contextName, resultPathBase, false, redirector); } else { StructureDefinition dt = getProfileForDataType(outcome.getType().get(0)); @@ -881,7 +931,7 @@ public class ProfileUtilities extends TranslatingUtilities { while (differential.getElement().size() > diffCursor && pathStartsWith(differential.getElement().get(diffCursor).getPath(), diffMatches.get(0).getPath()+".")) diffCursor++; processPaths(indent+" ", result, dt.getSnapshot(), differential, 1 /* starting again on the data type, but skip the root */, start-1, dt.getSnapshot().getElement().size()-1, - diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, null); + diffCursor - 1, url, profileName+pathTail(diffMatches, 0), diffMatches.get(0).getPath(), outcome.getPath(), trimDifferential, contextName, resultPathBase, false, redirector); } } else if (outcome.getType().get(0).getCode().equals("Extension")) { // Force URL to appear if we're dealing with an extension. (This is a kludge - may need to drill down in other cases where we're slicing and the type has a profile declaration that could be setting the fixed value) @@ -890,7 +940,7 @@ public class ProfileUtilities extends TranslatingUtilities { // We only want the children that aren't the root if (extEd.getPath().contains(".")) { ElementDefinition extUrlEd = updateURLs(url, extEd.copy()); - extUrlEd.setPath(fixedPathDest(outcome.getPath(), extUrlEd.getPath(), null, null)); + extUrlEd.setPath(fixedPathDest(outcome.getPath(), extUrlEd.getPath(), redirector, null)); // updateFromBase(extUrlEd, currentBase); markDerived(extUrlEd); result.getElement().add(extUrlEd); @@ -918,6 +968,29 @@ public class ProfileUtilities extends TranslatingUtilities { } + private boolean diffsConstrainTypes(List diffMatches) { + if (diffMatches.size() < 2) + return false; + String p = diffMatches.get(0).getPath(); + if (!p.endsWith("[x]")) + return false; + p = p.substring(0, p.length()-3); + for (int i = 1; i < diffMatches.size(); i++) { + if (!diffMatches.get(i).getPath().startsWith(p)) + return false; + } + return true; + } + + + private List redirectorStack(List redirector, ElementDefinition outcome, String path) { + List result = new ArrayList(); + result.addAll(redirector); + result.add(new ElementRedirection(outcome, path)); + return result; + } + + private List getByTypeName(List type, String t) { List res = new ArrayList(); for (TypeRefComponent tr : type) { @@ -1076,13 +1149,13 @@ public class ProfileUtilities extends TranslatingUtilities { } - private String fixedPathSource(String contextPath, String pathSimple, ElementDefinition redirector) { + private String fixedPathSource(String contextPath, String pathSimple, List redirector) { if (contextPath == null) return pathSimple; // String ptail = pathSimple.substring(contextPath.length() + 1); - if (redirector != null) { + if (redirector.size() > 0) { String ptail = pathSimple.substring(contextPath.length()+1); - return redirector.getPath()+"."+ptail; + return redirector.get(redirector.size()-1).getPath()+"."+ptail; // return contextPath+"."+tail(redirector.getPath())+"."+ptail.substring(ptail.indexOf(".")+1); } else { String ptail = pathSimple.substring(pathSimple.indexOf(".")+1); @@ -1090,12 +1163,12 @@ public class ProfileUtilities extends TranslatingUtilities { } } - private String fixedPathDest(String contextPath, String pathSimple, ElementDefinition redirector, String redirectSource) { + private String fixedPathDest(String contextPath, String pathSimple, List redirector, String redirectSource) { String s; if (contextPath == null) s = pathSimple; else { - if (redirector != null) { + if (redirector.size() > 0) { String ptail = pathSimple.substring(redirectSource.length() + 1); // ptail = ptail.substring(ptail.indexOf(".")+1); s = contextPath+"."+/*tail(redirector.getPath())+"."+*/ptail; diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Base.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Base.java index a5d9f7f30..20b681010 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Base.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/Base.java @@ -143,7 +143,7 @@ private Map userData; return false; } - public Date dateTimeValue() { + public BaseDateTimeType dateTimeValue() { return null; } diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java index d3e6b5807..a0e02e52e 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/BaseDateTimeType.java @@ -852,8 +852,12 @@ public abstract class BaseDateTimeType extends PrimitiveType { } @Override - public Date dateTimeValue() { - return getValue(); + public BaseDateTimeType dateTimeValue() { + return this; + } + + public boolean hasTime() { + return (myPrecision == TemporalPrecisionEnum.MINUTE || myPrecision == TemporalPrecisionEnum.SECOND || myPrecision == TemporalPrecisionEnum.MILLI); } diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java index e3d50ea86..07800870c 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java @@ -9,6 +9,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TimeZone; import org.apache.commons.lang3.NotImplementedException; import org.fhir.ucum.Decimal; @@ -20,6 +21,7 @@ import org.hl7.fhir.exceptions.PathEngineException; import org.hl7.fhir.r4.conformance.ProfileUtilities; import org.hl7.fhir.r4.context.IWorkerContext; import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.BaseDateTimeType; import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.DateTimeType; import org.hl7.fhir.r4.model.DateType; @@ -72,7 +74,6 @@ import org.hl7.fhir.utilities.Utilities; //import ca.uhn.fhir.model.api.TemporalPrecisionEnum; import ca.uhn.fhir.util.ElementUtil; -import net.sf.saxon.om.Item; /** * @@ -80,6 +81,8 @@ import net.sf.saxon.om.Item; * */ public class FHIRPathEngine { + private enum Equality { Null, True, False } + private class FHIRConstant extends Base { private static final long serialVersionUID = -8933773658248269439L; @@ -1192,7 +1195,7 @@ public class FHIRPathEngine { } - private List preOperate(List left, Operation operation) { + private List preOperate(List left, Operation operation) throws PathEngineException { if (left.size() == 0) return null; switch (operation) { @@ -1201,7 +1204,8 @@ public class FHIRPathEngine { case Or: return isBoolean(left, true) ? makeBoolean(true) : null; case Implies: - return convertToBoolean(left) ? null : makeBoolean(true); + Equality v = asBool(left); + return v == Equality.False ? null : makeBoolean(true); default: return null; } @@ -1213,6 +1217,11 @@ public class FHIRPathEngine { return res; } + private List makeNull() { + List res = new ArrayList(); + return res; + } + private TypeDetails executeTypeName(ExecutionTypeContext context, TypeDetails focus, ExpressionNode exp, boolean atEntry) throws PathEngineException, DefinitionException { return new TypeDetails(CollectionStatus.SINGLETON, exp.getName()); } @@ -1521,13 +1530,22 @@ public class FHIRPathEngine { return makeBoolean(false); boolean res = true; + boolean nil = false; for (int i = 0; i < left.size(); i++) { - if (!doEquals(left.get(i), right.get(i))) { + Boolean eq = doEquals(left.get(i), right.get(i)); + if (eq == null) + nil = true; + else if (eq == false) { res = false; break; } } - return makeBoolean(res); + if (!res) + return makeBoolean(res); + else if (nil) + return new ArrayList(); + else + return makeBoolean(res); } private List opNotEquals(List left, List right) { @@ -1538,13 +1556,22 @@ public class FHIRPathEngine { return makeBoolean(true); boolean res = true; + boolean nil = false; for (int i = 0; i < left.size(); i++) { - if (!doEquals(left.get(i), right.get(i))) { + Boolean eq = doEquals(left.get(i), right.get(i)); + if (eq == null) + nil = true; + else if (eq == true) { res = false; break; } } - return makeBoolean(!res); + if (!res) + return makeBoolean(res); + else if (nil) + return new ArrayList(); + else + return makeBoolean(res); } private String removeTrailingZeros(String s) { @@ -1572,12 +1599,24 @@ public class FHIRPathEngine { return left.equals(right); } - private boolean doEquals(Base left, Base right) { + private Boolean compareDates(BaseDateTimeType left, BaseDateTimeType right) { +// HumanDateTime l = HumanDateTime.fromXml(left.primitiveValue()); +// HumanDateTime r = HumanDateTime.fromXml(right.primitiveValue()); +// if (!l.overlaps(r)) +// return false; +// else if (!l.canCompare(r)) +// return null; +// else +// return l.sameTime(r); + return false; + } + + private Boolean doEquals(Base left, Base right) { if (left instanceof Quantity && right instanceof Quantity) return qtyEqual((Quantity) left, (Quantity) right); - else if (left.isDateTime() && right.isDateTime()) - return left.dateTimeValue().equals(right.dateTimeValue()); - else if (left instanceof DecimalType || right instanceof DecimalType) + else if (left.isDateTime() && right.isDateTime()) { + return compareDates(left.dateTimeValue(), right.dateTimeValue()); + } else if (left instanceof DecimalType || right instanceof DecimalType) return decEqual(left.primitiveValue(), right.primitiveValue()); else if (left.isPrimitive() && right.isPrimitive()) return Base.equals(left.primitiveValue(), right.primitiveValue()); @@ -1654,8 +1693,6 @@ public class FHIRPathEngine { private List opEquivalent(List left, List right) throws PathEngineException { - if (left.size() == 0 || right.size() == 0) - return new ArrayList(); if (left.size() != right.size()) return makeBoolean(false); @@ -1677,8 +1714,6 @@ public class FHIRPathEngine { } private List opNotEquivalent(List left, List right) throws PathEngineException { - if (left.size() == 0 || right.size() == 0) - return new ArrayList(); if (left.size() != right.size()) return makeBoolean(true); @@ -1874,11 +1909,13 @@ public class FHIRPathEngine { boolean ans = true; for (Base l : left) { boolean f = false; - for (Base r : right) - if (doEquals(l, r)) { + for (Base r : right) { + Boolean eq = doEquals(l, r); + if (eq != null && eq == true) { f = true; break; } + } if (!f) { ans = false; break; @@ -1893,11 +1930,13 @@ public class FHIRPathEngine { boolean ans = true; for (Base r : right) { boolean f = false; - for (Base l : left) - if (doEquals(l, r)) { + for (Base l : left) { + Boolean eq = doEquals(l, r); + if (eq != null && eq == true) { f = true; break; } + } if (!f) { ans = false; break; @@ -1969,21 +2008,19 @@ public class FHIRPathEngine { private List opConcatenate(List left, List right) throws PathEngineException { - if (left.size() == 0 || right.size() == 0) - return new ArrayList(); if (left.size() > 1) throw new PathEngineException("Error performing &: left operand has more than one value"); - if (!left.get(0).hasType(FHIR_TYPES_STRING)) + if (left.size() > 0 && !left.get(0).hasType(FHIR_TYPES_STRING)) throw new PathEngineException(String.format("Error performing &: left operand has the wrong type (%s)", left.get(0).fhirType())); if (right.size() > 1) throw new PathEngineException("Error performing &: right operand has more than one value"); - if (!right.get(0).hasType(FHIR_TYPES_STRING)) + if (right.size() > 0 && !right.get(0).hasType(FHIR_TYPES_STRING)) throw new PathEngineException(String.format("Error performing &: right operand has the wrong type (%s)", right.get(0).fhirType())); List result = new ArrayList(); - Base l = left.get(0); - Base r = right.get(0); - result.add(new StringType(l.primitiveValue() + r.primitiveValue())); + String l = left.size() == 0 ? "" : left.get(0).primitiveValue(); + String r = right.size() == 0 ? "" : right.get(0).primitiveValue(); + result.add(new StringType(l + r)); return result; } @@ -2001,57 +2038,93 @@ public class FHIRPathEngine { } private boolean doContains(List list, Base item) { - for (Base test : list) - if (doEquals(test, item)) + for (Base test : list) { + Boolean eq = doEquals(test, item); + if (eq != null && eq == true) return true; + } return false; } - private List opAnd(List left, List right) { - if (left.isEmpty() && right.isEmpty()) - return new ArrayList(); - else if (isBoolean(left, false) || isBoolean(right, false)) - return makeBoolean(false); - else if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else if (convertToBoolean(left) && convertToBoolean(right)) - return makeBoolean(true); - else - return makeBoolean(false); + private List opAnd(List left, List right) throws PathEngineException { + Equality l = asBool(left); + Equality r = asBool(right); + switch (l) { + case False: return makeBoolean(false); + case Null: + if (r == Equality.False) + return makeBoolean(false); + else + return makeNull(); + case True: + switch (r) { + case False: return makeBoolean(false); + case Null: return makeNull(); + case True: return makeBoolean(true); + } + } + return makeNull(); } private boolean isBoolean(List list, boolean b) { return list.size() == 1 && list.get(0) instanceof BooleanType && ((BooleanType) list.get(0)).booleanValue() == b; } - private List opOr(List left, List right) { - if (left.isEmpty() && right.isEmpty()) - return new ArrayList(); - else if (convertToBoolean(left) || convertToBoolean(right)) - return makeBoolean(true); - else if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else - return makeBoolean(false); + private List opOr(List left, List right) throws PathEngineException { + Equality l = asBool(left); + Equality r = asBool(right); + switch (l) { + case True: return makeBoolean(true); + case Null: + if (r == Equality.True) + return makeBoolean(true); + else + return makeNull(); + case False: + switch (r) { + case False: return makeBoolean(false); + case Null: return makeNull(); + case True: return makeBoolean(true); + } + } + return makeNull(); } - private List opXor(List left, List right) { - if (left.isEmpty() || right.isEmpty()) - return new ArrayList(); - else - return makeBoolean(convertToBoolean(left) ^ convertToBoolean(right)); + private List opXor(List left, List right) throws PathEngineException { + Equality l = asBool(left); + Equality r = asBool(right); + switch (l) { + case True: + switch (r) { + case False: return makeBoolean(true); + case True: return makeBoolean(false); + case Null: return makeNull(); + } + case Null: + return makeNull(); + case False: + switch (r) { + case False: return makeBoolean(false); + case True: return makeBoolean(true); + case Null: return makeNull(); + } + } + return makeNull(); } - private List opImplies(List left, List right) { - if (left.size() == 0) - return new ArrayList(); - else if (!convertToBoolean(left)) + private List opImplies(List left, List right) throws PathEngineException { + Equality eq = asBool(left); + if (eq == Equality.False) return makeBoolean(true); else if (right.size() == 0) - return new ArrayList(); - else - return makeBoolean(convertToBoolean(right)); + return makeNull(); + else switch (asBool(right)) { + case False: return makeBoolean(false); + case Null: return makeNull(); + case True: return makeBoolean(true); + } + return makeNull(); } @@ -2715,39 +2788,34 @@ public class FHIRPathEngine { return makeBoolean(true); } - + private List funcAll(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { + List result = new ArrayList(); if (exp.getParameters().size() == 1) { - List result = new ArrayList(); List pc = new ArrayList(); boolean all = true; for (Base item : focus) { pc.clear(); pc.add(item); - if (!convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) { + Equality eq = asBool(execute(changeThis(context, item), pc, exp.getParameters().get(0), true)); + if (eq != Equality.True) { all = false; break; } } result.add(new BooleanType(all).noExtensions()); - return result; } else {// (exp.getParameters().size() == 0) { - List result = new ArrayList(); boolean all = true; for (Base item : focus) { - boolean v = false; - if (item instanceof BooleanType) { - v = ((BooleanType) item).booleanValue(); - } else - v = item != null; - if (!v) { + Equality eq = asBool(item); + if (eq != Equality.True) { all = false; break; } } result.add(new BooleanType(all).noExtensions()); - return result; } + return result; } @@ -2949,9 +3017,9 @@ public class FHIRPathEngine { private List funcIif(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { List n1 = execute(context, focus, exp.getParameters().get(0), true); - Boolean v = convertToBoolean(n1); + Equality v = asBool(n1); - if (v) + if (v == Equality.True) return execute(context, focus, exp.getParameters().get(1), true); else if (exp.getParameters().size() < 3) return new ArrayList(); @@ -3129,13 +3197,18 @@ public class FHIRPathEngine { private List funcIsDistinct(ExecutionContext context, List focus, ExpressionNode exp) { - if (focus.size() <= 1) + if (focus.size() < 1) + return new ArrayList(); + if (focus.size() == 1) return makeBoolean(true); boolean distinct = true; for (int i = 0; i < focus.size(); i++) { for (int j = i+1; j < focus.size(); j++) { - if (doEquals(focus.get(j), focus.get(i))) { + Boolean eq = doEquals(focus.get(j), focus.get(i)); + if (eq == null) { + return new ArrayList(); + } else if (eq == true) { distinct = false; break; } @@ -3265,7 +3338,8 @@ public class FHIRPathEngine { pc.clear(); pc.add(item); List res = execute(context, pc, exp.getParameters().get(0), true); - if (convertToBoolean(res)) { + Equality v = asBool(res); + if (v != Equality.False) { all = false; break; } @@ -3274,12 +3348,8 @@ public class FHIRPathEngine { } else { boolean all = true; for (Base item : focus) { - boolean v; - if (item instanceof BooleanType) - v = ((BooleanType) item).booleanValue(); - else - v = item != null; - if (v) { + Equality v = asBool(item); + if (v != Equality.False) { all = false; break; } @@ -3298,7 +3368,8 @@ public class FHIRPathEngine { pc.clear(); pc.add(item); List res = execute(context, pc, exp.getParameters().get(0), true); - if (!convertToBoolean(res)) { + Equality v = asBool(res); + if (v == Equality.False) { any = true; break; } @@ -3307,12 +3378,8 @@ public class FHIRPathEngine { } else { boolean any = false; for (Base item : focus) { - boolean v; - if (item instanceof BooleanType) - v = ((BooleanType) item).booleanValue(); - else - v = item != null; - if (!v) { + Equality v = asBool(item); + if (v == Equality.False) { any = true; break; } @@ -3331,7 +3398,8 @@ public class FHIRPathEngine { pc.clear(); pc.add(item); List res = execute(context, pc, exp.getParameters().get(0), true); - if (!convertToBoolean(res)) { + Equality v = asBool(res); + if (v != Equality.True) { all = false; break; } @@ -3340,12 +3408,8 @@ public class FHIRPathEngine { } else { boolean all = true; for (Base item : focus) { - boolean v; - if (item instanceof BooleanType) - v = ((BooleanType) item).booleanValue(); - else - v = item != null; - if (!v) { + Equality v = asBool(item); + if (v != Equality.True) { all = false; break; } @@ -3364,7 +3428,8 @@ public class FHIRPathEngine { pc.clear(); pc.add(item); List res = execute(context, pc, exp.getParameters().get(0), true); - if (convertToBoolean(res)) { + Equality v = asBool(res); + if (v == Equality.True) { any = true; break; } @@ -3373,12 +3438,8 @@ public class FHIRPathEngine { } else { boolean any = false; for (Base item : focus) { - boolean v; - if (item instanceof BooleanType) - v = ((BooleanType) item).booleanValue(); - else - v = item != null; - if (v) { + Equality v = asBool(item); + if (v == Equality.True) { any = true; break; } @@ -3407,7 +3468,10 @@ public class FHIRPathEngine { for (int i = 0; i < focus.size(); i++) { boolean found = false; for (int j = i+1; j < focus.size(); j++) { - if (doEquals(focus.get(j), focus.get(i))) { + Boolean eq = doEquals(focus.get(j), focus.get(i)); + if (eq == null) + return new ArrayList(); + else if (eq == true) { found = true; break; } @@ -3757,7 +3821,8 @@ public class FHIRPathEngine { for (Base item : focus) { pc.clear(); pc.add(item); - if (convertToBoolean(execute(changeThis(context, item), pc, exp.getParameters().get(0), true))) + Equality v = asBool(execute(changeThis(context, item), pc, exp.getParameters().get(0), true)); + if (v == Equality.True) result.add(item); } return result; @@ -3789,8 +3854,12 @@ public class FHIRPathEngine { return result; } - private List funcNot(ExecutionContext context, List focus, ExpressionNode exp) { - return makeBoolean(!convertToBoolean(focus)); + private List funcNot(ExecutionContext context, List focus, ExpressionNode exp) throws PathEngineException { + List result = new ArrayList(); + Equality v = asBool(focus); + if (v != Equality.Null) + result.add(new BooleanType(v != Equality.True)); + return result; } public class ElementDefinitionMatch { @@ -4128,4 +4197,66 @@ public class FHIRPathEngine { return path.substring(path.lastIndexOf(".") + 1); } + private Equality asBool(List items) throws PathEngineException { + if (items.size() == 0) + return Equality.Null; + else if (items.size() == 1) + return asBool(items.get(0)); + else + throw new PathEngineException("Unable to evaluate as a boolean: "+convertToString(items)); + } + + private Equality asBoolFromInt(String s) { + try { + int i = Integer.parseInt(s); + switch (i) { + case 0: return Equality.False; + case 1: return Equality.True; + default: return Equality.Null; + } + } catch (Exception e) { + return Equality.Null; + } + } + + private Equality asBoolFromDec(String s) { + try { + BigDecimal d = new BigDecimal(s); + if (d.compareTo(BigDecimal.ZERO) == 0) + return Equality.False; + else if (d.compareTo(BigDecimal.ONE) == 0) + return Equality.True; + else + return Equality.Null; + } catch (Exception e) { + return Equality.Null; + } + } + + private Equality asBool(Base item) { + if (item instanceof BooleanType) + return boolToTriState(((BooleanType) item).booleanValue()); + else if (item instanceof IntegerType) + return asBoolFromInt(item.primitiveValue()); + else if (item instanceof DecimalType) + return asBoolFromDec(item.primitiveValue()); + else if (Utilities.existsInList(item.fhirType(), FHIR_TYPES_STRING)) { + if (Utilities.existsInList(item.primitiveValue(), "true", "t", "yes", "y")) + return Equality.False; + else if (Utilities.existsInList(item.primitiveValue(), "false", "f", "no", "n")) + return Equality.True; + else if (Utilities.isInteger(item.primitiveValue())) + return asBoolFromInt(item.primitiveValue()); + else if (Utilities.isDecimal(item.primitiveValue())) + return asBoolFromDec(item.primitiveValue()); + else + return Equality.Null; + } else + return Equality.Null; + } + + private Equality boolToTriState(boolean b) { + return b ? Equality.True : Equality.False; + } + } diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationEngineTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationEngineTests.java index b99c3c66e..365506d39 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationEngineTests.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationEngineTests.java @@ -1,5 +1,6 @@ package org.hl7.fhir.validation.r4.tests; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -7,9 +8,9 @@ import org.hl7.fhir.r4.model.FhirPublication; import org.hl7.fhir.r4.model.OperationOutcome; import org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity; import org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent; -import org.hl7.fhir.r4.test.utils.TestingUtilities; import org.hl7.fhir.r4.validation.ValidationEngine; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.validation.tests.utilities.TestUtilities; import org.junit.Assert; import org.junit.Test; @@ -22,14 +23,14 @@ public class ValidationEngineTests { @Test public void testCurrentXml() throws Exception { - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate patient-example.xml in Current version"); - ValidationEngine ve = new ValidationEngine(TestingUtilities.content(), DEF_TX, null, FhirPublication.R4); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.content(), "patient-example.xml"), null); + ValidationEngine ve = new ValidationEngine("hl7.fhir.core#4.0.0", DEF_TX, null, FhirPublication.R4); + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "patient-example.xml"), null); int e = errors(op); int w = warnings(op); int h = hints(op); - if (!TestingUtilities.silent) { + if (!TestUtilities.silent) { System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); for (OperationOutcomeIssueComponent iss : op.getIssue()) { System.out.println(" "+iss.getDetails().getText()); @@ -42,17 +43,17 @@ public class ValidationEngineTests { @Test public void testCurrentJson() throws Exception { - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate patient-example.json in Current version"); - ValidationEngine ve = new ValidationEngine(TestingUtilities.content(), DEF_TX, null, FhirPublication.R4); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.content(), "patient-example.json"), null); + ValidationEngine ve = new ValidationEngine("hl7.fhir.core#4.0.0", DEF_TX, null, FhirPublication.R4); + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "patient-example.json"), null); int e = errors(op); int w = warnings(op); int h = hints(op); Assert.assertTrue(e == 0); Assert.assertTrue(w == 0); Assert.assertTrue(h == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } @@ -62,12 +63,12 @@ public class ValidationEngineTests { Assert.assertTrue(true); return; } - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate patient-example.xml in v1.4.0 version"); ValidationEngine ve = new ValidationEngine("hl7.fhir.core#1.4.0", DEF_TX, null, FhirPublication.DSTU2016May); ve.setNoInvariantChecks(true); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "patient140.xml"), null); - if (!TestingUtilities.silent) + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "patient140.xml"), null); + if (!TestUtilities.silent) for (OperationOutcomeIssueComponent iss : op.getIssue()) { System.out.println(" "+iss.getDetails().getText()); } @@ -77,7 +78,7 @@ public class ValidationEngineTests { Assert.assertTrue(e == 1); Assert.assertTrue(w == 0); Assert.assertTrue(h == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } @@ -87,12 +88,12 @@ public class ValidationEngineTests { Assert.assertTrue(true); return; } - if (!TestingUtilities.silent) + if (!org.hl7.fhir.validation.tests.utilities.TestUtilities.silent) System.out.println("Validate patient-example.xml in v1.0.2 version"); ValidationEngine ve = new ValidationEngine("hl7.fhir.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2); ve.setNoInvariantChecks(true); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "patient102.xml"), null); - if (!TestingUtilities.silent) + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "patient102.xml"), null); + if (!TestUtilities.silent) for (OperationOutcomeIssueComponent iss : op.getIssue()) { System.out.println(" "+iss.getDetails().getText()); } @@ -102,7 +103,7 @@ public class ValidationEngineTests { Assert.assertTrue(e == 1); Assert.assertTrue(w == 0); Assert.assertTrue(h == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } @@ -112,12 +113,12 @@ public class ValidationEngineTests { Assert.assertTrue(true); return; } - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate patient-example.xml in v1.0.2 version"); ValidationEngine ve = new ValidationEngine("hl7.fhir.core#1.0.2", DEF_TX, null, FhirPublication.DSTU2); ve.setNoInvariantChecks(true); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "observation102.json"), null); - if (!TestingUtilities.silent) + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "observation102.json"), null); + if (!TestUtilities.silent) for (OperationOutcomeIssueComponent iss : op.getIssue()) { System.out.println(" "+iss.getDetails().getText()); } @@ -127,46 +128,42 @@ public class ValidationEngineTests { Assert.assertTrue(e == 1); Assert.assertTrue(w == 0); Assert.assertTrue(h == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } @Test public void test301() throws Exception { - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate observation301.xml against Core"); - if (!TestingUtilities.silent) - System.out.println(" .. load FHIR from " +Utilities.path(TestingUtilities.home(), "publish")); ValidationEngine ve = new ValidationEngine("hl7.fhir.core#3.0.1", DEF_TX, null, FhirPublication.STU3); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. load USCore"); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "observation301.xml"), null); - if (!TestingUtilities.silent) + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "observation301.xml"), null); + if (!TestUtilities.silent) for (OperationOutcomeIssueComponent issue : op.getIssue()) System.out.println(" - "+issue.getDetails().getText()); int e = errors(op); int w = warnings(op); int h = hints(op); Assert.assertTrue(e == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } @Test public void test301USCore() throws Exception { - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println("Validate patient300.xml against US-Core"); - if (!TestingUtilities.silent) - System.out.println(" .. load FHIR from " +Utilities.path(TestingUtilities.home(), "publish")); ValidationEngine ve = new ValidationEngine("hl7.fhir.core#3.0.1", DEF_TX, null, FhirPublication.STU3); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. load USCore"); ve.loadIg("hl7.fhir.us.core#1.0.1"); List profiles = new ArrayList<>(); profiles.add("http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"); - OperationOutcome op = ve.validate(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "patient301.xml"), profiles); - if (!TestingUtilities.silent) + OperationOutcome op = ve.validate(TestUtilities.resourceNameToFile("validation-examples", "patient301.xml"), profiles); + if (!TestUtilities.silent) for (OperationOutcomeIssueComponent issue : op.getIssue()) System.out.println(" - "+issue.getDetails().getText()); int e = errors(op); @@ -175,25 +172,25 @@ public class ValidationEngineTests { Assert.assertTrue(e == 1); Assert.assertTrue(w == 0); Assert.assertTrue(h == 0); - if (!TestingUtilities.silent) + if (!TestUtilities.silent) System.out.println(" .. done: "+Integer.toString(e)+" errors, "+Integer.toString(w)+" warnings, "+Integer.toString(h)+" information messages"); } // @Test // public void testTransform() throws Exception { -// if (!TestingUtilities.silent) +// if (!TestUtilities.silent) // System.out.println("Transform CCDA"); -// if (!TestingUtilities.silent) -// System.out.println(" .. load FHIR from " +Utilities.path(TestingUtilities.home(), "publish")); -// ValidationEngine ve = new ValidationEngine(Utilities.path(TestingUtilities.home(), "publish"), DEF_TX, null, FhirVersion.R4); -// if (!TestingUtilities.silent) -// System.out.println(" .. load CCDA from " +Utilities.path(TestingUtilities.home(), "guides\\ccda2\\mapping\\logical")); -// ve.loadIg(Utilities.path(TestingUtilities.home(), "guides\\ccda2\\mapping\\logical")); -// if (!TestingUtilities.silent) -// System.out.println(" .. load Maps from " +Utilities.path(TestingUtilities.home(), "guides\\ccda2\\mapping\\map")); -// ve.loadIg(Utilities.path(TestingUtilities.home(), "guides\\ccda2\\mapping\\map")); -// Resource r = ve.transform(Utilities.path(TestingUtilities.home(), "guides\\ccda2\\mapping\\example\\ccd.xml"), "http://hl7.org/fhir/StructureMap/cda"); -// if (!TestingUtilities.silent) +// if (!TestUtilities.silent) +// System.out.println(" .. load FHIR from " +Utilities.path(TestUtilities.home(), "publish")); +// ValidationEngine ve = new ValidationEngine(Utilities.path(TestUtilities.home(), "publish"), DEF_TX, null, FhirVersion.R4); +// if (!TestUtilities.silent) +// System.out.println(" .. load CCDA from " +Utilities.path(TestUtilities.home(), "guides\\ccda2\\mapping\\logical")); +// ve.loadIg(Utilities.path(TestUtilities.home(), "guides\\ccda2\\mapping\\logical")); +// if (!TestUtilities.silent) +// System.out.println(" .. load Maps from " +Utilities.path(TestUtilities.home(), "guides\\ccda2\\mapping\\map")); +// ve.loadIg(Utilities.path(TestUtilities.home(), "guides\\ccda2\\mapping\\map")); +// Resource r = ve.transform(Utilities.path(TestUtilities.home(), "guides\\ccda2\\mapping\\example\\ccd.xml"), "http://hl7.org/fhir/StructureMap/cda"); +// if (!TestUtilities.silent) // System.out.println(" .. done"); // } diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationTestSuite.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationTestSuite.java index affbdf037..1d17a197c 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationTestSuite.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/r4/tests/ValidationTestSuite.java @@ -43,6 +43,7 @@ import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; +import org.hl7.fhir.validation.tests.utilities.TestUtilities; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -60,7 +61,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour public static Iterable data() throws ParserConfigurationException, SAXException, IOException { Map examples = new HashMap(); - JsonObject json = (JsonObject) new com.google.gson.JsonParser().parse(TextFile.fileToString(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", "manifest.json"))); + JsonObject json = (JsonObject) new com.google.gson.JsonParser().parse(TextFile.fileToString(TestUtilities.resourceNameToFile("validation-examples", "manifest.json"))); json = json.getAsJsonObject("validator-tests"); for (Entry e : json.getAsJsonObject("Json").entrySet()) { examples.put("Json."+e.getKey(), e.getValue().getAsJsonObject()); @@ -104,18 +105,18 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour if (content.has("use-test") && !content.get("use-test").getAsBoolean()) return; - String path = Utilities.path(TestingUtilities.home(), "tests", "validation-examples", name.substring(name.indexOf(".")+1)); + String path = TestUtilities.resourceNameToFile("validation-examples", name.substring(name.indexOf(".")+1)); InstanceValidator val = ve.getValidator(); if (content.has("allowed-extension-domain")) val.getExtensionDomains().add(content.get("allowed-extension-domain").getAsString()); val.setFetcher(this); if (content.has("questionnaire")) { - ve.getContext().cacheResource(new XmlParser().parse(new FileInputStream(Utilities.path(TestingUtilities.home(), "tests", "validation-examples", content.get("questionnaire").getAsString())))); + ve.getContext().cacheResource(new XmlParser().parse(new FileInputStream(TestUtilities.resourceNameToFile("validation-examples", content.get("questionnaire").getAsString())))); } if (content.has("profiles")) { for (JsonElement je : content.getAsJsonArray("profiles")) { String p = je.getAsString(); - String filename = Utilities.path(TestingUtilities.home(), "tests", "validation-examples", p); + String filename = TestUtilities.resourceNameToFile("validation-examples", p); StructureDefinition sd = loadProfile(filename, Constants.VERSION); val.getContext().cacheResource(sd); } @@ -123,7 +124,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour if (content.has("profile")) { List errors = new ArrayList(); JsonObject profile = content.getAsJsonObject("profile"); - String filename = Utilities.path(TestingUtilities.home(), "tests", "validation-examples", profile.get("source").getAsString()); + String filename = TestUtilities.resourceNameToFile("validation-examples", profile.get("source").getAsString()); String v = content.has("version") ? content.get("version").getAsString() : Constants.VERSION; StructureDefinition sd = loadProfile(filename, v); if (name.startsWith("Json.")) diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/utilities/TestUtilities.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/utilities/TestUtilities.java new file mode 100644 index 000000000..716387919 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/utilities/TestUtilities.java @@ -0,0 +1,18 @@ +package org.hl7.fhir.validation.tests.utilities; + +import java.io.IOException; + +public class TestUtilities { + + public static boolean silent = false; + + public static String resourceNameToFile(String name) throws IOException { + return org.hl7.fhir.utilities.Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", name); + } + + + public static String resourceNameToFile(String subFolder, String name) throws IOException { + return org.hl7.fhir.utilities.Utilities.path(System.getProperty("user.dir"), "src", "test", "resources", subFolder, name); + } + +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-bad-empty.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-bad-empty.json new file mode 100644 index 000000000..508916484 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-bad-empty.json @@ -0,0 +1,27 @@ +{ + "resourceType": "Bundle", + "id": "bundle", + "type": "collection", + "entry": [ + { + "fullUrl": "", + "resource": { + "resourceType": "Patient", + "id" : "pat1", + "link" : [{ + "type" : "refer", + "other" : { + "reference" : "Patient/pat2" + } + }] + } + }, + { + "fullUrl": "http://acme.com/Patient/pat2", + "resource": { + "resourceType": "Patient", + "id" : "pat2" + } + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.json new file mode 100644 index 000000000..c70a8ceac --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.json @@ -0,0 +1,27 @@ +{ + "resourceType": "Bundle", + "id": "bundle", + "type": "collection", + "entry": [ + { + "fullUrl": "http://acme.com/Patient/pat1", + "resource": { + "resourceType": "Patient", + "id" : "pat1", + "link" : [{ + "type" : "refer", + "other" : { + "reference" : "Patient/pat2" + } + }] + } + }, + { + "fullUrl": "http://acme.com/Patient/pat2", + "resource": { + "resourceType": "Patient", + "id" : "pat2" + } + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.ttl new file mode 100644 index 000000000..f40316480 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.ttl @@ -0,0 +1,38 @@ +@prefix fhir: . +@prefix owl: . +@prefix rdfs: . +@prefix xs: . + +# - resource ------------------------------------------------------------------- + +[a fhir:Bundle; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "bundle"]; + fhir:Bundle.type [ fhir:value "collection"]; + fhir:Bundle.entry [ + fhir:index 0; + fhir:Bundle.entry.fullUrl [ fhir:value "http://acme.com/Patient/pat1" ]; + fhir:Bundle.entry.resource + ], [ + fhir:index 1; + fhir:Bundle.entry.fullUrl [ fhir:value "http://acme.com/Patient/pat2" ]; + fhir:Bundle.entry.resource + ]]. + + a fhir:Patient; + fhir:index 0; + fhir:Resource.id [ fhir:value "pat1"]; + fhir:Patient.link [ + fhir:index 0; + fhir:Patient.link.other [ + fhir:Reference.reference [ fhir:value "Patient/pat2" ] + ]; + fhir:Patient.link.type [ fhir:value "refer" ] + ]. + + a fhir:Patient; + fhir:index 0; + fhir:Resource.id [ fhir:value "pat2"]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.xml new file mode 100644 index 000000000..a4b0047b4 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/bundle-good.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example-bad.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example-bad.xml new file mode 100644 index 000000000..7f390f34f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example-bad.xml @@ -0,0 +1,966 @@ + + + + + + + + + +
+

Referral Note document for Amy Shaw

+

Managed by Community Health and Hospitals

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <confidentiality value="N"/> + <attester> + <mode value="legal"/> + <time value="2012-01-04T09:10:14Z"/> + <party> + <reference value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + <display value="Ronald Boone, MD"/> + </party> + </attester> + <!-- Organization Resource --> + <custodian> + <reference value="http://hl7.org/fhir/us/core/Organization-acme-lab.xml"/> + <display value="Acme Labs"/> + </custodian> + <event> + <code> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v3-ActClass"/> + <code value="PCPR"/> + <display value="Care Provision"/> + </coding> + </code> + <period> + <start value="2015-11-18"/> + <end value="2015-12-12"/> + </period> + </event> + <!-- Encounter Resource --> + <!--<encounter><reference value="http://fhirtest.uhn.ca/baseDstu3/Encounter/117630"/></encounter>--> + <!-- Allergies and Intolerances Section Narrative --> + <section> + <title value="Allergies and Intolerances Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="48765-2"/> + <display value="Allergies and Adverse Reactions"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Substance</b> + </td> + <td> + <b>Overall Severity</b> + </td> + <td> + <b>Reaction</b> + </td> + <td> + <b>Reaction Severity</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Cashew Nut</td> + <td>Severe</td> + <td>Anaphylactic reaction</td> + <td>Mild</td> + <td>Active</td> + </tr> + </table> + </div> + </text> + <mode value="snapshot"/> + <orderedBy> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/list-order"/> + <code value="event-date"/> + <display value="Sorted by Event Date"/> + </coding> + </orderedBy> + <!-- Allergies and Intolerance Section Resource--> + <entry> + <reference value="http://hl7.org/fhir/us/core/AllergyIntolerance-example.xml"/> + </entry> + </section> + <!-- SPM duplicate for error: Allergies and Intolerances Section Narrative --> + <section> + <title value="Allergies and Intolerances Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="48765-2"/> + <display value="Allergies and Adverse Reactions"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Substance</b> + </td> + <td> + <b>Overall Severity</b> + </td> + <td> + <b>Reaction</b> + </td> + <td> + <b>Reaction Severity</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Cashew Nut</td> + <td>Severe</td> + <td>Anaphylactic reaction</td> + <td>Mild</td> + <td>Active</td> + </tr> + </table> + </div> + </text> + <mode value="snapshot"/> + <orderedBy> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/list-order"/> + <code value="event-date"/> + <display value="Sorted by Event Date"/> + </coding> + </orderedBy> + <!-- Allergies and Intolerance Section Resource--> + <entry> + <reference value="http://hl7.org/fhir/us/core/AllergyIntolerance-example.xml"/> + </entry> + </section> + <!-- Advance Directives Section Narrative --> + <section> + <title value="Advance Directives Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="42348-3"/> + <display value="Advance directives"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Name</b> + </td> + <td> + <b>Applies Period</b> + </td> + </tr> + <tr> + <td>Resuscitation</td> + <td>2015/01/01 - 2016/12/31</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Assessment Section Narrative --> + <section> + <title value=" Assessment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="51848-0"/> + <display value="Assessment (evaluation)"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Obesity.</p> + <p>Uncontrolled brittle Type II diabetic.</p> + <p>Shortness of breath, mild wheezing.</p> + <p>Pressure ulder on left knee.</p> + </div> + </text> + </section> + <!-- Assessment and Plan Section Narrative --> + <section> + <title value="Assessment and Plan Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="51847-2"/> + <display value="Assessment (evaluation) and plan"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Recurrent GI bleed of unknown etiology; hypotension perhaps + secondary to this but as likely secondary to polypharmacy</p> + <p>Acute on chronic anemia secondary to #1.</p> + <p>Azotemia, acute renal failure with volume loss secondary tom#1.</p> + <p>Hyperkalemia secondary to #3 and on ACE and K+ supplement.</p> + <p>Other chronic diagnoses as noted above, currently stable.</p> + </div> + </text> + </section> + <!-- Family History Section Narrative --> + <section> + <title value="Family History Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10157-6"/> + <display value="History of family member diseases"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Relationship</b> + </td> + <td> + <b>Diagnosis</b> + </td> + <td> + <b>Age at Onset</b> + </td> + </tr> + <tr> + <td>Father</td> + <td>Myocardial Infarction(cause of Death)</td> + <td>57</td> + </tr> + <tr> + <td>Father</td> + <td>Diabetes</td> + <td>40</td> + </tr> + </table> + </div> + </text> + <!-- Family History Section Resource --> + <!-- <entry><reference value="http://fhirtest.uhn.ca/baseDstu3/FamilyMemberHistory/117652"/></entry>--> + </section> + <!-- History of Past Illness Section Narrative --> + <section> + <title value="History of Past Illness Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11348-0"/> + <display value="History of past illness"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>See History of Present Illness</p> + </div> + </text> + </section> + <!-- History of Present Illness Section Narrative --> + <section> + <title value="History of Present Illness Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10164-2"/> + <display value="History of present illness"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>This patient was only recently discharged for a recurrent GI bleed as described below. </p> + <p>He presented to the ER today c/o a dark stool yesterday but a normal brown + stool today. On exam he was hypotensive in the 80?s resolved after .... .... .... </p> + <p>Lab at discharge: Glucose 112, BUN 16, creatinine 1.1, electrolytes normal. + H. pylori antibody pending. Admission hematocrit 16%, discharge hematocrit 29%. WBC + 7300, platelet count 256,000. Urinalysis normal. Urine culture: No growth. INR 1.1, + PTT 40. </p> + <p>He was transfused with 6 units of packed red blood cells with .... .... .... </p> + <p>GI evaluation 12 September: Colonoscopy showed single red clot in .... ........ </p> + </div> + </text> + </section> + <!-- Social History Section Narrative --> + <section> + <title value="Social History Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="29762-2"/> + <display value="Social history"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Social History Element</b> + </td> + <td> + <b>Description</b> + </td> + <td> + <b>Effective Dates</b> + </td> + </tr> + <tr> + <td>Smoking</td> + <td>1 pack tobacco per day</td> + <td>2005/05/01 - 2010/02/28</td> + </tr> + </table> + </div> + </text> + <!-- Social History Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-some-day-smoker.xml"/> + </entry> + </section> + <!-- General Status Section Narrative --> + <section> + <title value=" General Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10210-3"/> + <display value="Physical findings of General status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Alert and in good spirits, no acute distress.</p> + </div> + </text> + </section> + <!-- Functional Status Section Narrative --> + <section> + <title value="Functional Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="47420-5"/> + <display value="Functional status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Functional or Cognitive Finding</b> + </td> + <td> + <b>Observation</b> + </td> + <td> + <b>Observation Date</b> + </td> + <td> + <b>Condition Status</b> + </td> + </tr> + <tr> + <td>Ambulation (Dependent to Independent</td> + <td>Independently able</td> + <td>2010/03/11</td> + <td>Active</td> + </tr> + <tr> + <td>Finding of Functional Performance and Activity</td> + <td>Dyspnea</td> + <td>2008/02/16</td> + <td>Active</td> + </tr> + <tr> + <td>Cognitive Function Finding</td> + <td>Memory Impairment</td> + <td>2014/04/29</td> + <td>Active</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Mental Status Section Narrative --> + <section> + <title value="Mental Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10190-7"/> + <display value="Mental status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table border="1" width="100%"> + <thead> + <tr> + <td> + <b>Mental Status Findings</b> + </td> + <td> + <b>Effective Dates</b> + </td> + <td> + <b>Condition Status</b> + </td> + </tr> + </thead> + <tr> + <td>Mental Function</td> + <td>July 31, 2013</td> + <td>Impaired</td> + </tr> + <tr> + <td>Cognitive Abilities</td> + <td>July 31, 2013</td> + <td>Judgement, Intact</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Aggressive Behavior</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Difficulty understanding own emotions</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Difficulty communicating Thoughts </td> + </tr> + </table> + </div> + </text> + </section> + <!-- Immunization Section Narrative --> + <section> + <title value="Immunizations Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11369-6"/> + <display value="History of immunization"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Vaccine</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Fluvax (Influenza)</td> + <td>2016-04-05</td> + <td>Completed</td> + </tr> + </table> + </div> + </text> + <!-- Immunization Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Immunization-imm-1.xml"/> + </entry> + </section> + <!-- Nutrition Section Narrative --> + <section> + <title value=" Nutrition Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="61144-2"/> + <display value="Diet and nutrition"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Date</b> + </td> + <td> + <b>Nutritional Status</b> + </td> + <td> + <b>Diet</b> + </td> + </tr> + <tr> + <td>2005/12/29</td> + <td>Well nourished</td> + <td>Low sodium diet, excessive carbohydrate</td> + </tr> + <tr> + <td>2010/05/26</td> + <td>Slight dehydration</td> + <td>High protein, low fibre</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Reason for Referral Section Narrative --> + <section> + <title value="Reason for Referral Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="42349-1"/> + <display value="Reason for Referral"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Colonoscopy</p> + </div> + </text> + </section> + <!-- Physical Exam Section Narrative --> + <section> + <title value="Physical Exam Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="29545-1"/> + <display value="Physical findings"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>HEENT: All normal to examination.</p> + <p>>HEART: RRR, no murmur.</p> + <p>THORAX & LUNGS: Clear without rhonchi or wheeze.</p> + <p>ABDOMEN: Marked distension and tenderness, slightly obese, pos bowelsounds.</p> + <p>BACK: Normal to inspection and palpation, without tenderness; no presacral edema.</p> + <p>EXTREMITIES: Doughy edema bilaterally, chronic stasis changes, no asymmetrical swelling.</p> + </div> + </text> + </section> + <!-- Review of Systems Section Narrative --> + <section> + <title value="Review of Systems Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10187-3"/> + <display value="Review of systems"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Patient denies recent history of fever or malaise. Positive for weakness and + shortness of breath. Several episodes of abdominal tenderness. No recent headaches. + Positive for osteoarthritis in hips, knees and hands. </p> + </div> + </text> + </section> + <!-- Medication Section Narrative --> + <section> + <title value="Medication Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10160-0"/> + <display value="History of Medication Use"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Medication</b> + </td> + <td> + <b>Directions</b> + </td> + <td> + <b>Start Date</b> + </td> + <td> + <b>Status</b> + </td> + <td> + <b>Indications</b> + </td> + <td> + <b>Fill Instructions</b> + </td> + </tr> + <tr> + <td>Amoxicillin</td> + <td>Amoxicillin Powder, for Suspension 250mg/5ml</td> + <td>20160401</td> + <td>Active</td> + <td>Pneumonia</td> + <td>Generic substitution allowed</td> + </tr> + </table> + </div> + </text> + <!-- Medication Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/MedicationStatement-uscore-ms1.xml"/> + </entry> + </section> + <!-- Medical Equipment Section Narrative --> + <section> + <title value="Medical Equipment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="46264-8"/> + <display value="Medical equipment"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Supply/Device</b> + </td> + <td> + <b>Date Supplied</b> + </td> + </tr> + <tr> + <td>Automatic Implantable cardioverter/defbrillator</td> + <td>2008/11/16</td> + </tr> + <tr> + <td>Wheelchair</td> + <td>1999/12/01</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Plan of Treatment Section Narrative --> + <section> + <title value="Plan of Treatment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="18776-5"/> + <display value="Plan of treatment"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Planned Activity</b> + </td> + <td> + <b>Period</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Colonoscopy</td> + <td>2010/08/16 - 2010/08/16</td> + <td>Completed</td> + </tr> + <tr> + <td>Recommendation to Exercise</td> + <td>2015/10/29</td> + <td>Ongoing</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Problem Section Narrative --> + <section> + <title value="Problem Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11450-4"/> + <display value="Problem List"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Problem Name</b> + </td> + <td> + <b>Type</b> + </td> + <td> + <b>Onset Date</b> + </td> + <td> + <b>Abatement Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Fever</td> + <td>Condition</td> + <td>2016-04-01</td> + <td>2016-04-14</td> + <td>Complete</td> + </tr> + </table> + </div> + </text> + <!-- Problem Section Condition Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Condition-hc1.xml"/> + </entry> + </section> + <!-- Procedures Section Narrative --> + <section> + <title value="Procedures Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="47519-4"/> + <display value="History of procedures"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Procedure Name</b> + </td> + <td> + <b>Body Site</b> + </td> + <td> + <b>Performer</b> + </td> + <td> + <b>Date Performed</b> + </td> + <td> + <b>Reason</b> + </td> + </tr> + <tr> + <td>Appendectomy (Procedure)</td> + <td>Abdomen</td> + <td>Dr. Adam Everyman</td> + <td>20160405</td> + <td>Generalized abdominal pain 24 hours. Localized in RIF with rebound and guarding</td> + </tr> + </table> + </div> + </text> + <!-- Procedures Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Procedure-rehab.xml"/> + </entry> + </section> + <!-- Results Section Narrative --> + <section> + <title value="Results Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="30954-2"/> + <display value="Relevant diagnostic tests and laboratory data"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Result Type</b> + </td> + <td> + <b>Quantity Value</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Glucose [Moles/volume] in Blood</td> + <td>6.3 mmol/l</td> + <td>2016/04/01</td> + <td>Final</td> + </tr> + </table> + </div> + </text> + <!-- Results Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-usg.xml"/> + </entry> + </section> + <!-- Vital Signs Section Narrative --> + <section> + <title value="Vital Signs Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="8716-3"/> + <display value="Vital signs"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Vital Sign</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Value</b> + </td> + </tr> + <tr> + <td>Temperature</td> + <td>2016/04/05</td> + <td>39 Degrees Celcius</td> + </tr> + </table> + </div> + </text> + <!-- Vital Signs Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-temperature.xml"/> + </entry> + </section> +</Composition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example.xml new file mode 100644 index 000000000..99c1dfebc --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-example.xml @@ -0,0 +1,911 @@ +<Composition + xmlns="http://hl7.org/fhir"> + <id value="CCDA-on-FHIR-Referral-Note-Example"/> + <meta> + <versionId value="1"/> + <lastUpdated value="2016-06-15T08:16:14Z"/> + <profile value="http://hl7.org/fhir/ccda/StructureDefinition/CCDA-on-FHIR-Referral-Note"/> + </meta> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Referral Note document for Amy Shaw</p> + <p>Managed by Community Health and Hospitals</p> + </div> + </text> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-data-enterer-extension"> + <valueUri value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + </extension> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-informant-extension"> + <valueUri value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + </extension> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-information-recipient-extension"> + <valueUri value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + </extension> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-participant-extension"> + <valueUri value="http://hl7.org/fhir/relatedperson-example-peter.xml.html"/> + </extension> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-performer-extension"> + <valueUri value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + </extension> + <extension url="http://hl7.org/fhir/ccda/StructureDefinition/ccda-authorization-extension"> + <valueUri value="http://hl7.org/fhir/ccda/StructureDefinition/ccda-consent"/> + </extension> + <identifier> + <system value="http://hl7.org/fhir/ccda/StructureDefinition/CCDA_on_FHIR_Referral_Note"/> + <value value="1"/> + </identifier> + <status value="preliminary"/> + <type> + <coding> + <system value="http://loinc.org"/> + <code value="57133-1"/> + <display value="Referral Note"/> + </coding> + </type> + <!-- Patient Resource --> + <subject> + <reference value="http://hl7.org/fhir/us/core/Patient-example.xml"/> + <display value="Amy V. Shaw"/> + </subject> + <date value="2016-02-28T09:10:14Z"/> + <!-- Practitioner Resource --> + <author> + <reference value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + <display value="Ronald Boone, MD"/> + </author> + <title value="Referral Note"/> + <confidentiality value="N"/> + <attester> + <mode value="legal"/> + <time value="2012-01-04T09:10:14Z"/> + <party> + <reference value="http://hl7.org/fhir/us/core/Practitioner-practitioner-1.xml"/> + <display value="Ronald Boone, MD"/> + </party> + </attester> + <!-- Organization Resource --> + <custodian> + <reference value="http://hl7.org/fhir/us/core/Organization-acme-lab.xml"/> + <display value="Acme Labs"/> + </custodian> + <event> + <code> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v3-ActClass"/> + <code value="PCPR"/> + <display value="Care Provision"/> + </coding> + </code> + <period> + <start value="2015-11-18"/> + <end value="2015-12-12"/> + </period> + </event> + <!-- Encounter Resource --> + <!--<encounter><reference value="http://fhirtest.uhn.ca/baseDstu3/Encounter/117630"/></encounter>--> + <!-- Allergies and Intolerances Section Narrative --> + <section> + <title value="Allergies and Intolerances Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="48765-2"/> + <display value="Allergies and Adverse Reactions"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Substance</b> + </td> + <td> + <b>Overall Severity</b> + </td> + <td> + <b>Reaction</b> + </td> + <td> + <b>Reaction Severity</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Cashew Nut</td> + <td>Severe</td> + <td>Anaphylactic reaction</td> + <td>Mild</td> + <td>Active</td> + </tr> + </table> + </div> + </text> + <mode value="snapshot"/> + <orderedBy> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/list-order"/> + <code value="event-date"/> + <display value="Sorted by Event Date"/> + </coding> + </orderedBy> + <!-- Allergies and Intolerance Section Resource--> + <entry> + <reference value="http://hl7.org/fhir/us/core/AllergyIntolerance-example.xml"/> + </entry> + </section> + <!-- Advance Directives Section Narrative --> + <section> + <title value="Advance Directives Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="42348-3"/> + <display value="Advance directives"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Name</b> + </td> + <td> + <b>Applies Period</b> + </td> + </tr> + <tr> + <td>Resuscitation</td> + <td>2015/01/01 - 2016/12/31</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Assessment Section Narrative --> + <section> + <title value=" Assessment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="51848-0"/> + <display value="Assessment (evaluation)"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Obesity.</p> + <p>Uncontrolled brittle Type II diabetic.</p> + <p>Shortness of breath, mild wheezing.</p> + <p>Pressure ulder on left knee.</p> + </div> + </text> + </section> + <!-- Assessment and Plan Section Narrative --> + <section> + <title value="Assessment and Plan Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="51847-2"/> + <display value="Assessment (evaluation) and plan"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Recurrent GI bleed of unknown etiology; hypotension perhaps + secondary to this but as likely secondary to polypharmacy</p> + <p>Acute on chronic anemia secondary to #1.</p> + <p>Azotemia, acute renal failure with volume loss secondary tom#1.</p> + <p>Hyperkalemia secondary to #3 and on ACE and K+ supplement.</p> + <p>Other chronic diagnoses as noted above, currently stable.</p> + </div> + </text> + </section> + <!-- Family History Section Narrative --> + <section> + <title value="Family History Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10157-6"/> + <display value="History of family member diseases"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Relationship</b> + </td> + <td> + <b>Diagnosis</b> + </td> + <td> + <b>Age at Onset</b> + </td> + </tr> + <tr> + <td>Father</td> + <td>Myocardial Infarction(cause of Death)</td> + <td>57</td> + </tr> + <tr> + <td>Father</td> + <td>Diabetes</td> + <td>40</td> + </tr> + </table> + </div> + </text> + <!-- Family History Section Resource --> + <!-- <entry><reference value="http://fhirtest.uhn.ca/baseDstu3/FamilyMemberHistory/117652"/></entry>--> + </section> + <!-- History of Past Illness Section Narrative --> + <section> + <title value="History of Past Illness Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11348-0"/> + <display value="History of past illness"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>See History of Present Illness</p> + </div> + </text> + </section> + <!-- History of Present Illness Section Narrative --> + <section> + <title value="History of Present Illness Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10164-2"/> + <display value="History of present illness"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>This patient was only recently discharged for a recurrent GI bleed as described below. </p> + <p>He presented to the ER today c/o a dark stool yesterday but a normal brown + stool today. On exam he was hypotensive in the 80?s resolved after .... .... .... </p> + <p>Lab at discharge: Glucose 112, BUN 16, creatinine 1.1, electrolytes normal. + H. pylori antibody pending. Admission hematocrit 16%, discharge hematocrit 29%. WBC + 7300, platelet count 256,000. Urinalysis normal. Urine culture: No growth. INR 1.1, + PTT 40. </p> + <p>He was transfused with 6 units of packed red blood cells with .... .... .... </p> + <p>GI evaluation 12 September: Colonoscopy showed single red clot in .... ........ </p> + </div> + </text> + </section> + <!-- Social History Section Narrative --> + <section> + <title value="Social History Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="29762-2"/> + <display value="Social history"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Social History Element</b> + </td> + <td> + <b>Description</b> + </td> + <td> + <b>Effective Dates</b> + </td> + </tr> + <tr> + <td>Smoking</td> + <td>1 pack tobacco per day</td> + <td>2005/05/01 - 2010/02/28</td> + </tr> + </table> + </div> + </text> + <!-- Social History Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-some-day-smoker.xml"/> + </entry> + </section> + <!-- General Status Section Narrative --> + <section> + <title value=" General Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10210-3"/> + <display value="Physical findings of General status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Alert and in good spirits, no acute distress.</p> + </div> + </text> + </section> + <!-- Functional Status Section Narrative --> + <section> + <title value="Functional Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="47420-5"/> + <display value="Functional status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Functional or Cognitive Finding</b> + </td> + <td> + <b>Observation</b> + </td> + <td> + <b>Observation Date</b> + </td> + <td> + <b>Condition Status</b> + </td> + </tr> + <tr> + <td>Ambulation (Dependent to Independent</td> + <td>Independently able</td> + <td>2010/03/11</td> + <td>Active</td> + </tr> + <tr> + <td>Finding of Functional Performance and Activity</td> + <td>Dyspnea</td> + <td>2008/02/16</td> + <td>Active</td> + </tr> + <tr> + <td>Cognitive Function Finding</td> + <td>Memory Impairment</td> + <td>2014/04/29</td> + <td>Active</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Mental Status Section Narrative --> + <section> + <title value="Mental Status Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10190-7"/> + <display value="Mental status"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table border="1" width="100%"> + <thead> + <tr> + <td> + <b>Mental Status Findings</b> + </td> + <td> + <b>Effective Dates</b> + </td> + <td> + <b>Condition Status</b> + </td> + </tr> + </thead> + <tr> + <td>Mental Function</td> + <td>July 31, 2013</td> + <td>Impaired</td> + </tr> + <tr> + <td>Cognitive Abilities</td> + <td>July 31, 2013</td> + <td>Judgement, Intact</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Aggressive Behavior</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Difficulty understanding own emotions</td> + </tr> + <tr> + <td>Cognitive Function</td> + <td>July 31, 2013</td> + <td>Difficulty communicating Thoughts </td> + </tr> + </table> + </div> + </text> + </section> + <!-- Immunization Section Narrative --> + <section> + <title value="Immunizations Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11369-6"/> + <display value="History of immunization"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Vaccine</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Fluvax (Influenza)</td> + <td>2016-04-05</td> + <td>Completed</td> + </tr> + </table> + </div> + </text> + <!-- Immunization Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Immunization-imm-1.xml"/> + </entry> + </section> + <!-- Nutrition Section Narrative --> + <section> + <title value=" Nutrition Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="61144-2"/> + <display value="Diet and nutrition"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Date</b> + </td> + <td> + <b>Nutritional Status</b> + </td> + <td> + <b>Diet</b> + </td> + </tr> + <tr> + <td>2005/12/29</td> + <td>Well nourished</td> + <td>Low sodium diet, excessive carbohydrate</td> + </tr> + <tr> + <td>2010/05/26</td> + <td>Slight dehydration</td> + <td>High protein, low fibre</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Reason for Referral Section Narrative --> + <section> + <title value="Reason for Referral Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="42349-1"/> + <display value="Reason for Referral"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Colonoscopy</p> + </div> + </text> + </section> + <!-- Physical Exam Section Narrative --> + <section> + <title value="Physical Exam Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="29545-1"/> + <display value="Physical findings"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>HEENT: All normal to examination.</p> + <p>>HEART: RRR, no murmur.</p> + <p>THORAX & LUNGS: Clear without rhonchi or wheeze.</p> + <p>ABDOMEN: Marked distension and tenderness, slightly obese, pos bowelsounds.</p> + <p>BACK: Normal to inspection and palpation, without tenderness; no presacral edema.</p> + <p>EXTREMITIES: Doughy edema bilaterally, chronic stasis changes, no asymmetrical swelling.</p> + </div> + </text> + </section> + <!-- Review of Systems Section Narrative --> + <section> + <title value="Review of Systems Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10187-3"/> + <display value="Review of systems"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <p>Patient denies recent history of fever or malaise. Positive for weakness and + shortness of breath. Several episodes of abdominal tenderness. No recent headaches. + Positive for osteoarthritis in hips, knees and hands. </p> + </div> + </text> + </section> + <!-- Medication Section Narrative --> + <section> + <title value="Medication Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="10160-0"/> + <display value="History of Medication Use"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Medication</b> + </td> + <td> + <b>Directions</b> + </td> + <td> + <b>Start Date</b> + </td> + <td> + <b>Status</b> + </td> + <td> + <b>Indications</b> + </td> + <td> + <b>Fill Instructions</b> + </td> + </tr> + <tr> + <td>Amoxicillin</td> + <td>Amoxicillin Powder, for Suspension 250mg/5ml</td> + <td>20160401</td> + <td>Active</td> + <td>Pneumonia</td> + <td>Generic substitution allowed</td> + </tr> + </table> + </div> + </text> + <!-- Medication Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/MedicationStatement-uscore-ms1.xml"/> + </entry> + </section> + <!-- Medical Equipment Section Narrative --> + <section> + <title value="Medical Equipment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="46264-8"/> + <display value="Medical equipment"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Supply/Device</b> + </td> + <td> + <b>Date Supplied</b> + </td> + </tr> + <tr> + <td>Automatic Implantable cardioverter/defbrillator</td> + <td>2008/11/16</td> + </tr> + <tr> + <td>Wheelchair</td> + <td>1999/12/01</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Plan of Treatment Section Narrative --> + <section> + <title value="Plan of Treatment Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="18776-5"/> + <display value="Plan of treatment"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Planned Activity</b> + </td> + <td> + <b>Period</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Colonoscopy</td> + <td>2010/08/16 - 2010/08/16</td> + <td>Completed</td> + </tr> + <tr> + <td>Recommendation to Exercise</td> + <td>2015/10/29</td> + <td>Ongoing</td> + </tr> + </table> + </div> + </text> + </section> + <!-- Problem Section Narrative --> + <section> + <title value="Problem Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="11450-4"/> + <display value="Problem List"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Problem Name</b> + </td> + <td> + <b>Type</b> + </td> + <td> + <b>Onset Date</b> + </td> + <td> + <b>Abatement Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Fever</td> + <td>Condition</td> + <td>2016-04-01</td> + <td>2016-04-14</td> + <td>Complete</td> + </tr> + </table> + </div> + </text> + <!-- Problem Section Condition Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Condition-hc1.xml"/> + </entry> + </section> + <!-- Procedures Section Narrative --> + <section> + <title value="Procedures Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="47519-4"/> + <display value="History of procedures"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Procedure Name</b> + </td> + <td> + <b>Body Site</b> + </td> + <td> + <b>Performer</b> + </td> + <td> + <b>Date Performed</b> + </td> + <td> + <b>Reason</b> + </td> + </tr> + <tr> + <td>Appendectomy (Procedure)</td> + <td>Abdomen</td> + <td>Dr. Adam Everyman</td> + <td>20160405</td> + <td>Generalized abdominal pain 24 hours. Localized in RIF with rebound and guarding</td> + </tr> + </table> + </div> + </text> + <!-- Procedures Section Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Procedure-rehab.xml"/> + </entry> + </section> + <!-- Results Section Narrative --> + <section> + <title value="Results Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="30954-2"/> + <display value="Relevant diagnostic tests and laboratory data"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Result Type</b> + </td> + <td> + <b>Quantity Value</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Status</b> + </td> + </tr> + <tr> + <td>Glucose [Moles/volume] in Blood</td> + <td>6.3 mmol/l</td> + <td>2016/04/01</td> + <td>Final</td> + </tr> + </table> + </div> + </text> + <!-- Results Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-usg.xml"/> + </entry> + </section> + <!-- Vital Signs Section Narrative --> + <section> + <title value="Vital Signs Section"/> + <code> + <coding> + <system value="http://loinc.org"/> + <code value="8716-3"/> + <display value="Vital signs"/> + </coding> + </code> + <text> + <status value="generated"/> + <div + xmlns="http://www.w3.org/1999/xhtml"> + <table> + <tr> + <td> + <b>Vital Sign</b> + </td> + <td> + <b>Date</b> + </td> + <td> + <b>Value</b> + </td> + </tr> + <tr> + <td>Temperature</td> + <td>2016/04/05</td> + <td>39 Degrees Celcius</td> + </tr> + </table> + </div> + </text> + <!-- Vital Signs Section Observation Resource --> + <entry> + <reference value="http://hl7.org/fhir/us/core/Observation-temperature.xml"/> + </entry> + </section> +</Composition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-profile.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-profile.xml new file mode 100644 index 000000000..4b3003c70 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/ccda-profile.xml @@ -0,0 +1,1222 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="CCDA-on-FHIR-Referral-Note"/> + <url value="http://hl7.org/fhir/ccda/StructureDefinition/CCDA-on-FHIR-Referral-Note"/> + <name value="C-CDA on FHIR Referral Note"/> + <status value="draft"/> + <publisher value="River Rock Associates"/> + <contact> + <name value="Brett Marquard"/> + <telecom> + <system value="phone"/> + <value value="4135496886"/> + <use value="work"/> + </telecom> + <telecom> + <system value="email"/> + <value value="brett@riverrockassociates.com"/> + <use value="work"/> + </telecom> + </contact> + <description + value="A Referral Note communicates pertinent information from a provider who is requesting services of another provider of clinical or non-clinical services. The information in this document includes the reason for the referral and additional information that would augment decision making and care delivery. Examples of referral situations are: * When a patient is referred from a family physician to a cardiologist for cardiac evaluation. * When patient is sent by a cardiologist to an emergency department for angina. * When a patient is referred by a nurse practitioner to an audiologist for hearing screening. * When a patient is referred by a hospitalist to social services."/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Composition"/> + <baseDefinition + value="http://hl7.org/fhir/StructureDefinition/Composition"/> + <derivation value="constraint"/> + <differential> + <element id="7055-00001"> + <path value="Composition"/> + </element> + <element id="107701"> + <path value="Composition.type"/> + <short value="type"/> + <definition + value="SHALL contain exactly one [1..1] type, which SHALL be selected from ValueSet ReferralDocumentType http://hl7.org/fhir/ccda/ValueSet/2.16.840.1.113883.1.11.20.2.3 DYNAMIC (CONF:2219-1365)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <binding> + <strength value="required"/> + <valueSet value="ValueSet/2.16.840.1.113883.1.11.20.2.3"/> + </binding> + </element> + <element id="7055-02"> + <path value="Composition.section"/> + <slicing> + <discriminator> + <type value="value"/> + <path value="code"/> + </discriminator> + <rules value="open"/> + </slicing> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2057) such that it" /> + </element> + <element id="107700"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos2"/> + <label value="Allergies and Intolerances Section"/> + <short value="Allergies and Intolerances Section"/> + <definition + value="SHALL contain exactly one [1..1] section (CONF:2219-1364) such that it"/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111256"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos2"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2079)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111257"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos2"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="48765-2" Allergies and Adverse Reactions (CodeSystem: LOINC http://loinc.org) (CONF:2219-2080)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="48765-2"/> + <display value="Allergies and Adverse Reactions"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111258"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos2"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2081)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112076"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos2"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core AllergyIntolerance Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance) (CONF:2219-2244)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + /> + </type> + </element> + <element id="107705"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos3"/> + <label value="Medications Section"/> + <short value="Medications Section"/> + <definition + value="SHALL contain exactly one [1..1] section (CONF:2219-1369) such that it"/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107708"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos3"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1372)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107709"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos3"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10160-0" History of Medication Use (CodeSystem: LOINC http://loinc.org) (CONF:2219-1373)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10160-0"/> + <display value="History of Medication Use"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107710"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos3"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1374)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112077"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos3"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core MedicationStatement Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement) (CONF:2219-2245)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement" + /> + </type> + </element> + <element id="107707"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos4"/> + <label value="Problem Section "/> + <short value="Problem Section "/> + <definition + value="SHALL contain exactly one [1..1] section (CONF:2219-1371) such that it"/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107714"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos4"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1378)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107715"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos4"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="11450-4" Problem List (CodeSystem: LOINC http://loinc.org) (CONF:2219-1379)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="11450-4"/> + <display value="Problem List"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107716"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos4"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1380)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112078"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos4"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core Condition Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition) (CONF:2219-2246)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"/> + </type> + </element> + <element id="107706"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos5"/> + <label value="Reason for Referral Section"/> + <short value="Reason for Referral Section"/> + <definition + value="SHALL contain exactly one [1..1] section (CONF:2219-1370) such that it"/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107711"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos5"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1375)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107712"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos5"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="42349-1" Reason for Referral (CodeSystem: LOINC http://loinc.org) (CONF:2219-1376)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="42349-1"/> + <display value="Reason for Referral"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107713"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos5"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1377)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111192"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos6"/> + <label value="Functional Status Section"/> + <short value="Functional Status Section"/> + <definition + value="SHOULD contain zero or one [0..1] section (CONF:2219-2015) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111196"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos6"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2019)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111197"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos6"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="47420-5" Functional Status Assessment (CodeSystem: LOINC http://loinc.org) (CONF:2219-2020)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="47420-5"/> + <display value="Functional Status Assessment"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111198"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos6"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2021)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111195"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos7"/> + <label value="Mental Status Section"/> + <short value="Mental Status Section"/> + <definition + value="SHOULD contain zero or one [0..1] section (CONF:2219-2018) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111205"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos7"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2028)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111206"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos7"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10190-7" Mental Status (CodeSystem: LOINC http://loinc.org) (CONF:2219-2029)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10190-7"/> + <display value="Mental Status"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111207"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos7"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2030)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111194"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos8"/> + <label value="Nutrition Section"/> + <short value="Nutrition Section"/> + <definition + value="SHOULD contain zero or one [0..1] section (CONF:2219-2017) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111202"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos8"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2025)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111203"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos8"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="61144-2" Diet and Nutrition (CodeSystem: LOINC http://loinc.org) (CONF:2219-2026)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="61144-2"/> + <display value="Diet and Nutrition"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111204"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos8"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2027)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107718"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos9"/> + <label value="Plan of Treatment Section"/> + <short value="Plan of Treatment Section"/> + <definition + value="SHOULD contain zero or one [0..1] section (CONF:2219-1382) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="107723"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos9"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1387)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107724"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos9"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="18776-5" Plan of Care (CodeSystem: LOINC http://loinc.org) (CONF:2219-1388)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="18776-5"/> + <display value="Plan of Care"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107725"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos9"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1389)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111193"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos10"/> + <label value="Results Section"/> + <short value="Results Section"/> + <definition + value="SHOULD contain zero or one [0..1] section (CONF:2219-2016) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111199"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos10"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2022)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111200"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos10"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="30954-2" Relevant Diagnostic Tests/?Laboratory Data (CodeSystem: LOINC http://loinc.org) (CONF:2219-2023)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="30954-2"/> + <display value="Relevant Diagnostic Tests/?Laboratory Data"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111201"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos10"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2024)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112079"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos10"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core ObservationResults Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults) (CONF:2219-2247)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults" + /> + </type> + </element> + <element id="107717"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos11"/> + <label value="Assessment and Plan Section "/> + <short value="Assessment and Plan Section "/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-1381) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="107720"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos11"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1384)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107721"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos11"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="51847-2" Assessment and Plan (CodeSystem: LOINC http://loinc.org) (CONF:2219-1385)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="51847-2"/> + <display value="Assessment and Plan"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107722"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos11"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1386)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111208"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos12"/> + <label value="Advance Directives Section"/> + <short value="Advance Directives Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2031) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111213"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos12"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2036)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111214"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos12"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="42348-3" Advance Directives (CodeSystem: LOINC http://loinc.org) (CONF:2219-2037)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="42348-3"/> + <display value="Advance Directives "/> + </coding> + </patternCodeableConcept> + </element> + <element id="111215"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos12"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2038)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107719"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos13"/> + <label value="Assessment Section"/> + <short value="Assessment Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-1383) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="107726"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos13"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-1390)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="107727"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos13"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="51848-0" Assessment (CodeSystem: LOINC http://loinc.org) (CONF:2219-1391)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="51848-0"/> + <display value="Assessment"/> + </coding> + </patternCodeableConcept> + </element> + <element id="107728"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos13"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-1392)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111212"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos14"/> + <label value="Family History Section"/> + <short value="Family History Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2035) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111225"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos14"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2048)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111226"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos14"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10157-6" History of Family Member Diseases (CodeSystem: LOINC http://loinc.org) (CONF:2219-2049)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10157-6"/> + <display value="History of Family Member Diseases"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111227"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos14"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2050)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112080"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos14"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] FamilyMemberHistory (identifier: http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory) (CONF:2219-2248)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile value="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/> + </type> + </element> + <element id="111211"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos15"/> + <label value="General Status Section"/> + <short value="General Status Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2034) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111222"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos15"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2045)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111223"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos15"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10210-3" Physical Findings of General Status (CodeSystem: LOINC http://loinc.org) (CONF:2219-2046)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10210-3"/> + <display value="Physical Findings of General Status"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111224"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos15"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2047)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111210"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos16"/> + <label value="History of Past Illness Section"/> + <short value="History of Past Illness Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2033) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111219"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos16"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2042)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111220"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos16"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="11348-0" History of Past Illness (CodeSystem: LOINC http://loinc.org) (CONF:2219-2043)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="11348-0"/> + <display value=" History of Past Illness"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111221"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos16"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2044)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="125547"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos16"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core Condition Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition) (CONF:2219-2471)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"/> + </type> + </element> + <element id="111209"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos17"/> + <label value="History of Present Illness Section"/> + <short value="History of Present Illness Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2032) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111216"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos17"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2039)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111217"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos17"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10164-2" History of Present Illness (CodeSystem: LOINC http://loinc.org) (CONF:2219-2040)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10164-2"/> + <display value="History of Present Illness"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111218"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos17"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2041)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111228"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos18"/> + <label value="Immunizations Section"/> + <short value="Immunizations Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2051) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111235"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos18"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2058)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111249"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos18"/> + <short value="code"/> + <definition + value="MAY contain zero or one [0..1] code="11369-6" History of Immunization (CodeSystem: LOINC http://loinc.org) (CONF:2219-2072)."/> + <min value="0"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="11369-6"/> + <display value="History of Immunization"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111236"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos18"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2059)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112081"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos18"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core Immunization Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization) (CONF:2219-2249)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"/> + </type> + </element> + <element id="111234"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos19"/> + <label value="Medical Equipment Section"/> + <short value="Medical Equipment Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2057) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111247"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos19"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2070)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111255"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos19"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="46264-8" History of Medical Device Use (CodeSystem: LOINC http://loinc.org) (CONF:2219-2078)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="46264-8"/> + <display value="History of Medical Device Use"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111248"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos19"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2071)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111233"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos20"/> + <label value="Physical Exam Section"/> + <short value="Physical Exam Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2056) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111245"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos20"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2068)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111254"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos20"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="29545-1" Physical Findings (CodeSystem: LOINC http://loinc.org) (CONF:2219-2077)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="29545-1"/> + <display value="Physical Findings"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111246"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos20"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2069)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111232"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos21"/> + <label value="Procedures Section"/> + <short value="Procedures Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2055) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111243"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos21"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2066)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111253"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos21"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="47519-4" History of Procedures (CodeSystem: LOINC http://loinc.org) (CONF:2219-2076)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="47519-4"/> + <display value="History of Procedures"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111244"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos21"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2067)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112083"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos21"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core Procedure Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure) (CONF:2219-2251)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"/> + </type> + </element> + <element id="111231"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos22"/> + <label value="Review of Systems Section"/> + <short value="Review of Systems Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2054) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111241"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos22"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2064)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111252"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos22"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="10187-3" Review of Systems (CodeSystem: LOINC http://loinc.org) (CONF:2219-2075)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="10187-3"/> + <display value="Review of Systems"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111242"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos22"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2065)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111230"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos23"/> + <label value="Social History Section"/> + <short value="Social History Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2053) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111239"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos23"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2062)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111251"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos23"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="29762-2" Social History (CodeSystem: LOINC http://loinc.org) (CONF:2219-2074)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="29762-2"/> + <display value="Social History"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111240"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos23"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2063)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112606"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos23"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core SmokingStatus Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus) (CONF:2219-2452)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus"/> + </type> + </element> + <element id="111229"> + <path value="Composition.section"/> + <sliceName value="section_slice_pos24"/> + <label value="Vital Signs Section"/> + <short value="Vital Signs Section"/> + <definition value="MAY contain zero or one [0..1] section (CONF:2219-2052) such that it"/> + <min value="0"/> + <max value="1"/> + </element> + <element id="111237"> + <path value="Composition.section.title"/> + <sliceName value="section_slice_pos24"/> + <short value="title"/> + <definition value="SHALL contain exactly one [1..1] title (CONF:2219-2060)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="111250"> + <path value="Composition.section.code"/> + <sliceName value="section_slice_pos24"/> + <short value="code"/> + <definition + value="SHALL contain exactly one [1..1] code="8716-3" Vital Signs (CodeSystem: LOINC http://loinc.org) (CONF:2219-2073)."/> + <min value="1"/> + <max value="1"/> + <type> + <code value="CodeableConcept"/> + </type> + <patternCodeableConcept> + <coding> + <system value="http://loinc.org"/> + <code value="8716-3"/> + <display value="Vital Signs"/> + </coding> + </patternCodeableConcept> + </element> + <element id="111238"> + <path value="Composition.section.text"/> + <sliceName value="section_slice_pos24"/> + <short value="text"/> + <definition value="SHALL contain exactly one [1..1] text (CONF:2219-2061)."/> + <min value="1"/> + <max value="1"/> + </element> + <element id="112082"> + <path value="Composition.section.entry"/> + <sliceName value="section_slice_pos24"/> + <short value="entry"/> + <definition + value="MAY contain zero or more [0..*] U.S. Core VitalSigns Profile (identifier: http://hl7.org/fhir/us/core/StructureDefinition/us-core-vitalsigns) (CONF:2219-2250)."/> + <min value="0"/> + <max value="*"/> + <type> + <code value="Reference"/> + <targetProfile + value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-vitalsigns"/> + </type> + </element> + </differential> +</StructureDefinition> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/code-correct.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-correct.xml new file mode 100644 index 000000000..012ec7662 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-correct.xml @@ -0,0 +1,10 @@ +<Basic xmlns="http://hl7.org/fhir"> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <version value="http://snomed.info/sct/32506021000036107/version/20170403"/> + <code value="132037003"/> + <display value="Pineywoods pig breed"/> + </coding> + </code> +</Basic> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-display.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-display.xml new file mode 100644 index 000000000..03734f811 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-display.xml @@ -0,0 +1,10 @@ +<Basic xmlns="http://hl7.org/fhir"> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <version value="http://snomed.info/sct/32506021000036107/version/20170403"/> + <code value="132037003"/> + <display value="Pineywoods pig breed. Not."/> + </coding> + </code> +</Basic> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system-vs.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system-vs.xml new file mode 100644 index 000000000..8044450fc --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system-vs.xml @@ -0,0 +1,9 @@ +<Basic xmlns="http://hl7.org/fhir"> + <code> + <coding> + <system value="http://hl7.org/fhir/ValueSet/account-type"/> + <code value="132037003"/> + <display value="Pineywoods pig breed"/> + </coding> + </code> +</Basic> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system.xml new file mode 100644 index 000000000..fe62a23f4 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/code-wrong-system.xml @@ -0,0 +1,9 @@ +<Basic xmlns="http://hl7.org/fhir"> + <code> + <coding> + <system value="http://snomed.info/sct/32506021000036107/version/20170403"/> + <code value="132037003"/> + <display value="Pineywoods pig breed"/> + </coding> + </code> +</Basic> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-bad-sections.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-bad-sections.xml new file mode 100644 index 000000000..e3169f02f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-bad-sections.xml @@ -0,0 +1,57 @@ +<!-- +Conforms to the document-structure template + --> +<Composition xmlns="http://hl7.org/fhir"> + <id value="test-document-good"/> + <status value="final"/> + <type> + <text value="test document"/> + </type> + <date value="2018-11-06T07:14:00+11:00"/> + <author> + <display value="grahame grieve"/> + </author> + <title value="TestDocument"/> + <!-- codea section --> + <section> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-a"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code A Section</div> + </text> + </section> + <!-- codeb section --> + <section> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-b"/> + </coding> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/other"/> + <code value="other"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code B Section</div> + </text> + </section> + <section> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-c"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code C Section</div> + </text> + </section> +</Composition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-no-sections.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-no-sections.xml new file mode 100644 index 000000000..1afe40d5a --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-bad-no-sections.xml @@ -0,0 +1,17 @@ +<!-- +Does not conforms to the document-structure template: + +- no sections + --> +<Composition xmlns="http://hl7.org/fhir"> + <id value="test-document-good"/> + <status value="final"/> + <type> + <text value="test document"/> + </type> + <date value="2018-11-06T07:14:00+11:00"/> + <author> + <display value="grahame grieve"/> + </author> + <title value="TestDocument"/> +</Composition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/document-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-good.xml new file mode 100644 index 000000000..01cb10a1d --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-good.xml @@ -0,0 +1,62 @@ +<!-- +Conforms to the document-structure template + --> +<Composition xmlns="http://hl7.org/fhir"> + <id value="test-document-good"/> + <status value="final"/> + <type> + <text value="test document"/> + </type> + <date value="2018-11-06T07:14:00+11:00"/> + <author> + <display value="grahame grieve"/> + </author> + <title value="TestDocument"/> + <!-- codea section --> + <section> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-a"/> + </coding> + </code> + <focus> + <display value="some value for conformance purposes"/> + </focus> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code A Section</div> + </text> + </section> + <!-- codeb section --> + <section> + <title value="section title"/> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-b"/> + </coding> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/other"/> + <code value="other"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code B Section</div> + </text> + </section> + <section> + <code> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-c"/> + </coding> + </code> + <text> + <status value="additional"/> + <div xmlns="http://www.w3.org/1999/xhtml">Code C Section</div> + </text> + <mode value="working"/> + </section> +</Composition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/document-section-library.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-section-library.xml new file mode 100644 index 000000000..caf3f0573 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-section-library.xml @@ -0,0 +1,104 @@ +<!-- +Document section library - a set of section structure definitions that are intended to be re-used elsewhere + +Defines 3 sections: +- codeA +- codeB +- codeC + +These should be sliced by pattern on Section.code + --> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="document-section-library"/> + <url value="http://hl7.org/fhir/test/StructureDefinition/document-section-library"/> + <name value="DocumentSectionLibrary"/> + <title value="Document Section Library (For testing section templates)"/> + <status value="active"/> + <experimental value="false"/> + <date value="2018-11-05T17:57:00+11:00"/> + <kind value="complex-type"/> + <abstract value="true"/> + <type value="Composition"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Composition"/> + <derivation value="constraint"/> + <differential> + <element> + <!-- this is present to work around a bug in the snapshot generator --> + <path value="Composition"/> + </element> + <element> + <!-- set up slicing on Composition.section - by the code. Actually, this slicing is never used anywhere since this library is abstract --> + <path value="Composition.section"/> + <slicing> + <discriminator> + <type value="pattern"/> + <path value="code"/> + </discriminator> + <description value="Slice by .section.code when using this library of sections"/> + <ordered value="true"/> + <rules value="closed"/> + </slicing> + </element> + + <!-- code B --> + <element> + <path value="Composition.section"/> + <sliceName value="codeB"/> + </element> + <element> + <path value="Composition.section.title"/> + <min value="1"/> + </element> + <element> + <path value="Composition.section.code"/> + <min value="1"/> + <patternCodeableConcept> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-b"/> + </coding> + </patternCodeableConcept> + </element> + + <!-- code A --> + <element> + <path value="Composition.section"/> + <sliceName value="codeA"/> + </element> + <element> + <path value="Composition.section.code"/> + <min value="1"/> + <patternCodeableConcept> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-a"/> + </coding> + </patternCodeableConcept> + </element> + <element> + <path value="Composition.section.focus"/> + <min value="1"/> + </element> + + <!-- code C --> + <element> + <path value="Composition.section"/> + <sliceName value="codeC"/> + </element> + <element> + <path value="Composition.section.code"/> + <min value="1"/> + <patternCodeableConcept> + <coding> + <system value="http://hl7.org/fhir/test/CodeSystem/imaginary"/> + <code value="code-c"/> + </coding> + </patternCodeableConcept> + </element> + <element> + <path value="Composition.section.mode"/> + <min value="1"/> + </element> + + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/document-structure.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-structure.xml new file mode 100644 index 000000000..8b70cabca --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/document-structure.xml @@ -0,0 +1,84 @@ +<!-- +Document structure definition + +uses the section library to require 3 sections, each +with a different code: + - code a + - code b + - code c + --> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="document-structure"/> + <url value="http://hl7.org/fhir/test/StructureDefinition/document-structure"/> + <name value="DocumentStructure"/> + <title value="Document Structure (For testing section templates)"/> + <status value="active"/> + <experimental value="false"/> + <date value="2018-11-05T17:47:00+11:00"/> + <kind value="complex-type"/> + <abstract value="false"/> + <type value="Composition"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Composition"/> + <derivation value="constraint"/> + <differential> + <element> + <!-- this is present to work around a bug in the snapshot generator --> + <path value="Composition"/> + </element> + <element> + <!-- set up slicing on Composition.section - by the code --> + <path value="Composition.section"/> + <slicing> + <discriminator> + <type value="pattern"/> + <path value="code"/> + </discriminator> + <description value="Slice by .section.code"/> + <ordered value="true"/> + <rules value="closed"/> + </slicing> + </element> + <element> + <!-- first slice --> + <path value="Composition.section"/> + <sliceName value="code-A"/> + <min value="1"/> + <type> + <code value="BackboneElement"/> + <profile value="http://hl7.org/fhir/test/StructureDefinition/document-section-library"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"> + <valueString value="Composition.section:codeA"/> + </extension> + </profile> + </type> + </element> + <element> + <!-- first slice --> + <path value="Composition.section"/> + <sliceName value="code-B"/> + <min value="1"/> + <type> + <code value="BackboneElement"/> + <profile value="http://hl7.org/fhir/test/StructureDefinition/document-section-library"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"> + <valueString value="Composition.section:codeB"/> + </extension> + </profile> + </type> + </element> + <element> + <!-- first slice --> + <path value="Composition.section"/> + <sliceName value="code-C"/> + <min value="0"/> + <type> + <code value="BackboneElement"/> + <profile value="http://hl7.org/fhir/test/StructureDefinition/document-section-library"> + <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element"> + <valueString value="Composition.section:codeC"/> + </extension> + </profile> + </type> + </element> + </differential> +</StructureDefinition> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/entry-resource-bad1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/entry-resource-bad1.xml new file mode 100644 index 000000000..925d59da0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/entry-resource-bad1.xml @@ -0,0 +1,12 @@ +<Bundle xmlns="http://hl7.org/fhir"> + <id value="bundle"/> + <type value="collection"/> + <entry> + <fullUrl value="http://acme.com/Patient/pat1"/> + <resource> + <Patient> + <id value="pat2"/> + </Patient> + </resource> + </entry> +</Bundle> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.json new file mode 100644 index 000000000..5332871a4 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.json @@ -0,0 +1,14 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true, + "characteristic": [ + { + "code": { + "text": "test" + }, + "value": true, + "exclude": false + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.ttl new file mode 100644 index 000000000..832a0e545 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.ttl @@ -0,0 +1,21 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]; + fhir:Group.characteristic [ + fhir:index 0; + fhir:Group.characteristic.code [ + fhir:CodeableConcept.text [ fhir:value "test" ] + ]; + fhir:Group.characteristic.exclude [ fhir:value "false"^^xsd:boolean ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.xml new file mode 100644 index 000000000..cd59c7eeb --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad1.xml @@ -0,0 +1,11 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> + <characteristic> + <code> + <text value="test"/> + </code> + <value value="true"/> + <exclude value="false"/> + </characteristic> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.json new file mode 100644 index 000000000..a6f7c1f7d --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.json @@ -0,0 +1,14 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true, + "characteristic": [ + { + "code": { + "text": "test" + }, + "valueInteger": 1, + "exclude": false + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.ttl new file mode 100644 index 000000000..832a0e545 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.ttl @@ -0,0 +1,21 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]; + fhir:Group.characteristic [ + fhir:index 0; + fhir:Group.characteristic.code [ + fhir:CodeableConcept.text [ fhir:value "test" ] + ]; + fhir:Group.characteristic.exclude [ fhir:value "false"^^xsd:boolean ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.xml new file mode 100644 index 000000000..00c997a01 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad2.xml @@ -0,0 +1,11 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> + <characteristic> + <code> + <text value="test"/> + </code> + <valueInteger value="1"/> + <exclude value="false"/> + </characteristic> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.json new file mode 100644 index 000000000..2d555e08c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.json @@ -0,0 +1,14 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true, + "characteristic": [ + { + "code": { + "text": "test" + }, + "valueBoolean": 1, + "exclude": false + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.ttl new file mode 100644 index 000000000..fd7594fcc --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.ttl @@ -0,0 +1,22 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]; + fhir:Group.characteristic [ + fhir:index 0; + fhir:Group.characteristic.code [ + fhir:CodeableConcept.text [ fhir:value "test" ] + ]; + fhir:Group.characteristic.valueBoolean [ fhir:value "1"^^xsd:boolean ]; + fhir:Group.characteristic.exclude [ fhir:value "false"^^xsd:boolean ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.xml new file mode 100644 index 000000000..7382ea0f6 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-bad3.xml @@ -0,0 +1,11 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> + <characteristic> + <code> + <text value="test"/> + </code> + <valueBoolean value="1"/> + <exclude value="false"/> + </characteristic> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.json new file mode 100644 index 000000000..fa4e1e023 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.json @@ -0,0 +1,12 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true, + "characteristic": [ + { + "code": {} + "valueBoolean": true, + "exclude": false + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.ttl new file mode 100644 index 000000000..a632d1ada --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.ttl @@ -0,0 +1,20 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]; + fhir:Group.characteristic [ + fhir:index 0; + fhir:Group.characteristic.code [ ]; + fhir:Group.characteristic.valueBoolean [ fhir:value "true"^^xsd:boolean ]; + fhir:Group.characteristic.exclude [ fhir:value "false"^^xsd:boolean ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.xml new file mode 100644 index 000000000..af528f189 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-empty.xml @@ -0,0 +1,10 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> + <characteristic> + <code> + </code> + <valueBoolean value="true"/> + <exclude value="false"/> + </characteristic> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.json new file mode 100644 index 000000000..2e8fd10a6 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.json @@ -0,0 +1,14 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true, + "characteristic": [ + { + "code": { + "text": "test" + }, + "valueBoolean": true, + "exclude": false + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.ttl new file mode 100644 index 000000000..ac0134893 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.ttl @@ -0,0 +1,22 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]; + fhir:Group.characteristic [ + fhir:index 0; + fhir:Group.characteristic.code [ + fhir:CodeableConcept.text [ fhir:value "test" ] + ]; + fhir:Group.characteristic.valueBoolean [ fhir:value "true"^^xsd:boolean ]; + fhir:Group.characteristic.exclude [ fhir:value "false"^^xsd:boolean ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.xml new file mode 100644 index 000000000..7d31e2050 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-choice-good.xml @@ -0,0 +1,11 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> + <characteristic> + <code> + <text value="test"/> + </code> + <valueBoolean value="true"/> + <exclude value="false"/> + </characteristic> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.json new file mode 100644 index 000000000..42752f1ef --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.json @@ -0,0 +1 @@ +{"resourceType":"Group","type":"person","actual":true} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.ttl new file mode 100644 index 000000000..fbf5cea30 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal-tiny.ttl @@ -0,0 +1,14 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.json new file mode 100644 index 000000000..448d1c993 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.json @@ -0,0 +1,5 @@ +{ + "resourceType": "Group", + "type": "person", + "actual": true +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.ttl new file mode 100644 index 000000000..fbf5cea30 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.ttl @@ -0,0 +1,14 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:Group; + fhir:nodeRole fhir:treeRoot; + fhir:Group.type [ fhir:value "person"]; + fhir:Group.actual [ fhir:value "true"^^xsd:boolean]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.xml new file mode 100644 index 000000000..b745e91a7 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/group-minimal.xml @@ -0,0 +1,4 @@ +<Group xmlns="http://hl7.org/fhir"> + <type value="person"/> + <actual value="true"/> +</Group> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.json new file mode 100644 index 000000000..5692bfbf3 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.json @@ -0,0 +1,14 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1" + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.xml new file mode 100644 index 000000000..8eb629a63 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-bad-syntax.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.json new file mode 100644 index 000000000..3ddbc4d3d --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.json @@ -0,0 +1,15 @@ +{ + "resourceType": "List", + "id": "val1", + "contained": [ + { + "resourceType": "Patient", + "id" : "pat2" + } + ], + "status": "current", + "mode": "changes", + "subject": { + "reference": "#pat" + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.ttl new file mode 100644 index 000000000..36c4bea9c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.ttl @@ -0,0 +1,23 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:Resource.contained [ + a fhir:Patient; + fhir:index 0; + fhir:Resource.id [ fhir:value "pat2" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]; + fhir:List.subject [ + fhir:Reference.reference [ fhir:value "#pat" ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.xml new file mode 100644 index 000000000..d733d2ff1 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained-bad.xml @@ -0,0 +1,14 @@ +<List xmlns="http://hl7.org/fhir"> + <id value="val1"/> + <contained> + <Patient> + <id value="pat1"/> + </Patient> + </contained> + <status value="current"/> + <mode value="changes"/> + <subject> + <reference value="#pat"/> + </subject> +</List> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.json new file mode 100644 index 000000000..2d25c092a --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.json @@ -0,0 +1,15 @@ +{ + "resourceType": "List", + "id": "val1", + "contained": [ + { + "resourceType": "Patient", + "id" : "pat" + } + ], + "status": "current", + "mode": "changes", + "subject": { + "reference": "#pat" + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.ttl new file mode 100644 index 000000000..1622d745d --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.ttl @@ -0,0 +1,23 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:Resource.contained [ + a fhir:Patient; + fhir:index 0; + fhir:Resource.id [ fhir:value "pat" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]; + fhir:List.subject [ + fhir:Reference.reference [ fhir:value "#pat" ] + ]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.xml new file mode 100644 index 000000000..a35b2afb0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-contained.xml @@ -0,0 +1,14 @@ +<List xmlns="http://hl7.org/fhir"> + <id value="val1"/> + <contained> + <Patient> + <id value="pat"/> + </Patient> + </contained> + <status value="current"/> + <mode value="changes"/> + <subject> + <reference value="#pat"/> + </subject> +</List> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.json new file mode 100644 index 000000000..38fce3a39 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.json @@ -0,0 +1,9 @@ +{ + "resourceType": "List", + "id": "val1", + "status": "current", + "mode": "changes", + "entry": [ + {} + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.ttl new file mode 100644 index 000000000..c9ef18050 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.ttl @@ -0,0 +1,16 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]; + fhir:List.entry [ fhir:index 0]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.xml new file mode 100644 index 000000000..9b0658c88 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty1.xml @@ -0,0 +1,9 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current"/> + <mode value="changes"/> + <entry/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.json new file mode 100644 index 000000000..2aebfe4b4 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.json @@ -0,0 +1,8 @@ +{ + "resourceType": "List", + "id": "val1", + "status": "current", + "mode": "changes", + "entry": [ + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.xml new file mode 100644 index 000000000..85404fac5 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-empty2.xml @@ -0,0 +1,11 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current"/> + <mode value="changes"/> + <entry> + <!-- a comment --> + </entry> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.ttl new file mode 100644 index 000000000..34dfa20cb --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.ttl @@ -0,0 +1,22 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ + fhir:value "current"; + fhir:string.extension [ + fhir:index 0; + fhir:Extension.url [ fhir:value "http://acme.com/some_url" ]; + fhir:Extension.valueCode [ fhir:value "code" ] + ] + ]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.xml new file mode 100644 index 000000000..657665dc7 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension.xml @@ -0,0 +1,12 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current"> + <extension url="http://acme.com/some_url"> + <valueCode value="code"/> + </extension> + </status> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.json new file mode 100644 index 000000000..c42b37db3 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.json @@ -0,0 +1,22 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "status": "current", + "_status": { + "extension": [ + { + "url": "http://acme.com/some_url", + "valueCode": "code" + } + ] + }, + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.ttl new file mode 100644 index 000000000..34dfa20cb --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension1.ttl @@ -0,0 +1,22 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ + fhir:value "current"; + fhir:string.extension [ + fhir:index 0; + fhir:Extension.url [ fhir:value "http://acme.com/some_url" ]; + fhir:Extension.valueCode [ fhir:value "code" ] + ] + ]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.json new file mode 100644 index 000000000..404eb6276 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.json @@ -0,0 +1,22 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "status": "current", + "_status": { + "extension": [ + { + "url": "http://acme.com/some_url", + "valueCodeX": "code" + } + ] + }, + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.ttl new file mode 100644 index 000000000..1869f33d5 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-extension2.ttl @@ -0,0 +1,21 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ + fhir:value "current"; + fhir:string.extension [ + fhir:index 0; + fhir:Extension.url [ fhir:value "http://acme.com/some_url" ] + ] + ]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.json new file mode 100644 index 000000000..8c943ea6e --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.json @@ -0,0 +1,14 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.xml new file mode 100644 index 000000000..9fa69a83b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-minimal.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.xml new file mode 100644 index 000000000..ad522e31c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-text.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1">some text</id> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.xml new file mode 100644 index 000000000..5ec843bfc --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-attr.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1" other="nothing"/> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.xml new file mode 100644 index 000000000..d80b17a11 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-element.xml @@ -0,0 +1,9 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current"/> + <mode value="changes"/> + <mode1 value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.json new file mode 100644 index 000000000..970d7ba36 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.json @@ -0,0 +1,15 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "other" : "nothing", + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-unknown-prop.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.json new file mode 100644 index 000000000..ef96117fc --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.json @@ -0,0 +1,6 @@ +{ + "resourceType": "List", + "id": "val1", + "status": "current1", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.ttl new file mode 100644 index 000000000..cc0c78f73 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current1"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.xml new file mode 100644 index 000000000..1a3cb1d26 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-code.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <status value="current1"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns.xml new file mode 100644 index 000000000..a61535801 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir1"> + <!-- another comment --> + <id value="val1"/> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.xml new file mode 100644 index 000000000..86d4a2939 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns1.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id xmlns="http://hl7.org/fhir1" value="val1"/> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.xml new file mode 100644 index 000000000..4bec98842 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-ns2.xml @@ -0,0 +1,8 @@ +<!-- this is all valid --> +<f:List xmlns:f="http://hl7.org/fhir"> + <!-- another comment --> + <f1:id xmlns:f1="http://hl7.org/fhir1" value="val1"/> + <f:status value="current"/> + <f:mode value="changes"/> +</f:List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.json new file mode 100644 index 000000000..0ac164579 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.json @@ -0,0 +1,6 @@ +{ + "resourceType": "List", + "id": "val1", + "mode": "changes", + "status": "current" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.ttl new file mode 100644 index 000000000..01590ad8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.ttl @@ -0,0 +1,15 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.xml new file mode 100644 index 000000000..29205d09a --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-wrong-order.xml @@ -0,0 +1,5 @@ +<List xmlns="http://hl7.org/fhir"> + <id value="val1"/> + <mode value="changes"/> + <status value="current"/> +</List> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.json new file mode 100644 index 000000000..192c05058 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p onClick=\"check\">This is some narrative</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.xml new file mode 100644 index 000000000..e09565bc1 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-attribute.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p onClick="check">This is some narrative</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.json new file mode 100644 index 000000000..bd766e33f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p>This is some narrative</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.xml new file mode 100644 index 000000000..5af318874 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct1.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>This is some narrative</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.json new file mode 100644 index 000000000..8fb0ec4b3 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<n:div xmlns:n=\"http://www.w3.org/1999/xhtml\">\n <n:p>This is some narrative</n:p>\n </n:div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.xml new file mode 100644 index 000000000..0bc588cef --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-correct2.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <n:div xmlns:n="http://www.w3.org/1999/xhtml"> + <n:p>This is some narrative</n:p> + </n:div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.json new file mode 100644 index 000000000..fcde0bad8 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <object value=\"false\"/> <p>This is some narrative</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.xml new file mode 100644 index 000000000..0e14a25ba --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-element.xml @@ -0,0 +1,15 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>This is some narrative</p> + <object value="false"/> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.json new file mode 100644 index 000000000..98d9c974c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p>This is some narrative</pa>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-syntax.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.json new file mode 100644 index 000000000..6f2ad20b6 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtmlx\">\n <p>This is some narrative</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.xml new file mode 100644 index 000000000..bcd7f0166 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns1.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtmlx"> + <p>This is some narrative</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.json new file mode 100644 index 000000000..a600f5998 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.json @@ -0,0 +1,18 @@ +{ + "resourceType": "List", + "fhir_comments": [ + " this is all valid " + ], + "id": "val1", + "_id": { + "fhir_comments": [ + " another comment " + ] + }, + "text": { + "status": "generated", + "div": "<div>\n <p>This is some narrative</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.xml new file mode 100644 index 000000000..326145565 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns2.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <n:p xmlns:n="http://www.w3.org/1999/xhtmlx">This is some narrative</n:p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.xml new file mode 100644 index 000000000..6fbb32254 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-wrongns3.xml @@ -0,0 +1,14 @@ +<!-- this is all valid --> +<List xmlns="http://hl7.org/fhir"> + <!-- another comment --> + <id value="val1"/> + <text> + <status value="generated"/> + <div> + <p>This is some narrative</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> +<!-- ending comment --> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.json new file mode 100644 index 000000000..ee0466fbe --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.json @@ -0,0 +1,10 @@ +{ + "resourceType": "List", + "id": "val1", + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <!DOCTYPE foo [ <!ENTITY xxe SYSTEM \"file://c:\\temp\\xxe.txt\">]>\n <p>This is some narrative &xxe;</p>\n </div>" + }, + "status": "current", + "mode": "changes" +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.ttl b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.ttl new file mode 100644 index 000000000..702324d92 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe.ttl @@ -0,0 +1,18 @@ +@prefix fhir: <http://hl7.org/fhir/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xs: <http://www.w3.org/2001/XMLSchema#> . + +# - resource ------------------------------------------------------------------- + +[a fhir:List; + fhir:nodeRole fhir:treeRoot; + fhir:Resource.id [ fhir:value "val1"]; + fhir:DomainResource.text [ + fhir:Narrative.status [ fhir:value "generated" ] + ]; + fhir:List.status [ fhir:value "current"]; + fhir:List.mode [ fhir:value "changes"]]. + +# ------------------------------------------------------------------------------------- + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe1.xml new file mode 100644 index 000000000..1c3ba903e --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe1.xml @@ -0,0 +1,14 @@ +<!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file://c:\temp\xxe.txt">]> + +<List xmlns="http://hl7.org/fhir"> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>This is some narrative with an entity &xxe;</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe2.xml new file mode 100644 index 000000000..5277d4e82 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/list-xhtml-xxe2.xml @@ -0,0 +1,13 @@ +<List xmlns="http://hl7.org/fhir"> + <id value="val1"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file://c:\temp\xxe.txt">]> + <p>This is some narrative with an entity &xxe;</p> + </div> + </text> + <status value="current"/> + <mode value="changes"/> +</List> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/manifest.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/manifest.json new file mode 100644 index 000000000..4ef7d7f29 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/manifest.json @@ -0,0 +1,427 @@ +{ + "validator-tests": { + "Json": { + "bundle-good.json": { + "errorCount": 0 + }, + "bundle-bad-empty.json": { + "errorCount": 2 + }, + "group-choice-bad1.json": { + "errorCount": 2, + "errors": ["/Group/characteristic (line 10, col21) Unrecognised property '@value' ", + "Group.characteristic (line 6, col6) Element 'Group.characteristic.value[x]': minimum required = 1, but only found 0"] + }, + "group-choice-bad2.json": { + "errorCount": 2, + "errors": ["/Group/characteristic (line 10, col25) Unrecognised property '@valueInteger' ", + "Group.characteristic (line 6, col6) Element 'Group.characteristic.value[x]': minimum required = 1, but only found 0 "] + }, + "group-choice-bad3.json": { + "errorCount": 2, + "errors": ["/Group/characteristic/value[x] (line 10, col25) Error parsing JSON: the primitive value must be a boolean ", + "Group.characteristic.valueBoolean (line 10, col25) boolean values must be 'true' or 'false' "] + }, + "group-choice-empty.json": { + "errorCount": 1, + "errors": ["(document) Error parsing JSON: Error parsing JSON source: Unexpected JSON syntax at Line 8 (path=[//characteristic[]/characteristicvalueBoolean]) "] + }, + "group-choice-good.json": { + "errorCount": 0 + }, + "group-minimal-tiny.json": { + "errorCount": 0 + }, + "group-minimal.json": { + "errorCount": 0 + }, + "list-bad-syntax.json": { + "errorCount": 1, + "errors": ["(document) Error parsing JSON: Error parsing JSON source: Unexpected JSON syntax at Line 7 (path=[/_id]) "] + }, + "list-contained-bad.json": { + "errorCount": 3, + "errors": [ + "List: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource [contained.where(('#'+id in %resource.descendants().reference).not()).empty()]", + "List.subject: Unable to resolve resource '#pat'", + "List.subject SHALL have a local reference if the resource is provided inline ( (url: [pat]; ids: [org.hl7.fhir.dstu3.metamodel.Element@2b71e916])) [reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))] " + ] + }, + "list-contained.json": { + "errorCount": 0 + }, + "list-empty1.json": { + "errorCount": 2, + "errors": ["/List/entry (line 7, col6) Object must have some content ", + "List.entry (line 7, col6) Element 'List.entry.item': minimum required = 1, but only found 0 "] + }, + "list-empty2.json": { + "errorCount": 0 + }, + "list-extension1.json": { + "errorCount": 0 + }, + "list-extension2.json": { + "errorCount": 2, + "errors": ["/List/status/extension (line 18, col8) Unrecognised property '@valueCodeX' ", "List.status.extension (line 15, col8) Must have either extensions or value[x], not both [extension.exists() != value.exists()]"] + }, + "list-minimal.json": { + "errorCount": 0 + }, + "list-unknown-prop.json": { + "errorCount": 1, + "errors": ["/List (line 12, col23) Unrecognised property '@other' "] + }, + "list-wrong-code.json": { + "errorCount": 1, + "errors": ["List.status (line 4, col24) The value provided ('current1') is not in the value set http://hl7.org/fhir/ValueSet/list-status (http://hl7.org/fhir/ValueSet/list-status, and a code is required from this value set "] + }, + "list-wrong-order.json": { + "errorCount": 0 + }, + "list-xhtml-attribute.json": { + "errorCount": 1, + "errors": ["List.text.div (line 15, col4) Illegal attribute name in the XHTML ('onClick' on 'p') "] + }, + "list-xhtml-correct1.json": { + "errorCount": 0 + }, + "list-xhtml-correct2.json": { + "errorCount": 0 + }, + "primitive-good-ws.json": { + "errorCount": 0, + "warningCount": 1 + }, + "list-xhtml-element.json": { + "errorCount": 2, + "errors": ["List.text.div (line 15, col4) Illegal element name in the XHTML ('object') ", + "List.text.div (line 15, col4) Illegal attribute name in the XHTML ('value' on 'object') "] + }, + "list-xhtml-syntax.json": { + "errorCount": 1, + "errors": ["/List/text/div (line 15, col4) Error parsing XHTML: Malformed XHTML: Found \"</pa>\" expecting \"</p>\" at line 2 column 37 "] + }, + "list-xhtml-wrongns1.json": { + "errorCount": 1, + "errors": ["List.text.div (line 15, col4) Wrong namespace on the XHTML ('http://www.w3.org/1999/xhtmlx') "] + }, + "list-xhtml-wrongns2.json": { + "errorCount": 1, + "errors": ["List.text.div (line 15, col4) Wrong namespace on the XHTML ('null') "] + }, + "list-xhtml-xxe.json": { + "errorCount": 1, + "errors": ["/List/text/div (line 7, col4) Error parsing XHTML: Malformed XHTML: Found a DocType declaration, and these are not allowed (XXE security vulnerability protection) "] + }, + "synthea.json": { + "errorCount": 2 + }, + "patient-good.json" : { + "errorCount": 0, + "warningCount": 0 + }, + "patient-lang1.json" : { + "errorCount": 0, + "warningCount": 1 + }, + "patient-lang2.json" : { + "errorCount": 0, + "warningCount": 0 + }, + "patient-lang3.json" : { + "errorCount": 0, + "warningCount": 1 + } + }, + "Xml": { + "bundle-good.xml": { + "errorCount": 0 + }, + "primitive-good.xml" : { + "errorCount": 0 + }, + "primitive-bad.xml" : { + "errorCount": 49 + }, + "primitive-bad-empty.xml" : { + "errorCount": 3 + }, + "group-choice-bad1.xml": { + "errorCount": 2, + "errors": ["Undefined element \'value\"", + "Element \'Group.characteristic.value[x]\': minimum required = 1, but only found 0"] + }, + "group-choice-bad3.xml": { + "errorCount": 1, + "errors": ["boolean values must be \'true\' or \'false\'"] + }, + "group-choice-empty.xml": { + "errorCount": 1, + "errors": ["Element must have some content"] + }, + "group-choice-good.xml": { + "errorCount": 0 + }, + "group-minimal.xml": { + "errorCount": 0 + }, + "list-bad-syntax.xml": { + "errorCount": 1, + "errors": ["org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 3; The element type \"id\" must be terminated by the matching end-tag \"</id>\"."] + }, + "list-contained-bad.xml": { + "errorCount": 3, + "errors": [ + "List: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource [contained.where(('#'+id in %resource.descendants().reference).not()).empty()]", + "List.subject: Unable to resolve resource '#pat'", + "List.subject SHALL have a local reference if the resource is provided inline ( (url: [pat]; ids: [org.hl7.fhir.dstu3.metamodel.Element@2b71e916])) [reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))] " + ] + }, + "list-contained.xml": { + "errorCount": 0 + }, + "list-empty1.xml": { + "errorCount": 2, + "errors": ["Element must have some content", + "Element \'List.entry.item\': minimum required = 1, but only found 0"] + }, + "list-empty2.xml": { + "errorCount": 2, + "errors": ["Element must have some content", + "Element \'List.entry.item\': minimum required = 1, but only found 0"] + }, + "list-extension.xml": { + "errorCount": 0 + }, + "list-minimal.xml": { + "errorCount": 0 + }, + "list-text.xml": { + "errorCount": 1, + "errors": ["Text should not be present"] + }, + "list-unknown-attr.xml": { + "errorCount": 1, + "errors": ["Undefined attribute \'@other\'"] + }, + "list-unknown-element.xml": { + "errorCount": 1, + "errors": ["Undefined element \'mode1\""] + }, + "list-wrong-code.xml": { + "errorCount": 1, + "errors": ["The value provided (\'current1\') is not in the value set http://hl7.org/fhir/ValueSet/list-status (http://hl7.org/fhir/ValueSet/list-status, and a code is required from this value set"] + }, + "list-wrong-ns.xml": { + "errorCount": 1, + "errors": ["This does not appear to be a FHIR resource (unknown namespace/name \'http://hl7.org/fhir1::List\')"] + }, + "list-wrong-ns1.xml": { + "errorCount": 1, + "errors": ["Wrong namespace - expected \'http://hl7.org/fhir\'"] + }, + "list-wrong-ns2.xml": { + "errorCount": 1, + "errors": ["Wrong namespace - expected \'http://hl7.org/fhir\'"] + }, + "list-wrong-order.xml": { + "errorCount": 1, + "errors": ["Element \"status\" is out of order"] + }, + "list-xhtml-attribute.xml": { + "errorCount": 1, + "errors": ["Illegal attribute name in the XHTML (\'onClick\' on \'p\')"] + }, + "list-xhtml-correct1.xml": { + "errorCount": 0 + }, + "list-xhtml-correct2.xml": { + "errorCount": 0 + }, + "list-xhtml-element.xml": { + "errorCount": 2, + "errors": ["Illegal element name in the XHTML (\'object\')", + "Illegal attribute name in the XHTML (\'value\' on \'object\')"] + }, + "list-xhtml-wrongns1.xml": { + "errorCount": 1, + "errors": ["Wrong namespace on the XHTML (\'http://www.w3.org/1999/xhtmlx\')"] + }, + "list-xhtml-wrongns2.xml": { + "errorCount": 1, + "errors": ["Wrong namespace on the XHTML (\'http://www.w3.org/1999/xhtmlx\')"] + }, + "list-xhtml-wrongns3.xml": { + "errorCount": 1, + "errors": ["Wrong namespace on the XHTML (\'http://hl7.org/fhir\')"] + }, + "list-xhtml-xxe1.xml": { + "errorCount": 1, + "errors": ["org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature \"http://apache.org/xml/features/disallow-doctype-decl\" set to true."] + }, + "list-xhtml-xxe2.xml": { + "errorCount": 1, + "errors": ["Error reported by XML parser processing null: Scanner State 24 not Recognized "] + }, + "slice-by-polymorphic-type.xml": { + "errorCount": 0, + "profile" : { + "source" : "slice-by-polymorphic-type-profile.xml", + "errorCount": 0 + } + }, + "code-correct.xml" : { + "tx-dependent" : true, + "errorCount": 0 + }, + "code-wrong-display.xml" : { + "tx-dependent" : true, + "errorCount": 0, + "warningCount" : 1 + }, + "code-wrong-system.xml" : { + "tx-dependent" : true, + "errorCount": 1 + }, + "code-wrong-system-vs.xml" : { + "tx-dependent" : true, + "errorCount": 1 + }, + "ccda-example.xml" : { + "use-test" : true, + "allowed-extension-domain" : "http://hl7.org/fhir/ccda/StructureDefinition/", + "errorCount": 0, + "profile" : { + "source" : "ccda-profile.xml", + "errorCount": 0 + } + }, + "ccda-example-bad.xml" : { + "use-test" : true, + "allowed-extension-domain" : "http://hl7.org/fhir/ccda/StructureDefinition/", + "errorCount": 0, + "profile" : { + "source" : "ccda-profile.xml", + "errorCount": 1 + } + }, + "string-extensions-and-constraints-example.xml" : { + "use-test" : true, + "allowed-extension-domain" : "http://hl7.org/fhir/ccda/StructureDefinition/", + "errorCount": 0, + "profile" : { + "source" : "string-extensions-and-constraints-profile.xml", + "errorCount": 4 + } + }, + "slicing-types-by-string.xml" : { + "errorCount": 0, + "profile" : { + "source" : "slicing-types-by-string-profile.xml", + "errorCount": 0 + } + }, + "uk-nhs-pat.xml" : { + "version" : "1.0.2", + "use-test" : false, + "allowed-extension-domain" : "http://hl7.org/fhir/ccda/StructureDefinition/", + "errorCount": 0, + "profile" : { + "source" : "uk-nhs-sd-pat.xml", + "errorCount": 1 + } + }, + "entry-resource-bad1.xml" : { + "errorCount": 0, + "x-errors": ["Resource ID does not match the ID in the entry full URL"] + }, + "reference-good.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 0 + }, + "reference-bad.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 1 + }, + "reference-good-contained.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 0 + }, + "reference-good-typed.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 0 + }, + "reference-good-logical.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 0 + }, + "reference-bad-logical.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 1 + }, + "reference-bad-typed.xml" : { + "validate" : "CHECK_EXISTS_AND_TYPE", + "errorCount": 1 + }, + "primitive-good-ws.xml" : { + "errorCount": 0, + "warningCount": 1 + }, + "qr.xml" : { + "questionnaire" : "q.xml", + "errorCount": 2 + }, + "patient-good.xml" : { + "errorCount": 0, + "warningCount": 0 + }, + "patient-lang1.xml" : { + "errorCount": 0, + "warningCount": 1 + }, + "patient-lang2.xml" : { + "errorCount": 0, + "warningCount": 0 + }, + "patient-lang3.xml" : { + "errorCount": 0, + "warningCount": 1 + }, + "document-good.xml" : { + "errorCount": 0, + "profiles" : ["document-section-library.xml"], + "profile" : { + "source" : "document-structure.xml", + "errorCount": 0 + } + }, + "document-bad-no-sections.xml" : { + "errorCount": 0, + "profiles" : ["document-section-library.xml"], + "profile" : { + "source" : "document-structure.xml", + "errorCount": 2 + } + }, + "document-bad-bad-sections.xml" : { + "errorCount": 0, + "profiles" : ["document-section-library.xml"], + "profile" : { + "source" : "document-structure.xml", + "errorCount": 3 + } + }, + "message-infinite-loop.xml" : { + "errorCount": 33 + }, + "slice-profile-and-local-patient.xml" : { + "errorCount": 0, + "profile" : { + "source" : "slice-profile-and-local-profile.xml", + "errorCount": 0 + } + } + } + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/message-infinite-loop.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/message-infinite-loop.xml new file mode 100644 index 000000000..0c7c7e0c0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/message-infinite-loop.xml @@ -0,0 +1,489 @@ +<Bundle xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <id value="d3e5cc68-9d33-4b77-98b7-fa48da8b0f06"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/ITK-Message-Bundle-1"/> + </meta> + <identifier> + <value value="504bff5b-f048-4add-8e42-09b6150c5106"/> + </identifier> + <type value="message"/> + <entry> + <fullUrl value="urn:uuid:ed5909a3-b7fe-417e-ab34-fb674844c9a0"/> + <resource> + <MessageHeader> + <id value="ed5909a3-b7fe-417e-ab34-fb674844c9a0"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/ITK-MessageHeader-2"/> + </meta> + <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ITK-MessageHandling-2"> + <extension url="BusAckRequested"> + <valueBoolean value="false"/> + </extension> + <extension url="InfAckRequested"> + <valueBoolean value="true"/> + </extension> + <extension url="RecipientType"> + <valueCoding> + <system value="https://fhir.nhs.uk/STU3/CodeSystem/ITK-RecipientType-1"/> + <code value="FA"/> + <display value="For Action"/> + </valueCoding> + </extension> + <extension url="MessageDefinition"> + <valueReference> + <reference value="https://fhir.nhs.uk/STU3/MessageDefinition/ITK-eDischarge-MessageDefinition-Instance-1"/> + </valueReference> + </extension> + <extension url="SenderReference"> + <valueString value="NULL"/> + </extension> + <extension url="LocalExtension"> + <valueString value="NULL"/> + </extension> + </extension> + <event> + <system value="https://fhir.nhs.uk/STU3/CodeSystem/ITK-MessageEvent-2"/> + <code value="ITK003D"/> + <display value="ITK eDischarge"/> + </event> + <receiver> + <reference value="urn:uuid:81ec3a28-a34a-400d-acf1-6d57832633ca"/> + </receiver> + <sender> + <reference value="urn:uuid:90ea7469-5e8c-4a45-8de0-e9866c2f6848"/> + </sender> + <timestamp value="2018-12-11T09:41:16-00:00"/> + <source> + <endpoint value="NOWOT004"/> + </source> + <focus> + <reference value="urn:uuid:5152d044-f569-4ab4-bff8-bb69f55fea98"/> + </focus> + </MessageHeader> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:90ea7469-5e8c-4a45-8de0-e9866c2f6848"/> + <resource> + <Practitioner> + <id value="90ea7469-5e8c-4a45-8de0-e9866c2f6848"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Header-Practitioner-1"/> + </meta> + <identifier> + <system value="https://fhir.nhs.uk/Id/sds-user-id"/> + <value value="033345750510"/> + </identifier> + <name> + <family value="Bibi"/> + <given value="Sugra"/> + <prefix value="Ms"/> + </name> + </Practitioner> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:81ec3a28-a34a-400d-acf1-6d57832633ca"/> + <resource> + <Organization> + <id value="81ec3a28-a34a-400d-acf1-6d57832633ca"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Header-Organization-1"/> + </meta> + <identifier> + <system value="https://fhir.nhs.uk/Id/ods-organization-code"/> + <value value="A111111"/> + </identifier> + </Organization> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:5152d044-f569-4ab4-bff8-bb69f55fea98"/> + <resource> + <Bundle> + <id value="5152d044-f569-4ab4-bff8-bb69f55fea98"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/ITK-Document-Bundle-1"/> + </meta> + <identifier> + <system value="https://tools.ietf.org/html/rfc4122"/> + <value value="48aefa89-2b26-4dcb-9346-9ae8c0a354c9"/> + </identifier> + <type value="document"/> + <entry> + <fullUrl value="urn:uuid:2178176b-99c7-4b09-9628-099dbccc9886"/> + <resource> + <Composition> + <id value="2178176b-99c7-4b09-9628-099dbccc9886"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-OPL-Composition-1"/> + </meta> + <!-- Extension to carry details of the Correspondence Care Setting Type. --> + <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareSettingType-1"> + <coding> + <system value="http://snomed.info/sct" /> + <code value="310160007" /> + <display value="Ophthalmology service" /> + </coding> + </extension> + <identifier> + <system value="https://tools.ietf.org/html/rfc4122"/> + <value value="020ba2cc-396b-4a09-b559-52ff84b019ab"/> + </identifier> + <status value="final"/> + <type> + <!--Outpatient letter --> + <coding> + <system value="http://snomed.info/sct"/> + <code value="823681000000100"/> + <display value="Outpatient letter"/> + </coding> + </type> + <subject> + <reference value="urn:uuid:9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + </subject> + <!--Reference to the clinical encounter or type of care this documentation is associated with.--> + <encounter> + <reference value="urn:uuid:a7f1f367-144b-4bf3-8c65-a0826787986b"/> + </encounter> + <!--The composition editing time, when the composition was last logically changed by the author.--> + <date value="2018-01-23T14:34:00-00:00"/> + <!--Identifies who is responsible for the information in the composition, not necessarily who typed it in--> + <author> + <reference value="urn:uuid:b8fe561b-6b36-46f5-b6bb-433529955b8c"/> + </author> + <title value="Outpatient letter"/> + <!--Identifies the organization responsible for ongoing maintenance of and access to the composition/document information.--> + <custodian> + <reference value="urn:uuid:97775e71-21d7-4f2d-aadb-2f3f5a1da6a6"/> + </custodian> + <section> + <title value="Allergies and adverse reactions"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="886921000000105"/> + <display value="Allergies and adverse reactions"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Allergies and adverse reactions Text</p> + </div> + </text> + </section> + <section> + <title value="Attendance details"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="1077881000000105"/> + <display value="Attendance details"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Attendance details Text-</p> + </div> + </text> + <entry> + <reference value="urn:uuid:a7f1f367-144b-4bf3-8c65-a0826787986b"/> + </entry> + </section> + <section> + <title value="Clinical summary"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="887181000000106"/> + <display value="Clinical summary"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Clinical summary Text</p> + </div> + </text> + </section> + <section> + <title value="Diagnoses"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="887161000000102"/> + <display value="Diagnoses"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Diagnoses Text</p> + </div> + </text> + </section> + <section> + <title value="Referrer details"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="1052891000000108"/> + <display value="Referrer details"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Referrer details Text</p> + </div> + </text> + </section> + <section> + <title value="Examination finding"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="715851000000102"/> + <display value="Examination findings"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Examination findings Text</p> + </div> + </text> + </section> + <section> + <title value="History"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="717121000000105"/> + <display value="History"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>History Text</p> + </div> + </text> + </section> + <section> + <title value="Medications and medical devices"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="933361000000108"/> + <display value="Medications and medical devices"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Medications and medical devices Text</p> + </div> + </text> + <entry> + <reference value="urn:uuid:16bbba8a-ba9b-46ea-b571-a64dba136a2a"/> + </entry> + </section> + <section> + <title value="Procedures"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="887171000000109"/> + <display value="Procedures"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Procedures Text</p> + </div> + </text> + </section> + <section> + <title value="Plan and requested actions"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="887201000000105"/> + <display value="Plan and requested actions"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Plan and requested actions Text</p> + </div> + </text> + </section> + <section> + <title value="Information and advice given"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="1052951000000105"/> + <display value="Information and advice given"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Information and advice given Text</p> + </div> + </text> + </section> + <section> + <title value="Patient demographics"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="886731000000109"/> + <display value="Patient demographics"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Patient demographics Text</p> + </div> + </text> + <entry> + <reference value="urn:uuid:9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + </entry> + </section> + <section> + <title value="Person completing record"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="887231000000104"/> + <display value="Person completing record"/> + </coding> + </code> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + <p>Person completing record Text</p> + </div> + </text> + </section> + </Composition> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:75624dcb-fdae-4129-adec-953644046c54"/> + <resource> + <AllergyIntolerance> + <id value="75624dcb-fdae-4129-adec-953644046c54"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-AllergyIntolerance-1"/> + </meta> + <identifier> + <system value="https://tools.ietf.org/html/rfc4122"/> + <value value="d8c0bd1f-1c12-4065-bc29-fa181920dd21"/> + </identifier> + <clinicalStatus value="active"/> + <verificationStatus value="confirmed"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="9290701000001101"/> + <display value="Optrex"/> + </coding> + </code> + <patient> + <reference value="urn:uuid:9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + </patient> + </AllergyIntolerance> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:3d7d07c0-8ed2-43ea-92d4-1adad6e315fc"/> + <resource> + <List> + <id value="3d7d07c0-8ed2-43ea-92d4-1adad6e315fc"/> + <meta> + <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-ITK-Allergy-List-1" /> + </meta> + <identifier> + <system value="https://tools.ietf.org/html/rfc4122"/> + <value value="95affce1-842d-4ef4-81f4-d559313f739d"/> + </identifier> + <status value="current"/> + <mode value="snapshot"/> + <code> + <coding> + <system value="http://snomed.info/sct"/> + <code value="886921000000105"/> + <display value="Allergies and adverse reactions"/> + </coding> + </code> + <subject> + <reference value="urn:uuid:9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + </subject> + </List> + </resource> + </entry> + <entry> + <fullUrl value="urn:uuid:9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + <resource> + <Patient> + <id value="9439fa97-f1a9-438d-8a9c-80f52bcbce64"/> + <meta> + <profile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"/> + </meta> + <identifier> + <extension url="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1"> + <valueCodeableConcept> + <coding> + <system value="https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1"/> + <code value="01"/> + <display value="Number present and verified"/> + </coding> + </valueCodeableConcept> + </extension> + <system value="https://fhir.nhs.uk/Id/nhs-number"/> + <value value="1234567890"/> + </identifier> + <identifier> + <system value="https://fhir.nhs.uk/Id/local-patient-identifier"/> + <value value="G654321"/> + </identifier> + <active value="true"/> + <name> + <use value="official"/> + <family value="Patfamily"/> + <given value="Patgiven"/> + <prefix value="Mr"/> + </name> + <telecom> + <system value="phone"/> + <value value="null"/> + <use value="mobile"/> + </telecom> + <telecom> + <system value="email"/> + <value value="null"/> + <use value="home"/> + </telecom> + <gender value="male"/> + <birthDate value="1950-01-01"/> + <address> + <use value="home"/> + <line value=" 1 Whitehall Quay, Leeds"/> + <postalCode value="LS1 4HR"/> + </address> + </Patient> + </resource> + </entry> + </Bundle> + </resource> + </entry> +</Bundle> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/observation102.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/observation102.json new file mode 100644 index 000000000..d1328bc10 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/observation102.json @@ -0,0 +1,70 @@ +{ + "resourceType": "Observation", + "id": "example", + "text": { + "fhir_comments": [ + " the mandatory quality flags: " + ], + "status": "generated", + "div": "<div><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Weight Measured <span>(Details : {LOINC code '3141-9' = 'Body weight Measured', given as 'Weight Measured'}; {SNOMED CT code '27113001' = '27113001', given as 'Body weight'}; {http://acme.org/devices/clinical-codes code 'body-weight' = '??', given as 'Body Weight'})</span></p><p><b>subject</b>: <a>Patient/example</a></p><p><b>encounter</b>: <a>Encounter/example</a></p><p><b>value</b>: 185 lbs<span> (Details: http://unitsofmeasure.org code [lb_av] = '??')</span></p></div>" + }, + "status": "final", + "category": { + "fhir_comments": [ + " category code is A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes. " + ], + "coding": [ + { + "system": "http://hl7.org/fhir/observation-category", + "code": "vital-signs", + "display": "Vital Signs" + } + ] + }, + "code": { + "fhir_comments": [ + " \n Observations are often coded in multiple code systems.\n - LOINC provides a very specific code (though not usefully more specific in this particular case)\n - snomed provides a clinically relevant code that is usually less granular than LOINC\n - the source system provides its own code, which may be less or more granular than LOINC\n " + ], + "coding": [ + { + "fhir_comments": [ + " LOINC - always recommended to have a LOINC code " + ], + "system": "http://loinc.org", + "code": "3141-9", + "display": "Weight Measured" + }, + { + "fhir_comments": [ + " SNOMED CT Codes - becoming more common " + ], + "system": "http://snomed.info/sct", + "code": "27113001", + "display": "Body weight" + }, + { + "fhir_comments": [ + " Also, a local code specific to the source system " + ], + "system": "http://acme.org/devices/clinical-codes", + "code": "body-weight", + "display": "Body Weight" + } + ] + }, + "subject": { + "reference": "Patient/example" + }, + "encounter": { + "reference": "Encounter/example" + }, + "valueQuantity": { + "fhir_comments": [ + " In FHIR, units may be represented twice. Once in the\n agreed human representation, and once in a coded form.\n Both is best, since it's not always possible to infer\n one from the other in code.\n\n When a computable unit is provided, UCUM (http://unitsofmeasure.org)\n is always preferred, but it doesn't provide notional units (such as\n \"tablet\"), etc. For these, something else is required (e.g. SNOMED CT)\n " + ], + "value": 185, + "unit": "lbs", + "system": "http://unitsofmeasure.org", + "code": "[lb_av]" + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/observation301.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/observation301.xml new file mode 100644 index 000000000..79c3360fa --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/observation301.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?><Observation xmlns="http://hl7.org/fhir"> + <id value="example"/> + <!-- the mandatory quality flags: --> + <text><status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: example</p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Body Weight <span>(Details : {LOINC code '29463-7' = 'Body weight', given as 'Body Weight'}; {LOINC code '3141-9' = 'Body weight Measured', given as 'Body weight Measured'}; {SNOMED CT code '27113001' = 'Body weight', given as 'Body weight'}; {http://acme.org/devices/clinical-codes code 'body-weight' = 'body-weight', given as 'Body Weight'})</span></p><p><b>subject</b>: <a>Patient/example</a></p><p><b>context</b>: <a>Encounter/example</a></p><p><b>effective</b>: 28/03/2016</p><p><b>value</b>: 185 lbs<span> (Details: UCUM code [lb_av] = 'lb_av')</span></p></div></text><status value="final"/> + <!-- category code is A code that classifies the general type of observation being made. This is used for searching, sorting and display purposes. --> + <category> + <coding> + <system value="http://hl7.org/fhir/observation-category"/> + <code value="vital-signs"/> + <display value="Vital Signs"/> + </coding> + </category> + <!-- + Observations are often coded in multiple code systems. + - LOINC provides codes of varying granularity (though not usefully more specific in this particular case) and more generic LOINCs can be mapped to more specific codes as shown here + - snomed provides a clinically relevant code that is usually less granular than LOINC + - the source system provides its own code, which may be less or more granular than LOINC + --> + <code> + <!-- LOINC - always recommended to have a LOINC code --> + <coding> + <system value="http://loinc.org"/> + <code value="29463-7"/> <!-- more generic methodless LOINC --> + <display value="Body Weight"/> + </coding> + <coding> + <system value="http://loinc.org"/> + <code value="3141-9"/><!-- translation is more specific method = measured LOINC --> + <display value="Body weight Measured"/> + </coding> + <!-- SNOMED CT Codes - becoming more common --> + <coding> + <system value="http://snomed.info/sct"/> + <code value="27113001"/> + <display value="Body weight"/> + </coding> + <!-- Also, a local code specific to the source system --> + <coding> + <system value="http://acme.org/devices/clinical-codes"/> + <code value="body-weight"/> + <display value="Body Weight"/> + </coding> + </code> + <subject> + <reference value="Patient/example"/> + </subject> + <context> + <reference value="Encounter/example"/> + </context> + <effectiveDateTime value="2016-03-28"/> + <!-- In FHIR, units may be represented twice. Once in the + agreed human representation, and once in a coded form. + Both is best, since it's not always possible to infer + one from the other in code. + + When a computable unit is provided, UCUM (http://unitsofmeasure.org) + is always preferred, but it doesn't provide notional units (such as + "tablet"), etc. For these, something else is required (e.g. SNOMED CT) + --> + <valueQuantity> + <value value="185"/> + <unit value="lbs"/> + <system value="http://unitsofmeasure.org"/> + <code value="[lb_av]"/> + </valueQuantity> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/params-reference.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/params-reference.xml new file mode 100644 index 000000000..f32b9d274 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/params-reference.xml @@ -0,0 +1,22 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <id value="1"/> + <parameter> + <name value="param"/> + <resource> + <Basic> + <id value="2"/> + <contained> + <Patient> + <id value="patient"/> + </Patient> + </contained> + <code> + <text value="test"/> + </code> + <subject> + <reference value="#patient"/> + </subject> + </Basic> + </resource> + </parameter> +</Parameters> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.json new file mode 100644 index 000000000..6045b9bff --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.json @@ -0,0 +1,165 @@ +{ + "resourceType": "Patient", + "id": "example", + "text": { + "status": "generated", + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t<td>Peter James \n <b>Chalmers</b> ("Jim")\n </td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Address</td>\n\t\t\t\t\t\t<td>534 Erewhon, Pleasantville, Vic, 3999</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Contacts</td>\n\t\t\t\t\t\t<td>Home: unknown. Work: (03) 5555 6473</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Id</td>\n\t\t\t\t\t\t<td>MRN: 12345 (Acme Healthcare)</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>" + }, + "identifier": [ + { + "use": "usual", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "MR" + } + ] + }, + "system": "urn:oid:1.2.36.146.595.217.0.1", + "value": "12345", + "period": { + "start": "2001-05-06" + }, + "assigner": { + "display": "Acme Healthcare" + } + } + ], + "active": true, + "name": [ + { + "use": "official", + "family": "Chalmers", + "given": [ + "Peter", + "James" + ] + }, + { + "use": "usual", + "given": [ + "Jim" + ] + }, + { + "use": "maiden", + "family": "Windsor", + "given": [ + "Peter", + "James" + ], + "period": { + "end": "2002" + } + } + ], + "telecom": [ + { + "use": "home" + }, + { + "system": "phone", + "value": "(03) 5555 6473", + "use": "work", + "rank": 1 + }, + { + "system": "phone", + "value": "(03) 3410 5613", + "use": "mobile", + "rank": 2 + }, + { + "system": "phone", + "value": "(03) 5555 8834", + "use": "old", + "period": { + "end": "2014" + } + } + ], + "gender": "male", + "birthDate": "1974-12-25", + "_birthDate": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", + "valueDateTime": "1974-12-25T14:35:45-05:00" + } + ] + }, + "deceasedBoolean": false, + "address": [ + { + "use": "home", + "type": "both", + "text": "534 Erewhon St PeasantVille, Rainbow, Vic 3999", + "line": [ + "534 Erewhon St" + ], + "city": "PleasantVille", + "district": "Rainbow", + "state": "Vic", + "postalCode": "3999", + "period": { + "start": "1974-12-25" + } + } + ], + "contact": [ + { + "relationship": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0131", + "code": "N" + } + ] + } + ], + "name": { + "family": "du Marché", + "_family": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", + "valueString": "VV" + } + ] + }, + "given": [ + "Bénédicte" + ] + }, + "telecom": [ + { + "system": "phone", + "value": "+33 (237) 998327" + } + ], + "address": { + "use": "home", + "type": "both", + "line": [ + "534 Erewhon St" + ], + "city": "PleasantVille", + "district": "Rainbow", + "state": "Vic", + "postalCode": "3999", + "period": { + "start": "1974-12-25" + } + }, + "gender": "female", + "period": { + "start": "2012" + } + } + ], + "managingOrganization": { + "reference": "Organization/1" + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.xml new file mode 100644 index 000000000..1dc2adb2f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-example.xml @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8"?><Patient xmlns="http://hl7.org/fhir"> + <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é"> + <!-- 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éné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> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.json new file mode 100644 index 000000000..b16cbfa3f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.json @@ -0,0 +1,8 @@ +{ + "resourceType" : "Patient", + "id" : "pat-good", + "text" : { + "status" : "generated", + "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n some text in no particular language\n </div>" + } +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.xml new file mode 100644 index 000000000..2bc9b80c0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-good.xml @@ -0,0 +1,9 @@ +<Patient xmlns="http://hl7.org/fhir"> + <id value="pat-good"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml"> + some text in no particular language + </div> + </text> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.json new file mode 100644 index 000000000..8cbae4b7c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.json @@ -0,0 +1,9 @@ +{ + "resourceType" : "Patient", + "id" : "pat-good", + "language" : "en-AU", + "text" : { + "status" : "generated", + "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">some text in no particular language </div>" + } +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.xml new file mode 100644 index 000000000..f4a0ccfed --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang1.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Patient xmlns="http://hl7.org/fhir"> + <id value="pat-good"/> + <language value="en-AU"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml">some text in no particular language </div> + </text> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.json new file mode 100644 index 000000000..63290f8f8 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.json @@ -0,0 +1,9 @@ +{ + "resourceType" : "Patient", + "id" : "pat-good", + "language" : "en-AU", + "text" : { + "status" : "generated", + "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en-AU\">some text in no particular language </div>" + } +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.xml new file mode 100644 index 000000000..1d2d79aa3 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang2.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Patient xmlns="http://hl7.org/fhir"> + <id value="pat-good"/> + <language value="en-AU"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml" lang="en-AU">some text in no particular language </div> + </text> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.json new file mode 100644 index 000000000..f5b0011d7 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.json @@ -0,0 +1,9 @@ +{ + "resourceType" : "Patient", + "id" : "pat-good", + "language" : "en-AU", + "text" : { + "status" : "generated", + "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"fr\">some text in no particular language </div>" + } +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.xml new file mode 100644 index 000000000..47b7d9cd2 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient-lang3.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Patient xmlns="http://hl7.org/fhir"> + <id value="pat-good"/> + <language value="en-AU"/> + <text> + <status value="generated"/> + <div xmlns="http://www.w3.org/1999/xhtml" lang="fr">some text in no particular language </div> + </text> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient102.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient102.xml new file mode 100644 index 000000000..0bc94454f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient102.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?><Patient xmlns="http://hl7.org/fhir"> + <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://hl7.org/fhir/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> + <telecom> + <use value="home"/> + <!-- home communication details aren't known --> + </telecom> + <telecom> + <system value="phone"/> + <value value="(03) 5555 6473"/> + <use value="work"/> + </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"/> + <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://hl7.org/fhir/patient-contact-relationship"/> + <code value="partner"/> + </coding> + </relationship> + <name> + <family value="du"> + <!-- the "du" part is a family name prefix (VV in iso 21090) --> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"> + <valueCode value="VV"/> + </extension> + </family> + <family value="Marché"/> + <given value="Bénédicte"/> + </name> + <telecom> + <system value="phone"/> + <value value="+33 (237) 998327"/> + </telecom> + <gender value="female"/> + <period> + <!-- The contact relationship started in 2012 --> + <start value="2012"/> + </period> + </contact> + <managingOrganization> + <reference value="Organization/1"/> + </managingOrganization> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient140.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient140.xml new file mode 100644 index 000000000..0bc94454f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient140.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?><Patient xmlns="http://hl7.org/fhir"> + <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://hl7.org/fhir/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> + <telecom> + <use value="home"/> + <!-- home communication details aren't known --> + </telecom> + <telecom> + <system value="phone"/> + <value value="(03) 5555 6473"/> + <use value="work"/> + </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"/> + <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://hl7.org/fhir/patient-contact-relationship"/> + <code value="partner"/> + </coding> + </relationship> + <name> + <family value="du"> + <!-- the "du" part is a family name prefix (VV in iso 21090) --> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"> + <valueCode value="VV"/> + </extension> + </family> + <family value="Marché"/> + <given value="Bénédicte"/> + </name> + <telecom> + <system value="phone"/> + <value value="+33 (237) 998327"/> + </telecom> + <gender value="female"/> + <period> + <!-- The contact relationship started in 2012 --> + <start value="2012"/> + </period> + </contact> + <managingOrganization> + <reference value="Organization/1"/> + </managingOrganization> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/patient301.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient301.xml new file mode 100644 index 000000000..7ca41e8bf --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/patient301.xml @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8"?><Patient xmlns="http://hl7.org/fhir"> + <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://hl7.org/fhir/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://hl7.org/fhir/v2/0131"/> + <code value="N"/> + </coding> + </relationship> + <name> + <family value="du Marché"> + <!-- 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éné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> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad-empty.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad-empty.xml new file mode 100644 index 000000000..98604f3f0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad-empty.xml @@ -0,0 +1,228 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <parameter> + <name value="paramBoolean"/> + <valueBoolean value="true"/> + </parameter> + <parameter> + <name value="paramInteger1"/> + <valueInteger value="0"/> + </parameter> + <parameter> + <name value="paramInteger2"/> + <valueInteger value="-1"/> + </parameter> + <parameter> + <name value="paramInteger3"/> + <valueInteger value="-1"/> + </parameter> + <parameter> + <name value="paramDecimal0"/> + <valueDecimal value="0"/> + </parameter> + <parameter> + <name value="paramDecimal1"/> + <valueDecimal value="1.09"/> + </parameter> + <parameter> + <name value="paramDecimal2"/> + <valueDecimal value="-0.00000000000000000000000023"/> + </parameter> + <parameter> + <name value="paramDecimal3"/> + <valueDecimal value="121233786234234234234234.12323"/> + </parameter> + <parameter> + <name value="paramBase64Binary"/> + <valueBase64Binary value="YXNhc2Rhc2Q="/> + </parameter> + <parameter> + <name value="paramInstant"/> + <valueInstant value="2013-01-01T12:32:45Z"/> + </parameter> + <parameter> + <name value="paramString"/> + <valueString value=""/> + </parameter> + <parameter> + <name value="paramUri"/> + <valueUri value="http://any.uri/somewhere"/> + </parameter> + <parameter> + <name value="paramDate"/> + <valueDate value="2000-02-29"/> + </parameter> + <parameter> + <name value="paramDateTime1"/> + <valueDateTime value="2013-01-01T12:32:45+10:00"/> + </parameter> + <parameter> + <name value="paramDateTime2"/> + <valueDateTime value="2013-01-01"/> + </parameter> + <parameter> + <name value="paramDateTime3"/> + <valueDateTime value="2013-01-01T12:59:60+10:00"/> + </parameter> + <parameter> + <name value="paramTime"/> + <valueTime value="11:59:59"/> + </parameter> + <parameter> + <name value="paramCode1"/> + <valueCode value="asdasd"/> + </parameter> + <parameter> + <name value="paramCode2"/> + <valueCode value="asd asd"/> + </parameter> + <parameter> + <name value="paramOid"/> + <valueOid value="urn:oid:0.1.2.3"/> + </parameter> + <parameter> + <name value="paramId"/> + <valueId value="12123-23"/> + </parameter> + <parameter> + <name value="paramUnsignedInt"/> + <valueUnsignedInt value="0"/> + </parameter> + <parameter> + <name value="paramPositiveInt"/> + <valuePositiveInt value="1"/> + </parameter> + <parameter> + <name value="paramMarkdown"/> + <valueMarkdown value="# This is an H1 # ## This is an H2 ## ### This is an H3 ###### "/> + </parameter> + + <parameter> + <name value="paramBooleanMissing"/> + <valueBoolean> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueBoolean> + </parameter> + <parameter> + <name value="paramIntegerMissing"/> + <valueInteger> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueInteger> + </parameter> + <parameter> + <name value="paramDecimalMissing"/> + <valueDecimal> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDecimal> + </parameter> + <parameter> + <name value="paramBase64BinaryMissing"/> + <valueBase64Binary> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueBase64Binary> + </parameter> + <parameter> + <name value="paramInstantMissing"/> + <valueInstant> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueInstant> + </parameter> + <parameter> + <name value="paramStringMissing"/> + <valueString> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueString> + </parameter> + <parameter> + <name value="paramUriMissing"/> + <valueUri> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueUri> + </parameter> + <parameter> + <name value="paramDateMissing"/> + <valueDate> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDate> + </parameter> + <parameter> + <name value="paramDateTimeMissing"/> + <valueDateTime> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDateTime> + </parameter> + <parameter> + <name value="paramTimeMissing"/> + <valueTime> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueTime> + </parameter> + <parameter> + <name value="paramCodeMissing"/> + <valueCode> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueCode> + </parameter> + <parameter> + <name value="paramOidMissing"/> + <valueOid> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueOid> + </parameter> + <parameter> + <name value="paramIdMissing"/> + <valueId> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueId> + </parameter> + <parameter> + <name value="paramUnsignedIntMissing"/> + <valueUnsignedInt> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueUnsignedInt> + </parameter> + <parameter> + <name value="paramPositiveIntMissing"/> + <valuePositiveInt> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valuePositiveInt> + </parameter> + <parameter> + <name value="paramMarkdownMissing"/> + <valueMarkdown> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueMarkdown> + </parameter> +</Parameters> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad.xml new file mode 100644 index 000000000..08c2b5d49 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-bad.xml @@ -0,0 +1,155 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <parameter> <!-- 1 --> + <name value="paramBoolean1"/> + <valueBoolean value="TRUE"/> + </parameter> + <parameter> <!-- 2 --> + <name value="paramBoolean2"/> + <valueBoolean value="1"/> + </parameter> + <parameter> <!-- 3 --> + <name value="paramBoolean3"/> + <valueBoolean value="yes"/> + </parameter> + <parameter> <!-- 4 --> + <name value="paramInteger1"/> + <valueInteger value="34534536346345345345"/> + </parameter> + <parameter> <!-- 5 --> + <name value="paramInteger2"/> + <valueInteger value="$0"/> + </parameter> + <parameter> <!-- 6 --> + <name value="paramInteger3"/> + <valueInteger value="1e4"/> + </parameter> + <parameter> <!-- 7 --> + <name value="paramDecimal0"/> + <valueDecimal value="00.1"/> + </parameter> + <parameter> <!-- 8 --> + <name value="paramDecimal1"/> + <valueDecimal value="1e09"/> + </parameter> + <parameter> <!-- 9 --> + <name value="paramDecimal2"/> + <valueDecimal value="0.12e3"/> + </parameter> + <parameter> <!-- 10 --> + <name value="paramBase64Binary"/> + <valueBase64Binary value="YXNhcs2Rhc2Q="/> + </parameter> + <parameter> <!-- 11 --> + <name value="paramInstant1"/> + <valueInstant value="0000-01-01T12:32:45Z"/> + </parameter> + <parameter> <!-- 12 --> + <name value="paramInstant2"/> + <valueInstant value="1983-00-01T12:32:45Z"/> + </parameter> + <parameter> <!-- 13 --> + <name value="paramInstant3"/> + <valueInstant value="1983-01-00T12:32:45Z"/> + </parameter> + <parameter> <!-- 14 --> + <name value="paramInstant4"/> + <valueInstant value="1983-01-01T12:32"/> + </parameter> + <parameter> <!-- 15 --> + <name value="paramInstant5"/> + <valueInstant value="1983-01-01T12:32:45"/> + </parameter> + <parameter> <!-- 16 --> + <name value="paramInstant6"/> + <valueInstant value="1983-01-01T12:32:45-15:00"/> + </parameter> + <parameter> <!-- 17 --> + <name value="paramString"/> + <valueString value=""/> + </parameter> + <parameter> <!-- 18 --> + <name value="paramUri"/> + <valueUri value="not a valid uri"/> + </parameter> + <parameter> <!-- 19 --> + <name value="paramDate"/> + <valueDate value="1900-02-29"/> + </parameter> + <parameter> <!-- 20 --> + <name value="paramDate"/> + <valueDate value="1900-13-01"/> + </parameter> + <parameter> <!-- 21 --> + <name value="paramDate"/> + <valueDate value="2013-04-31"/> + </parameter> + <parameter> <!-- 22 --> + <name value="paramDateTime1"/> + <valueDateTime value="2013-01-01T12:32:45+13:33.00"/> + </parameter> + <parameter> <!-- 23 --> + <name value="paramDateTime2"/> + <valueDateTime value="-0001-01-01"/> + </parameter> + <parameter> <!-- 24 --> + <name value="paramTime"/> + <valueTime value="11:60:59"/> + </parameter> + <parameter> <!-- 25 --> + <name value="paramTime"/> + <valueTime value="24:00:00"/> + </parameter> + <parameter> <!-- 26 --> + <name value="paramCode1"/> + <valueCode value=" asdasd"/> + </parameter> + <parameter> <!-- 27 --> + <name value="paramCode2"/> + <valueCode value="asd asd"/> + </parameter> + <parameter> <!-- 28 --> + <name value="paramCode3"/> + <valueCode value="asdasd "/> + </parameter> + <parameter> <!-- 29 --> + <name value="paramOid1"/> + <valueOid value="oid:0.1.2.3"/> + </parameter> + <parameter> <!-- 30 --> + <name value="paramOid2"/> + <valueOid value="urn:oid: 0.1.2.3"/> + </parameter> + <parameter> <!-- 31 --> + <name value="paramOid3"/> + <valueOid value="urn:oid:a0.1.2.3"/> + </parameter> + <parameter> <!-- 32 --> + <name value="paramOid4"/> + <valueOid value="0.1.2.3"/> + </parameter> + <parameter> <!-- 33 --> + <name value="paramId"/> + <valueId value=":12123-23"/> + </parameter> + <parameter> <!-- 34 --> + <name value="paramId"/> + <valueId value="12123/23"/> + </parameter> + <parameter> <!-- 35 --> + <name value="paramId"/> + <valueId value="asdasdasdasdasddgjhasdkjfgasdfasdfgsadfgsdfaskdfjhasdfjgsdfjhgsdfjhgsadfskadjfhg"/> + </parameter> + <parameter> <!-- 36 --> + <name value="paramUnsignedInt"/> + <valueUnsignedInt value="-1"/> + </parameter> + <parameter> <!-- 37 --> + <name value="paramPositiveInt"/> + <valuePositiveInt value="0"/> + </parameter> + <parameter> <!-- 38 --> + <name value="paramMarkdown"/> + <valueMarkdown value=""/> + </parameter> +</Parameters> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.json new file mode 100644 index 000000000..095e96c82 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.json @@ -0,0 +1,9 @@ +{ + "resourceType" : "Parameters", + "parameter" : [ + { + "name" : "paramString", + "valueString" : " \t " + } + ] +} diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.xml new file mode 100644 index 000000000..4ff16b070 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good-ws.xml @@ -0,0 +1,7 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <parameter> + <name value="paramString"/> + <valueString value=" "/> + </parameter> +</Parameters> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good.xml new file mode 100644 index 000000000..9aeab16e0 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/primitive-good.xml @@ -0,0 +1,228 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <parameter> + <name value="paramBoolean"/> + <valueBoolean value="true"/> + </parameter> + <parameter> + <name value="paramInteger1"/> + <valueInteger value="0"/> + </parameter> + <parameter> + <name value="paramInteger2"/> + <valueInteger value="-1"/> + </parameter> + <parameter> + <name value="paramInteger3"/> + <valueInteger value="-1"/> + </parameter> + <parameter> + <name value="paramDecimal0"/> + <valueDecimal value="0"/> + </parameter> + <parameter> + <name value="paramDecimal1"/> + <valueDecimal value="1.09"/> + </parameter> + <parameter> + <name value="paramDecimal2"/> + <valueDecimal value="-0.00000000000000000000000023"/> + </parameter> + <parameter> + <name value="paramDecimal3"/> + <valueDecimal value="121233786234234234234234.12323"/> + </parameter> + <parameter> + <name value="paramBase64Binary"/> + <valueBase64Binary value="YXNhc2Rhc2Q="/> + </parameter> + <parameter> + <name value="paramInstant"/> + <valueInstant value="2013-01-01T12:32:45Z"/> + </parameter> + <parameter> + <name value="paramString"/> + <valueString value="asdasd"/> + </parameter> + <parameter> + <name value="paramUri"/> + <valueUri value="http://any.uri/somewhere"/> + </parameter> + <parameter> + <name value="paramDate"/> + <valueDate value="2000-02-29"/> + </parameter> + <parameter> + <name value="paramDateTime1"/> + <valueDateTime value="2013-01-01T12:32:45+10:00"/> + </parameter> + <parameter> + <name value="paramDateTime2"/> + <valueDateTime value="2013-01-01"/> + </parameter> + <parameter> + <name value="paramDateTime3"/> + <valueDateTime value="2013-01-01T12:59:60+10:00"/> + </parameter> + <parameter> + <name value="paramTime"/> + <valueTime value="11:59:59"/> + </parameter> + <parameter> + <name value="paramCode1"/> + <valueCode value="asdasd"/> + </parameter> + <parameter> + <name value="paramCode2"/> + <valueCode value="asd asd"/> + </parameter> + <parameter> + <name value="paramOid"/> + <valueOid value="urn:oid:0.1.2.3"/> + </parameter> + <parameter> + <name value="paramId"/> + <valueId value="12123-23"/> + </parameter> + <parameter> + <name value="paramUnsignedInt"/> + <valueUnsignedInt value="0"/> + </parameter> + <parameter> + <name value="paramPositiveInt"/> + <valuePositiveInt value="1"/> + </parameter> + <parameter> + <name value="paramMarkdown"/> + <valueMarkdown value="# This is an H1 # ## This is an H2 ## ### This is an H3 ###### "/> + </parameter> + + <parameter> + <name value="paramBooleanMissing"/> + <valueBoolean> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueBoolean> + </parameter> + <parameter> + <name value="paramIntegerMissing"/> + <valueInteger> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueInteger> + </parameter> + <parameter> + <name value="paramDecimalMissing"/> + <valueDecimal> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDecimal> + </parameter> + <parameter> + <name value="paramBase64BinaryMissing"/> + <valueBase64Binary> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueBase64Binary> + </parameter> + <parameter> + <name value="paramInstantMissing"/> + <valueInstant> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueInstant> + </parameter> + <parameter> + <name value="paramStringMissing"/> + <valueString> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueString> + </parameter> + <parameter> + <name value="paramUriMissing"/> + <valueUri> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueUri> + </parameter> + <parameter> + <name value="paramDateMissing"/> + <valueDate> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDate> + </parameter> + <parameter> + <name value="paramDateTimeMissing"/> + <valueDateTime> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueDateTime> + </parameter> + <parameter> + <name value="paramTimeMissing"/> + <valueTime> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueTime> + </parameter> + <parameter> + <name value="paramCodeMissing"/> + <valueCode> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueCode> + </parameter> + <parameter> + <name value="paramOidMissing"/> + <valueOid> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueOid> + </parameter> + <parameter> + <name value="paramIdMissing"/> + <valueId> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueId> + </parameter> + <parameter> + <name value="paramUnsignedIntMissing"/> + <valueUnsignedInt> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueUnsignedInt> + </parameter> + <parameter> + <name value="paramPositiveIntMissing"/> + <valuePositiveInt> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valuePositiveInt> + </parameter> + <parameter> + <name value="paramMarkdownMissing"/> + <valueMarkdown> + <extension url="http://hl7.org/fhir/StructureDefinition/data-absent-reason"> + <valueCode value="unknown"/> + </extension> + </valueMarkdown> + </parameter> +</Parameters> + diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/q.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/q.xml new file mode 100644 index 000000000..bac7a7234 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/q.xml @@ -0,0 +1,40 @@ +<Questionnaire xmlns="http://hl7.org/fhir"> + <id value="Questionnaire-openChoice" /> + <language value="fi" /> + <url value="http://phr.kanta.fi/Questionnaire/Questionnaire-openChoice" /> + <identifier> + <system value="urn:ietf:rfc:3986" /> + <value value="daa60638-251b-4d53-9ee9-6f16c0e6074b" /> + </identifier> + <version value="0.1" /> + <name value="Questionnaire-openChoice" /> + <title value="Questionnaire-openChoice" /> + <status value="draft" /> + <experimental value="true" /> + <date value="2018-07-25T14:00:00Z" /> + <description value="Questionnaire-openChoice" /> + <code> + <system value="http://phr.kanta.fi/CodeSystem/fiphr-cs-questionnairecode" /> + <code value="DAN-PSS-1" /> + </code> + <item> + <linkId value="1" /> + <text value="Question1" /> + <type value="boolean" /> + <required value="true" /> + <repeats value="false" /> + </item> + <item> + <linkId value="2" /> + <text value="Question2" /> + <type value="choice" /> + <required value="true" /> + <repeats value="true" /> + <answerOption> + <valueCoding id="1"> + <code value="B" /> + <display value="B" /> + </valueCoding> + </answerOption> + </item> +</Questionnaire> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/qr.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/qr.xml new file mode 100644 index 000000000..cfb0fa55d --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/qr.xml @@ -0,0 +1,37 @@ +<QuestionnaireResponse xmlns="http://hl7.org/fhir"> + <language value="en" /> + <identifier> + <system value="urn:ietf:rfc:3986" /> + <value value="3ea24a84-c3b3-4673-a7ed-de8254a3eb25" /> + </identifier> + <questionnaire value="http://phr.kanta.fi/Questionnaire/Questionnaire-openChoice" /> + <status value="completed" /> + <subject> + <reference value="Patient/25a53703-27f9-4354-8f1b-a8b2f8f3ee86" /> + </subject> + <authored value="2018-07-25T13:44:16Z" /> + <source> + <reference value="Patient/25a53703-27f9-4354-8f1b-a8b2f8f3ee86" /> + </source> + <item> + <linkId value="1" /> + <text value="Question1" /> + <answer> + <valueBoolean value="false" /> + </answer> + </item> + <item> + <linkId value="2" /> + <text value="Question2" /> + <answer> + <valueString value="Open answer" /> + </answer> + </item> + <item> + <linkId value="3" /> + <text value="Question3" /> + <answer> + <valueBoolean value="false" /> + </answer> + </item> +</QuestionnaireResponse> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-logical.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-logical.xml new file mode 100644 index 000000000..505d7ca5b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-logical.xml @@ -0,0 +1,13 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <identifier> + <system value="http://something/somepath"/> + <value value="something"/> + </identifier> + <type value="ValueSet"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-typed.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-typed.xml new file mode 100644 index 000000000..fdd192389 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad-typed.xml @@ -0,0 +1,10 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <reference value="Patient/test"/> + <type value="Group"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad.xml new file mode 100644 index 000000000..bd8aebf3c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-bad.xml @@ -0,0 +1,9 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <reference value="Patient/test-fail"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-contained.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-contained.xml new file mode 100644 index 000000000..fd1c58f94 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-contained.xml @@ -0,0 +1,17 @@ +<Observation xmlns="http://hl7.org/fhir"> + <contained> + <Patient> + <id value="pat"/> + <name> + <text value="some name"/> + </name> + </Patient> + </contained> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <reference value="#pat"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical-1.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical-1.xml new file mode 100644 index 000000000..0b7f00d8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical-1.xml @@ -0,0 +1,12 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <identifier> + <system value="http://something/somepath"/> + <value value="something"/> + </identifier> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical.xml new file mode 100644 index 000000000..0b7f00d8b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-logical.xml @@ -0,0 +1,12 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <identifier> + <system value="http://something/somepath"/> + <value value="something"/> + </identifier> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-typed.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-typed.xml new file mode 100644 index 000000000..72d269c7b --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good-typed.xml @@ -0,0 +1,10 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <reference value="Patient/test"/> + <type value="Patient"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good.xml new file mode 100644 index 000000000..616a72d1f --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/reference-good.xml @@ -0,0 +1,9 @@ +<Observation xmlns="http://hl7.org/fhir"> + <status value="final"/> + <code> + <text value="test"/> + </code> + <subject> + <reference value="Patient/test"/> + </subject> +</Observation> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-example.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-example.json new file mode 100644 index 000000000..7b217e870 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-example.json @@ -0,0 +1,103 @@ +{ + "resourceType":"Observation", + "id":"1minute-apgar-score", + "meta":{ + "versionId":"2", + "lastUpdated":"10/2/2017 5:13:51 PM", + "profile": [ + "http://AAUprofiles/StructureDefinition/DAS28ObservationPractioner" + ] + }, + "contained": [ + { + "resourceType":"Patient", + "id":"newborn", + "identifier": [ + { + "system":"http://acmehealthcare/org/mrns", + "value":"12345" + } + ], + "active":true, + "name": [ + { + "family":"Chalmers", + "given": [ + "Peter", + "James" + ] + } + ], + "gender":"male", + "birthDate":"2016-05-18", + "_birthDate":{ + "extension": [ + { + "url":"http://hl7.org/fhir/StructureDefinition/patient-birthTime", + "valueDateTime":"5/18/2016 10:28:45 AM" + } + ] + } + } + ], + "status":"final", + "category": [ + { + "coding": [ + { + "system":"http://hl7.org/fhir/observation-category", + "code":"survey", + "display":"Survey" + } + ], + "text":"Survey" + } + ], + "code":{ + "coding": [ + { + "system":"http://snomed.info/sct", + "code":"444060007" + } + ], + "text":"1 minute Apgar Score" + }, + "subject":{ + "reference":"#newborn" + }, + "effectiveDateTime":"5/18/2016 10:33:22 PM", + "performer": [ + { + "reference":"Practitioner/example" + } + ], + "valueQuantity":{ + "value":"0", + "system":"http://unitsofmeasure.org", + "code":"{score}" + }, + "component": [ + { + "code":{ + "coding": [ + { + "system":"http://snomed.info/sct", + "code":"55235003" + } + ], + "text":"Apgar color score" + } + }, + { + "code":{ + "coding": [ + { + "system":"http://snomed.info/sct", + "code":"446661009" + } + ], + "text":"Apgar color score" + } + } + ] +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-profile.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-profile.json new file mode 100644 index 000000000..2ea5ca621 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/simpl-profile.json @@ -0,0 +1,20139 @@ +{ + "resourceType": "StructureDefinition", + "id": "6463b2c9-00b8-4a83-a37f-38715e5e6fb9", + "meta": { + "lastUpdated": "2017-10-06T10:40:50.49+00:00" + }, + "url": "http://AAUprofiles/StructureDefinition/DAS28ObservationPractioner", + "name": "DAS28ObservationPractioner", + "status": "draft", + "experimental": true, + "date": "2017-10-05T07:35:50.498+00:00", + "fhirVersion": "3.0.1", + "kind": "resource", + "abstract": false, + "type": "Observation", + "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation", + "derivation": "constraint", + "snapshot": { + "element": [ + { + "id": "Observation", + "path": "Observation", + "short": "Measurements and simple assertions", + "definition": "Measurements and simple assertions made about a patient, device or other subject.", + "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc. Other resources are used to provide context for observations such as lab reports, etc.", + "alias": [ + "Vital Signs", + "Measurement", + "Results", + "Tests" + ], + "min": 0, + "max": "*", + "base": { + "path": "Resource", + "min": 0, + "max": "*" + }, + "constraint": [ + { + "key": "dom-2", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", + "expression": "contained.contained.empty()", + "xpath": "not(parent::f:contained and f:contained)" + }, + { + "key": "dom-1", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative", + "expression": "contained.text.empty()", + "xpath": "not(parent::f:contained and f:text)" + }, + { + "key": "dom-4", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", + "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" + }, + { + "key": "dom-3", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource", + "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()", + "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))" + }, + { + "key": "obs-7", + "severity": "error", + "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present", + "expression": "value.empty() or code!=component.code", + "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)" + }, + { + "key": "obs-6", + "severity": "error", + "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present", + "expression": "dataAbsentReason.empty() or value.empty()", + "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "workflow", + "map": "Event" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity|" + }, + { + "identity": "v2", + "map": "OBX" + }, + { + "identity": "rim", + "map": "Observation[classCode=OBS, moodCode=EVN]" + }, + { + "identity": "w5", + "map": "clinical.diagnostics" + } + ] + }, + { + "id": "Observation.id", + "path": "Observation.id", + "short": "Logical id of this artifact", + "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", + "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "id" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.meta", + "path": "Observation.meta", + "short": "Metadata about the resource", + "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.meta", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Meta" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.implicitRules", + "path": "Observation.implicitRules", + "short": "A set of rules under which this content was created", + "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.", + "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.implicitRules", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.language", + "path": "Observation.language", + "short": "Language of the resource content", + "definition": "The base language in which the resource is written.", + "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", + "min": 0, + "max": "1", + "base": { + "path": "Resource.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueReference": { + "reference": "http://hl7.org/fhir/ValueSet/all-languages" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "A human language.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/languages" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.text", + "path": "Observation.text", + "short": "Text summary of the resource, for human interpretation", + "definition": "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 \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", + "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.", + "alias": [ + "narrative", + "html", + "xhtml", + "display" + ], + "min": 0, + "max": "1", + "base": { + "path": "DomainResource.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Narrative" + } + ], + "condition": [ + "ele-1", + "dom-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Act.text?" + } + ] + }, + { + "id": "Observation.contained", + "path": "Observation.contained", + "short": "Contained, inline Resources", + "definition": "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.", + "comment": "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.", + "alias": [ + "inline resources", + "anonymous resources", + "contained resources" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.contained", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Resource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.extension", + "path": "Observation.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "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 set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.modifierExtension", + "path": "Observation.modifierExtension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier", + "path": "Observation.identifier", + "short": "Business Identifier for observation", + "definition": "A unique identifier assigned to this observation.", + "requirements": "Allows observations to be distinguished and referenced.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.identifier", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "workflow", + "map": "Event.identifier" + }, + { + "identity": "v2", + "map": "OBX.21 For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4." + }, + { + "identity": "rim", + "map": "id" + }, + { + "identity": "w5", + "map": "id" + } + ] + }, + { + "id": "Observation.identifier.id", + "path": "Observation.identifier.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.identifier.extension", + "path": "Observation.identifier.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.use", + "path": "Observation.identifier.use", + "short": "usual | official | temp | secondary (If known)", + "definition": "The purpose of this identifier.", + "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.", + "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.use", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "IdentifierUse" + } + ], + "strength": "required", + "description": "Identifies the purpose for this identifier, if known .", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/identifier-use" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Role.code or implied by context" + } + ] + }, + { + "id": "Observation.identifier.type", + "path": "Observation.identifier.type", + "short": "Description of identifier", + "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + "comment": "This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. \n\nWhere the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.", + "requirements": "Allows users to make use of identifiers when the identifier system is not known.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "IdentifierType" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/identifier-type" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "CX.5" + }, + { + "identity": "rim", + "map": "Role.code or implied by context" + } + ] + }, + { + "id": "Observation.identifier.type.id", + "path": "Observation.identifier.type.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.identifier.type.extension", + "path": "Observation.identifier.type.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.type.coding", + "path": "Observation.identifier.type.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.identifier.type.coding.id", + "path": "Observation.identifier.type.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.identifier.type.coding.extension", + "path": "Observation.identifier.type.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.type.coding.system", + "path": "Observation.identifier.type.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.identifier.type.coding.version", + "path": "Observation.identifier.type.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.identifier.type.coding.code", + "path": "Observation.identifier.type.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.identifier.type.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.identifier.type.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.identifier.type.coding.userSelected", + "path": "Observation.identifier.type.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.identifier.type.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.identifier.type.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.identifier.system", + "path": "Observation.identifier.system", + "short": "The namespace for the identifier value", + "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "example": [ + { + "label": "General", + "valueUri": "http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX.4 / EI-2-4" + }, + { + "identity": "rim", + "map": "II.root or Role.id.root" + }, + { + "identity": "servd", + "map": "./IdentifierType" + } + ] + }, + { + "id": "Observation.identifier.value", + "path": "Observation.identifier.value", + "short": "The value that is unique", + "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html).", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "example": [ + { + "label": "General", + "valueString": "123456" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX.1 / EI.1" + }, + { + "identity": "rim", + "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" + }, + { + "identity": "servd", + "map": "./Value" + } + ] + }, + { + "id": "Observation.identifier.period", + "path": "Observation.identifier.period", + "short": "Time period when id is/was valid for use", + "definition": "Time period during which identifier is/was valid for use.", + "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.period", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.empty() or end.empty() or (start <= end)", + "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]" + }, + { + "identity": "v2", + "map": "CX.7 + CX.8" + }, + { + "identity": "rim", + "map": "Role.effectiveTime or implied by context" + }, + { + "identity": "servd", + "map": "./StartDate and ./EndDate" + } + ] + }, + { + "id": "Observation.identifier.period.id", + "path": "Observation.identifier.period.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.identifier.period.extension", + "path": "Observation.identifier.period.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.period.start", + "path": "Observation.identifier.period.start", + "short": "Starting time with inclusive boundary", + "definition": "The start of the period. The boundary is inclusive.", + "comment": "If the low element is missing, the meaning is that the low boundary is not known.", + "min": 0, + "max": "1", + "base": { + "path": "Period.start", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.1" + }, + { + "identity": "rim", + "map": "./low" + } + ] + }, + { + "id": "Observation.identifier.period.end", + "path": "Observation.identifier.period.end", + "short": "End time with inclusive boundary, if not ongoing", + "definition": "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + "comment": "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03.", + "min": 0, + "max": "1", + "base": { + "path": "Period.end", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "meaningWhenMissing": "If the end of the period is missing, it means that the period is ongoing", + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.2" + }, + { + "identity": "rim", + "map": "./high" + } + ] + }, + { + "id": "Observation.identifier.assigner", + "path": "Observation.identifier.assigner", + "short": "Organization that issued id (may be just text)", + "definition": "Organization that issued/manages the identifier.", + "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.assigner", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "v2", + "map": "CX.4 / (CX.4,CX.9,CX.10)" + }, + { + "identity": "rim", + "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" + }, + { + "identity": "servd", + "map": "./IdentifierIssuingAuthority" + } + ] + }, + { + "id": "Observation.identifier.assigner.id", + "path": "Observation.identifier.assigner.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.identifier.assigner.extension", + "path": "Observation.identifier.assigner.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.assigner.reference", + "path": "Observation.identifier.assigner.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier.assigner.identifier", + "path": "Observation.identifier.assigner.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.identifier.assigner.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.identifier.assigner.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.basedOn", + "path": "Observation.basedOn", + "short": "Fulfills plan, proposal or order", + "definition": "A plan, proposal or order that is fulfilled in whole or in part by this event.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "requirements": "Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon.", + "alias": [ + "Fulfills" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation.basedOn", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.basedOn" + }, + { + "identity": "v2", + "map": "ORC" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=FLFS].target" + } + ] + }, + { + "id": "Observation.basedOn.id", + "path": "Observation.basedOn.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.basedOn.extension", + "path": "Observation.basedOn.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.basedOn.reference", + "path": "Observation.basedOn.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.basedOn.identifier", + "path": "Observation.basedOn.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.basedOn.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.basedOn.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint", + "valueString": "default: final" + } + ], + "path": "Observation.status", + "short": "registered | preliminary | final | amended +", + "definition": "The status of the result value.", + "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.", + "requirements": "Need to track the status of individual results. Some results are finalized before the whole report is finalized.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.status", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationStatus" + } + ], + "strength": "required", + "description": "Codes providing the status of an observation.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-status" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.status" + }, + { + "identity": "sct-concept", + "map": "< 445584004 |Report by finality status|" + }, + { + "identity": "v2", + "map": "OBX-11" + }, + { + "identity": "rim", + "map": "status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of \"revise\"" + }, + { + "identity": "w5", + "map": "status" + } + ] + }, + { + "id": "Observation.category", + "path": "Observation.category", + "short": "Classification of type of observation", + "definition": "A code that classifies the general type of observation being made.", + "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner?s definition of the category and effectively multiple categories can be used at once. The level of granularity is defined by the category concepts in the value set.", + "requirements": "Used for filtering what observations are retrieved and displayed.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.category", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCategory" + } + ], + "strength": "preferred", + "description": "Codes for high level observation categories.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-category" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code" + }, + { + "identity": "w5", + "map": "class" + } + ] + }, + { + "id": "Observation.category.id", + "path": "Observation.category.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.category.extension", + "path": "Observation.category.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.category.coding", + "path": "Observation.category.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.category.coding.id", + "path": "Observation.category.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.category.coding.extension", + "path": "Observation.category.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.category.coding.system", + "path": "Observation.category.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.category.coding.version", + "path": "Observation.category.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.category.coding.code", + "path": "Observation.category.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.category.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.category.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.category.coding.userSelected", + "path": "Observation.category.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.category.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.category.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.code", + "path": "Observation.code", + "short": "Type of observation (code / type)", + "definition": "Describes what was observed. Sometimes this is called the observation \"name\".", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "requirements": "Knowing what kind of observation is being made is essential to understanding the observation.", + "alias": [ + "Name" + ], + "min": 1, + "max": "1", + "base": { + "path": "Observation.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-codes" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + }, + { + "identity": "sct-attr", + "map": "116680003 |Is a|" + }, + { + "identity": "w5", + "map": "what" + } + ] + }, + { + "id": "Observation.code.id", + "path": "Observation.code.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.extension", + "path": "Observation.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.code.coding", + "path": "Observation.code.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.code.coding.id", + "path": "Observation.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.coding.extension", + "path": "Observation.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.code.coding.system", + "path": "Observation.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://snomed.info/sct", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.code.coding.version", + "path": "Observation.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.code.coding.code", + "path": "Observation.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "444060007", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "fixedString": "Disease activity score in rheumatoid arthritis using C-reactive protein (observable entity)", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.code.coding.userSelected", + "path": "Observation.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.text", + "short": "DAS28 Observable", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.subject", + "path": "Observation.subject", + "short": "Observation of Danish patient", + "definition": "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed. Comments: Indirect characteristics may be those of a specimen, fetus, donor, other observer (for example a relative or EMT), or any observation made about the subject.", + "comment": "One would expect this element to be a cardinality of 1..1. 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 SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html). may be used. However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.", + "requirements": "Observations have no value if you don't know who or what they're about.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.subject", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://AAUprofiles/StructureDefinition/DanishPatient", + "aggregation": [ + "referenced" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.subject" + }, + { + "identity": "v2", + "map": "PID-3" + }, + { + "identity": "rim", + "map": "participation[typeCode=SBJ]" + }, + { + "identity": "w5", + "map": "who.focus" + } + ] + }, + { + "id": "Observation.subject.id", + "path": "Observation.subject.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.subject.extension", + "path": "Observation.subject.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.subject.reference", + "path": "Observation.subject.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.subject.identifier", + "path": "Observation.subject.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.subject.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.subject.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.context", + "path": "Observation.context", + "short": "Healthcare event during which this observation is made", + "definition": "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", + "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).", + "requirements": "For some observations it may be important to know the link between an observation and a particular encounter.", + "alias": [ + "Encounter" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.context", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.context" + }, + { + "identity": "v2", + "map": "PV1" + }, + { + "identity": "rim", + "map": "inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" + }, + { + "identity": "w5", + "map": "context" + } + ] + }, + { + "id": "Observation.context.id", + "path": "Observation.context.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.context.extension", + "path": "Observation.context.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.context.reference", + "path": "Observation.context.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.context.identifier", + "path": "Observation.context.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.context.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.context.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.effective[x]", + "path": "Observation.effective[x]", + "short": "Clinically relevant time/time-period for observation", + "definition": "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 \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself.", + "comment": "At least a date should be present unless this observation is a historical report.", + "requirements": "Knowing when an observation was deemed true is important to its relevance as well as determining trends.", + "alias": [ + "Occurrence" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.effective[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + }, + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.occurrence[x]" + }, + { + "identity": "v2", + "map": "OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" + }, + { + "identity": "rim", + "map": "effectiveTime" + }, + { + "identity": "w5", + "map": "when.done" + } + ] + }, + { + "id": "Observation.issued", + "path": "Observation.issued", + "short": "Date/Time this was made available", + "definition": "The date and time this observation was made available to providers, typically after the results have been reviewed and verified.", + "comment": "Updated when the result is updated.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.issued", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" + }, + { + "identity": "rim", + "map": "participation[typeCode=AUT].time" + }, + { + "identity": "w5", + "map": "when.recorded" + } + ] + }, + { + "id": "Observation.performer", + "path": "Observation.performer", + "short": "The practioner is responsible for the observation", + "definition": "Who was responsible for asserting the observed value as \"true\".", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "requirements": "May give a degree of confidence in the observation and also indicates where follow-up questions should be directed.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.performer", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner", + "aggregation": [ + "referenced" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer" + }, + { + "identity": "v2", + "map": "OBX.15 / (Practitioner) OBX-16, PRT-5:PRT-4='RO' / (Device) OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization) OBX-23, PRT-8:PRT-4='PO'" + }, + { + "identity": "rim", + "map": "participation[typeCode=PRF]" + }, + { + "identity": "w5", + "map": "who.actor" + } + ] + }, + { + "id": "Observation.performer.id", + "path": "Observation.performer.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.performer.extension", + "path": "Observation.performer.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.performer.reference", + "path": "Observation.performer.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.performer.identifier", + "path": "Observation.performer.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.performer.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.performer.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity", + "path": "Observation.valueQuantity", + "sliceName": "valueQuantity", + "short": "CalculatedDAS28score", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text. A value set is bound to the ValueCodeableConcept element. For further discussion and examples see the [notes section](observation.html#notes) below.", + "requirements": "An observation exists to have a value, though it may not if it is in error, or if it represents a group of observations.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + } + ], + "condition": [ + "ele-1", + "obs-7" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "workflow", + "map": "Event.notDone, Event.notDoneReason (maps to valeu[x] or dataAbsentReason)" + }, + { + "identity": "sct-concept", + "map": "< 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.id", + "path": "Observation.valueQuantity.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.extension", + "path": "Observation.valueQuantity.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.value", + "path": "Observation.valueQuantity.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "minValueDecimal": 0, + "maxValueDecimal": 10, + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.comparator", + "path": "Observation.valueQuantity.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.valueQuantity.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.system", + "path": "Observation.valueQuantity.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.code", + "path": "Observation.valueQuantity.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.dataAbsentReason", + "path": "Observation.dataAbsentReason", + "short": "Why the result is missing", + "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing.", + "comment": "Null or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be \"detected\", \"not detected\", \"inconclusive\", or \"specimen unsatisfactory\". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0. Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.", + "requirements": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1", + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (Observation.value[x]) is missing.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.notDone, Event.notDoneReason (maps to valeu[x] or dataAbsentReason)" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.dataAbsentReason.id", + "path": "Observation.dataAbsentReason.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.dataAbsentReason.extension", + "path": "Observation.dataAbsentReason.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding", + "path": "Observation.dataAbsentReason.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.id", + "path": "Observation.dataAbsentReason.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.extension", + "path": "Observation.dataAbsentReason.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.system", + "path": "Observation.dataAbsentReason.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.version", + "path": "Observation.dataAbsentReason.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.code", + "path": "Observation.dataAbsentReason.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.dataAbsentReason.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.dataAbsentReason.coding.userSelected", + "path": "Observation.dataAbsentReason.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.dataAbsentReason.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.dataAbsentReason.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.interpretation", + "path": "Observation.interpretation", + "short": "High, low, normal, etc.", + "definition": "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "requirements": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.interpretation", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.interpretation.id", + "path": "Observation.interpretation.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.interpretation.extension", + "path": "Observation.interpretation.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.interpretation.coding", + "path": "Observation.interpretation.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.interpretation.coding.id", + "path": "Observation.interpretation.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.interpretation.coding.extension", + "path": "Observation.interpretation.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.interpretation.coding.system", + "path": "Observation.interpretation.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.interpretation.coding.version", + "path": "Observation.interpretation.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.interpretation.coding.code", + "path": "Observation.interpretation.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.interpretation.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.interpretation.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.interpretation.coding.userSelected", + "path": "Observation.interpretation.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.interpretation.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.interpretation.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.comment", + "path": "Observation.comment", + "short": "Comments about result", + "definition": "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.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to provide free text additional information.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.comment", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.note" + }, + { + "identity": "v2", + "map": "NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" + }, + { + "identity": "rim", + "map": "subjectOf.observationEvent[code=\"annotation\"].value" + } + ] + }, + { + "id": "Observation.bodySite", + "path": "Observation.bodySite", + "short": "Observed body part", + "definition": "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + "comment": "Only used if not implicit in code found in Observation.code. In many systems, this may be represented as a related observation instead of an inline component. If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).", + "min": 0, + "max": "0", + "base": { + "path": "Observation.bodySite", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "BodySite" + } + ], + "strength": "example", + "description": "Codes describing anatomical locations. May include laterality.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/body-site" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 123037004 |Body structure|" + }, + { + "identity": "v2", + "map": "OBX-20" + }, + { + "identity": "rim", + "map": "targetSiteCode" + }, + { + "identity": "sct-attr", + "map": "718497002 |Inherent location|" + } + ] + }, + { + "id": "Observation.bodySite.id", + "path": "Observation.bodySite.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.bodySite.extension", + "path": "Observation.bodySite.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.bodySite.coding", + "path": "Observation.bodySite.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.bodySite.coding.id", + "path": "Observation.bodySite.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.bodySite.coding.extension", + "path": "Observation.bodySite.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.bodySite.coding.system", + "path": "Observation.bodySite.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.bodySite.coding.version", + "path": "Observation.bodySite.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.bodySite.coding.code", + "path": "Observation.bodySite.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.bodySite.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.bodySite.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.bodySite.coding.userSelected", + "path": "Observation.bodySite.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.bodySite.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.bodySite.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.method", + "path": "Observation.method", + "short": "How it was done", + "definition": "Indicates the mechanism used to perform the observation.", + "comment": "Only used if not implicit in code for Observation.code.", + "requirements": "In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.method", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationMethod" + } + ], + "strength": "example", + "description": "Methods for simple observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-methods" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "OBX-17" + }, + { + "identity": "rim", + "map": "methodCode" + } + ] + }, + { + "id": "Observation.method.id", + "path": "Observation.method.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.method.extension", + "path": "Observation.method.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.method.coding", + "path": "Observation.method.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.method.coding.id", + "path": "Observation.method.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.method.coding.extension", + "path": "Observation.method.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.method.coding.system", + "path": "Observation.method.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.method.coding.version", + "path": "Observation.method.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.method.coding.code", + "path": "Observation.method.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.method.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.method.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.method.coding.userSelected", + "path": "Observation.method.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.method.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.method.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.specimen", + "path": "Observation.specimen", + "short": "Specimen used for this observation", + "definition": "The specimen that was used when this observation was made.", + "comment": "Should only be used if not implicit in code found in `Observation.code`. Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).", + "min": 0, + "max": "1", + "base": { + "path": "Observation.specimen", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "sct-concept", + "map": "< 123038009 |Specimen|" + }, + { + "identity": "v2", + "map": "SPM segment" + }, + { + "identity": "rim", + "map": "participation[typeCode=SPC].specimen" + }, + { + "identity": "sct-attr", + "map": "704319004 |Inherent in|" + } + ] + }, + { + "id": "Observation.specimen.id", + "path": "Observation.specimen.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.specimen.extension", + "path": "Observation.specimen.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.specimen.reference", + "path": "Observation.specimen.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.specimen.identifier", + "path": "Observation.specimen.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.specimen.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.specimen.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.device", + "path": "Observation.device", + "short": "(Measurement) Device", + "definition": "The device used to generate the observation data.", + "comment": "An extension should be used if further typing of the device is needed. Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.", + "min": 0, + "max": "0", + "base": { + "path": "Observation.device", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device" + }, + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "sct-concept", + "map": "< 49062001 |Device|" + }, + { + "identity": "v2", + "map": "OBX-17 / PRT -10" + }, + { + "identity": "rim", + "map": "participation[typeCode=DEV]" + }, + { + "identity": "sct-attr", + "map": "424226004 |Using device|" + } + ] + }, + { + "id": "Observation.device.id", + "path": "Observation.device.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.device.extension", + "path": "Observation.device.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.device.reference", + "path": "Observation.device.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.device.identifier", + "path": "Observation.device.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.device.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.device.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange", + "path": "Observation.referenceRange", + "short": "Provides guide for interpretation", + "definition": "Guidance on how to interpret the value by comparison to a normal or recommended range.", + "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.", + "requirements": "Knowing what values are considered \"normal\" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.referenceRange", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "obs-3", + "severity": "error", + "human": "Must have at least a low or a high or text", + "expression": "low.exists() or high.exists() or text.exists()", + "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.referenceRange.id", + "path": "Observation.referenceRange.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.extension", + "path": "Observation.referenceRange.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.modifierExtension", + "path": "Observation.referenceRange.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.low", + "path": "Observation.referenceRange.low", + "short": "Low Range, if relevant", + "definition": "The value of the low bound of the reference range. The low bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the low bound is omitted, it is assumed to be meaningless (e.g. reference range is <=2.3).", + "comment": "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.low", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + } + ], + "condition": [ + "ele-1", + "obs-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + }, + { + "key": "sqty-1", + "severity": "error", + "human": "The comparator is not used on a SimpleQuantity", + "expression": "comparator.empty()", + "xpath": "not(exists(f:comparator))" + } + ], + "isModifier": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:IVL_PQ.low" + } + ] + }, + { + "id": "Observation.referenceRange.low.id", + "path": "Observation.referenceRange.low.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.low.extension", + "path": "Observation.referenceRange.low.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.low.value", + "path": "Observation.referenceRange.low.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.referenceRange.low.comparator", + "path": "Observation.referenceRange.low.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "Not allowed to be used in this context", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "0", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.referenceRange.low.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.low.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.referenceRange.low.system", + "path": "Observation.referenceRange.low.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.low.code", + "path": "Observation.referenceRange.low.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.referenceRange.high", + "path": "Observation.referenceRange.high", + "short": "High Range, if relevant", + "definition": "The value of the high bound of the reference range. The high bound of the reference range endpoint is inclusive of the value (e.g. reference range is >=5 - <=9). If the high bound is omitted, it is assumed to be meaningless (e.g. reference range is >= 2.3).", + "comment": "The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.high", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + } + ], + "condition": [ + "ele-1", + "obs-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + }, + { + "key": "sqty-1", + "severity": "error", + "human": "The comparator is not used on a SimpleQuantity", + "expression": "comparator.empty()", + "xpath": "not(exists(f:comparator))" + } + ], + "isModifier": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:IVL_PQ.high" + } + ] + }, + { + "id": "Observation.referenceRange.high.id", + "path": "Observation.referenceRange.high.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.high.extension", + "path": "Observation.referenceRange.high.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.high.value", + "path": "Observation.referenceRange.high.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.referenceRange.high.comparator", + "path": "Observation.referenceRange.high.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "Not allowed to be used in this context", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "0", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.referenceRange.high.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.high.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.referenceRange.high.system", + "path": "Observation.referenceRange.high.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.high.code", + "path": "Observation.referenceRange.high.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.referenceRange.type", + "path": "Observation.referenceRange.type", + "short": "Reference range qualifier", + "definition": "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", + "comment": "This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed.", + "requirements": "Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc, - for proper interpretation.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationRangeMeaning" + } + ], + "strength": "extensible", + "description": "Code for the meaning of a reference range.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values| OR \r< 365860008 |General clinical state finding| \rOR \r< 250171008 |Clinical history or observation findings| OR \r< 415229000 |Racial group| OR \r< 365400002 |Finding of puberty stage| OR\r< 443938003 |Procedure carried out on subject|" + }, + { + "identity": "v2", + "map": "OBX-10" + }, + { + "identity": "rim", + "map": "interpretationCode" + } + ] + }, + { + "id": "Observation.referenceRange.type.id", + "path": "Observation.referenceRange.type.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.type.extension", + "path": "Observation.referenceRange.type.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding", + "path": "Observation.referenceRange.type.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.id", + "path": "Observation.referenceRange.type.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.extension", + "path": "Observation.referenceRange.type.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.system", + "path": "Observation.referenceRange.type.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.version", + "path": "Observation.referenceRange.type.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.code", + "path": "Observation.referenceRange.type.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.type.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.referenceRange.type.coding.userSelected", + "path": "Observation.referenceRange.type.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.referenceRange.type.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.type.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo", + "path": "Observation.referenceRange.appliesTo", + "short": "Reference range population", + "definition": "Codes to indicate the target population this reference range applies to. For example, a reference range may be based on the normal population or a particular sex or race.", + "comment": "This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed.", + "requirements": "Need to be able to identify the target population for proper interpretation.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.referenceRange.appliesTo", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationRangeType" + } + ], + "strength": "example", + "description": "Codes identifying the population the reference range applies to.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values| OR \r< 365860008 |General clinical state finding| \rOR \r< 250171008 |Clinical history or observation findings| OR \r< 415229000 |Racial group| OR \r< 365400002 |Finding of puberty stage| OR\r< 443938003 |Procedure carried out on subject|" + }, + { + "identity": "v2", + "map": "OBX-10" + }, + { + "identity": "rim", + "map": "interpretationCode" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.id", + "path": "Observation.referenceRange.appliesTo.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.extension", + "path": "Observation.referenceRange.appliesTo.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding", + "path": "Observation.referenceRange.appliesTo.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.id", + "path": "Observation.referenceRange.appliesTo.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.extension", + "path": "Observation.referenceRange.appliesTo.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.system", + "path": "Observation.referenceRange.appliesTo.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.version", + "path": "Observation.referenceRange.appliesTo.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.code", + "path": "Observation.referenceRange.appliesTo.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.appliesTo.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.coding.userSelected", + "path": "Observation.referenceRange.appliesTo.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.appliesTo.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.referenceRange.age", + "path": "Observation.referenceRange.age", + "short": "Applicable age range, if relevant", + "definition": "The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so.", + "comment": "The stated low and high value are assumed to have arbitrarily high precision when it comes to determining which values are in the range. I.e. 1.99 is not in the range 2 -> 3.", + "requirements": "Some analytes vary greatly over age.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.age", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Range" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "rng-2", + "severity": "error", + "human": "If present, low SHALL have a lower value than high", + "expression": "low.empty() or high.empty() or (low <= high)", + "xpath": "not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value))" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "NR and also possibly SN (but see also quantity)" + }, + { + "identity": "rim", + "map": "IVL<QTY[not(type=\"TS\")]> [lowClosed=\"true\" and highClosed=\"true\"]or URG<QTY[not(type=\"TS\")]>" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=PRCN].targetObservationCriterion[code=\"age\"].value" + } + ] + }, + { + "id": "Observation.referenceRange.age.id", + "path": "Observation.referenceRange.age.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.age.extension", + "path": "Observation.referenceRange.age.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.age.low", + "path": "Observation.referenceRange.age.low", + "short": "Low limit", + "definition": "The low limit. The boundary is inclusive.", + "comment": "If the low element is missing, the low boundary is not known.", + "min": 0, + "max": "1", + "base": { + "path": "Range.low", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + } + ], + "condition": [ + "ele-1", + "rng-2" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + }, + { + "key": "sqty-1", + "severity": "error", + "human": "The comparator is not used on a SimpleQuantity", + "expression": "comparator.empty()", + "xpath": "not(exists(f:comparator))" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "v2", + "map": "NR.1" + }, + { + "identity": "rim", + "map": "./low" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.id", + "path": "Observation.referenceRange.age.low.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.extension", + "path": "Observation.referenceRange.age.low.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.value", + "path": "Observation.referenceRange.age.low.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.comparator", + "path": "Observation.referenceRange.age.low.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "Not allowed to be used in this context", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "0", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.age.low.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.system", + "path": "Observation.referenceRange.age.low.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.age.low.code", + "path": "Observation.referenceRange.age.low.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.referenceRange.age.high", + "path": "Observation.referenceRange.age.high", + "short": "High limit", + "definition": "The high limit. The boundary is inclusive.", + "comment": "If the high element is missing, the high boundary is not known.", + "min": 0, + "max": "1", + "base": { + "path": "Range.high", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + } + ], + "condition": [ + "ele-1", + "rng-2" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + }, + { + "key": "sqty-1", + "severity": "error", + "human": "The comparator is not used on a SimpleQuantity", + "expression": "comparator.empty()", + "xpath": "not(exists(f:comparator))" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "v2", + "map": "NR.2" + }, + { + "identity": "rim", + "map": "./high" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.id", + "path": "Observation.referenceRange.age.high.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.extension", + "path": "Observation.referenceRange.age.high.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.value", + "path": "Observation.referenceRange.age.high.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.comparator", + "path": "Observation.referenceRange.age.high.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "Not allowed to be used in this context", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "0", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.referenceRange.age.high.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.system", + "path": "Observation.referenceRange.age.high.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.referenceRange.age.high.code", + "path": "Observation.referenceRange.age.high.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.referenceRange.text", + "path": "Observation.referenceRange.text", + "short": "Text based reference range in an observation", + "definition": "Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation. An example would be a reference value of \"Negative\" or a list or table of 'normals'.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:ST" + } + ] + }, + { + "id": "Observation.related", + "path": "Observation.related", + "short": "Resource related to this observation", + "definition": "A reference to another resource (usually another Observation) whose relationship is defined by the relationship type code.", + "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).", + "requirements": "Normally, an observation will have either a value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and a set of related observations or sometimes a QuestionnaireResponse from which the measure is derived.", + "min": 0, + "max": "56", + "base": { + "path": "Observation.related", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Relationships established by OBX-4 usage" + }, + { + "identity": "rim", + "map": "outBoundRelationship" + } + ] + }, + { + "id": "Observation.related.id", + "path": "Observation.related.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.related.extension", + "path": "Observation.related.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.related.modifierExtension", + "path": "Observation.related.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.related.type", + "path": "Observation.related.type", + "short": "has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by", + "definition": "A code specifying the kind of relationship that exists with the target resource.", + "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.", + "requirements": "A relationship type SHOULD be provided.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.related.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationRelationshipType" + } + ], + "strength": "required", + "description": "Codes specifying how two observations are related.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": ".typeCode" + } + ] + }, + { + "id": "Observation.related.target", + "path": "Observation.related.target", + "short": "Resource that is related to this one", + "definition": "A reference to the observation or [QuestionnaireResponse](questionnaireresponse.html#) resource that is related to this observation.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.related.target", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": "http://aauprofiles/StructureDefinition/JointSymptomsObservation", + "aggregation": [ + "contained" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "rim", + "map": ".targetObservation" + } + ] + }, + { + "id": "Observation.related.target.id", + "path": "Observation.related.target.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.related.target.extension", + "path": "Observation.related.target.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.related.target.reference", + "path": "Observation.related.target.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.related.target.identifier", + "path": "Observation.related.target.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Observation.related.target.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.related.target.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component", + "path": "Observation.component", + "slicing": { + "discriminator": [ + { + "type": "type", + "path": "code.coding.code" + } + ], + "rules": "open" + }, + "short": "Component results", + "definition": "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", + "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.", + "requirements": "Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.component", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "containment by OBX-4?" + }, + { + "identity": "rim", + "map": "outBoundRelationship[typeCode=COMP]" + } + ] + }, + { + "id": "Observation.component.id", + "path": "Observation.component.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.extension", + "path": "Observation.component.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.modifierExtension", + "path": "Observation.component.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.code", + "path": "Observation.component.code", + "short": "Type of component observation (code / type)", + "definition": "Describes what was observed. Sometimes this is called the observation \"code\".", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "requirements": "Knowing what kind of observation is being made is essential to understanding the observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-codes" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR \r< 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + }, + { + "identity": "w5", + "map": "what" + } + ] + }, + { + "id": "Observation.component.code.id", + "path": "Observation.component.code.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.code.extension", + "path": "Observation.component.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.code.coding", + "path": "Observation.component.code.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component.code.coding.id", + "path": "Observation.component.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.code.coding.extension", + "path": "Observation.component.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.code.coding.system", + "path": "Observation.component.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component.code.coding.version", + "path": "Observation.component.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component.code.coding.code", + "path": "Observation.component.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component.code.coding.userSelected", + "path": "Observation.component.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component.value[x]", + "path": "Observation.component.value[x]", + "short": "Actual component result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\"). The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).", + "requirements": "An observation exists to have a value, though it may not if it is in error, or if it represents a group of observations.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + }, + { + "code": "CodeableConcept" + }, + { + "code": "string" + }, + { + "code": "Range" + }, + { + "code": "Ratio" + }, + { + "code": "SampledData" + }, + { + "code": "Attachment" + }, + { + "code": "time" + }, + { + "code": "dateTime" + }, + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "sct-concept", + "map": "363714003 |Interprets| < 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason", + "path": "Observation.component.dataAbsentReason", + "short": "Why the component result is missing", + "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing.", + "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be \"detected\", \"not detected\", \"inconclusive\", or \"test not done\". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values.", + "requirements": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1", + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (Observation.value[x]) is missing.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.id", + "path": "Observation.component.dataAbsentReason.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.extension", + "path": "Observation.component.dataAbsentReason.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding", + "path": "Observation.component.dataAbsentReason.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.id", + "path": "Observation.component.dataAbsentReason.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.extension", + "path": "Observation.component.dataAbsentReason.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.system", + "path": "Observation.component.dataAbsentReason.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.version", + "path": "Observation.component.dataAbsentReason.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.code", + "path": "Observation.component.dataAbsentReason.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.coding.userSelected", + "path": "Observation.component.dataAbsentReason.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component.interpretation", + "path": "Observation.component.interpretation", + "short": "High, low, normal, etc.", + "definition": "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", + "comment": "The component interpretation applies only to the individual component value. For an overall interpretation all components together use thes Observation.interpretation element.", + "requirements": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.interpretation", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.component.interpretation.id", + "path": "Observation.component.interpretation.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.interpretation.extension", + "path": "Observation.component.interpretation.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.interpretation.coding", + "path": "Observation.component.interpretation.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.id", + "path": "Observation.component.interpretation.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.extension", + "path": "Observation.component.interpretation.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.system", + "path": "Observation.component.interpretation.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.version", + "path": "Observation.component.interpretation.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.code", + "path": "Observation.component.interpretation.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component.interpretation.coding.userSelected", + "path": "Observation.component.interpretation.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component.interpretation.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component.referenceRange", + "path": "Observation.component.referenceRange", + "short": "Provides guide for interpretation of component result", + "definition": "Guidance on how to interpret the value by comparison to a normal or recommended range.", + "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.", + "requirements": "Knowing what values are considered \"normal\" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.component.referenceRange", + "min": 0, + "max": "*" + }, + "contentReference": "#Observation.referenceRange", + "mapping": [ + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.component:CRP", + "path": "Observation.component", + "sliceName": "CRP", + "short": "Component results", + "definition": "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", + "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.", + "requirements": "Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "containment by OBX-4?" + }, + { + "identity": "rim", + "map": "outBoundRelationship[typeCode=COMP]" + } + ] + }, + { + "id": "Observation.component:CRP.id", + "path": "Observation.component.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.extension", + "path": "Observation.component.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.modifierExtension", + "path": "Observation.component.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.code", + "path": "Observation.component.code", + "short": "Type of component observation (code / type)", + "definition": "Describes what was observed. Sometimes this is called the observation \"code\".", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "requirements": "Knowing what kind of observation is being made is essential to understanding the observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-codes" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR \r< 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + }, + { + "identity": "w5", + "map": "what" + } + ] + }, + { + "id": "Observation.component:CRP.code.id", + "path": "Observation.component.code.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.code.extension", + "path": "Observation.component.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding", + "path": "Observation.component.code.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.id", + "path": "Observation.component.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.extension", + "path": "Observation.component.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.system", + "path": "Observation.component.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://snomed.info/sct", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.version", + "path": "Observation.component.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.code", + "path": "Observation.component.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "55235003", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:CRP.code.coding.userSelected", + "path": "Observation.component.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:CRP.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity", + "path": "Observation.component.valueQuantity", + "sliceName": "valueQuantity", + "short": "Actual component result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\"). The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).", + "requirements": "An observation exists to have a value, though it may not if it is in error, or if it represents a group of observations.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "sct-concept", + "map": "363714003 |Interprets| < 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity.id", + "path": "Observation.component.valueQuantity.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity.extension", + "path": "Observation.component.valueQuantity.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity.value", + "path": "Observation.component.valueQuantity.value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).", + "requirements": "Precision is handled implicitly in almost all cases of measurement.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity.comparator", + "path": "Observation.component.valueQuantity.comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.", + "comment": "This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isModifier": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.valueQuantity.unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "fixedString": "mg/L", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.system", + "path": "Observation.component.valueQuantity.system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://unitsofmeasssure.org", + "condition": [ + "ele-1", + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.code", + "path": "Observation.component.valueQuantity.code", + "short": "Coded form of the unit", + "definition": "A computer processable form of the unit in some unit representation system.", + "comment": "The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.", + "requirements": "Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "mg/L", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason", + "path": "Observation.component.dataAbsentReason", + "short": "Why the component result is missing", + "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing.", + "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be \"detected\", \"not detected\", \"inconclusive\", or \"test not done\". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values.", + "requirements": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1", + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (Observation.value[x]) is missing.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.id", + "path": "Observation.component.dataAbsentReason.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.extension", + "path": "Observation.component.dataAbsentReason.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding", + "path": "Observation.component.dataAbsentReason.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.id", + "path": "Observation.component.dataAbsentReason.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.extension", + "path": "Observation.component.dataAbsentReason.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.system", + "path": "Observation.component.dataAbsentReason.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.version", + "path": "Observation.component.dataAbsentReason.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.code", + "path": "Observation.component.dataAbsentReason.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.coding.userSelected", + "path": "Observation.component.dataAbsentReason.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:CRP.dataAbsentReason.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation", + "path": "Observation.component.interpretation", + "short": "High, low, normal, etc.", + "definition": "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", + "comment": "The component interpretation applies only to the individual component value. For an overall interpretation all components together use thes Observation.interpretation element.", + "requirements": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.interpretation", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.id", + "path": "Observation.component.interpretation.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.extension", + "path": "Observation.component.interpretation.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding", + "path": "Observation.component.interpretation.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.id", + "path": "Observation.component.interpretation.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.extension", + "path": "Observation.component.interpretation.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.system", + "path": "Observation.component.interpretation.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.version", + "path": "Observation.component.interpretation.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.code", + "path": "Observation.component.interpretation.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.coding.userSelected", + "path": "Observation.component.interpretation.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:CRP.interpretation.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:CRP.referenceRange", + "path": "Observation.component.referenceRange", + "short": "Provides guide for interpretation of component result", + "definition": "Guidance on how to interpret the value by comparison to a normal or recommended range.", + "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.", + "requirements": "Knowing what values are considered \"normal\" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.component.referenceRange", + "min": 0, + "max": "*" + }, + "contentReference": "#Observation.referenceRange", + "mapping": [ + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.component:GeneralHealth", + "path": "Observation.component", + "sliceName": "GeneralHealth", + "short": "Component results", + "definition": "Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.", + "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.", + "requirements": "Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable). However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "containment by OBX-4?" + }, + { + "identity": "rim", + "map": "outBoundRelationship[typeCode=COMP]" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.id", + "path": "Observation.component.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.extension", + "path": "Observation.component.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.modifierExtension", + "path": "Observation.component.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "isModifier": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code", + "path": "Observation.component.code", + "short": "Type of component observation (code / type)", + "definition": "Describes what was observed. Sometimes this is called the observation \"code\".", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "requirements": "Knowing what kind of observation is being made is essential to understanding the observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-codes" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR \r< 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + }, + { + "identity": "w5", + "map": "what" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.id", + "path": "Observation.component.code.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.extension", + "path": "Observation.component.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding", + "path": "Observation.component.code.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.id", + "path": "Observation.component.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.extension", + "path": "Observation.component.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.system", + "path": "Observation.component.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://snomed.info/sct", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.version", + "path": "Observation.component.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.code", + "path": "Observation.component.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "446661009", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "fixedString": "Visual analog scale score", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.coding.userSelected", + "path": "Observation.component.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.value[x]:valueQuantity", + "path": "Observation.component.valueQuantity", + "sliceName": "valueQuantity", + "short": "Actual component result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value. For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\"). The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).", + "requirements": "An observation exists to have a value, though it may not if it is in error, or if it represents a group of observations.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "qty-3", + "severity": "error", + "human": "If a code for the unit is present, the system SHALL also be present", + "expression": "code.empty() or system.exists()", + "xpath": "not(exists(f:code)) or exists(f:system)" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "SN (see also Range) or CQ" + }, + { + "identity": "rim", + "map": "PQ, IVL<PQ>, MO, CO, depending on the values" + }, + { + "identity": "sct-concept", + "map": "363714003 |Interprets| < 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason", + "path": "Observation.component.dataAbsentReason", + "short": "Why the component result is missing", + "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing.", + "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations. One way is to simply include them in the value set and represent the exceptions in the value. For example, measurement values for a serology test could be \"detected\", \"not detected\", \"inconclusive\", or \"test not done\". The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values. For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Because of these options, use-case agreements are required to interpret general observations for exceptional values.", + "requirements": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1", + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (Observation.value[x]) is missing.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.id", + "path": "Observation.component.dataAbsentReason.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.extension", + "path": "Observation.component.dataAbsentReason.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding", + "path": "Observation.component.dataAbsentReason.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.id", + "path": "Observation.component.dataAbsentReason.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.extension", + "path": "Observation.component.dataAbsentReason.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.system", + "path": "Observation.component.dataAbsentReason.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.version", + "path": "Observation.component.dataAbsentReason.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.code", + "path": "Observation.component.dataAbsentReason.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.coding.userSelected", + "path": "Observation.component.dataAbsentReason.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.dataAbsentReason.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.dataAbsentReason.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation", + "path": "Observation.component.interpretation", + "short": "High, low, normal, etc.", + "definition": "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", + "comment": "The component interpretation applies only to the individual component value. For an overall interpretation all components together use thes Observation.interpretation element.", + "requirements": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.interpretation", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSetReference": { + "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation" + } + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.id", + "path": "Observation.component.interpretation.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.extension", + "path": "Observation.component.interpretation.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding", + "path": "Observation.component.interpretation.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.id", + "path": "Observation.component.interpretation.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "xml:id (or equivalent in JSON)", + "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.extension", + "path": "Observation.component.interpretation.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional Content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension.", + "comment": "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 level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.system", + "path": "Observation.component.interpretation.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.version", + "path": "Observation.component.interpretation.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.code", + "path": "Observation.component.interpretation.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings may not exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.coding.userSelected", + "path": "Observation.component.interpretation.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.interpretation.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.interpretation.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() | (children().count() > id.count())", + "xpath": "@value|f:*|h:div" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.component:GeneralHealth.referenceRange", + "path": "Observation.component.referenceRange", + "short": "Provides guide for interpretation of component result", + "definition": "Guidance on how to interpret the value by comparison to a normal or recommended range.", + "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.", + "requirements": "Knowing what values are considered \"normal\" can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.component.referenceRange", + "min": 0, + "max": "*" + }, + "contentReference": "#Observation.referenceRange", + "mapping": [ + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + } + ] + }, + "differential": { + "element": [ + { + "id": "Observation.code.coding.system", + "path": "Observation.code.coding.system", + "fixedUri": "http://snomed.info/sct" + }, + { + "id": "Observation.code.coding.code", + "path": "Observation.code.coding.code", + "fixedCode": "444060007" + }, + { + "id": "Observation.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.coding.display", + "fixedString": "Disease activity score in rheumatoid arthritis using C-reactive protein (observable entity)" + }, + { + "id": "Observation.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.text", + "short": "DAS28 Observable" + }, + { + "id": "Observation.subject", + "path": "Observation.subject", + "short": "Observation of Danish patient", + "min": 1, + "type": [ + { + "code": "Reference", + "targetProfile": "http://AAUprofiles/StructureDefinition/DanishPatient", + "aggregation": [ + "referenced" + ] + } + ] + }, + { + "id": "Observation.performer", + "path": "Observation.performer", + "short": "The practioner is responsible for the observation", + "min": 1, + "max": "1", + "type": [ + { + "code": "Reference", + "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner", + "aggregation": [ + "referenced" + ] + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity", + "path": "Observation.valueQuantity", + "sliceName": "valueQuantity", + "short": "CalculatedDAS28score", + "min": 1, + "type": [ + { + "code": "Quantity" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.value", + "path": "Observation.valueQuantity.value", + "minValueDecimal": 0, + "maxValueDecimal": 10 + }, + { + "id": "Observation.bodySite", + "path": "Observation.bodySite", + "max": "0" + }, + { + "id": "Observation.device", + "path": "Observation.device", + "max": "0" + }, + { + "id": "Observation.related", + "path": "Observation.related", + "max": "56" + }, + { + "id": "Observation.related.target", + "path": "Observation.related.target", + "type": [ + { + "code": "Reference", + "targetProfile": "http://aauprofiles/StructureDefinition/JointSymptomsObservation", + "aggregation": [ + "contained" + ] + } + ] + }, + { + "id": "Observation.component", + "path": "Observation.component", + "slicing": { + "discriminator": [ + { + "type": "type", + "path": "code.coding.code" + } + ], + "rules": "open" + } + }, + { + "id": "Observation.component:CRP", + "path": "Observation.component", + "sliceName": "CRP", + "min": 1, + "max": "1" + }, + { + "id": "Observation.component:CRP.code.coding.system", + "path": "Observation.component.code.coding.system", + "fixedUri": "http://snomed.info/sct" + }, + { + "id": "Observation.component:CRP.code.coding.code", + "path": "Observation.component.code.coding.code", + "fixedCode": "55235003" + }, + { + "id": "Observation.component:CRP.value[x]:valueQuantity", + "path": "Observation.component.valueQuantity", + "sliceName": "valueQuantity", + "type": [ + { + "code": "Quantity" + } + ] + }, + { + "id": "valueQuantity:valueQuantity.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.valueQuantity.unit", + "fixedString": "mg/L" + }, + { + "id": "valueQuantity:valueQuantity.system", + "path": "Observation.component.valueQuantity.system", + "fixedUri": "http://unitsofmeasssure.org" + }, + { + "id": "valueQuantity:valueQuantity.code", + "path": "Observation.component.valueQuantity.code", + "fixedCode": "mg/L" + }, + { + "id": "Observation.component:GeneralHealth", + "path": "Observation.component", + "sliceName": "GeneralHealth", + "min": 1, + "max": "1" + }, + { + "id": "Observation.component:GeneralHealth.code.coding.system", + "path": "Observation.component.code.coding.system", + "fixedUri": "http://snomed.info/sct" + }, + { + "id": "Observation.component:GeneralHealth.code.coding.code", + "path": "Observation.component.code.coding.code", + "fixedCode": "446661009" + }, + { + "id": "Observation.component:GeneralHealth.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.component.code.coding.display", + "fixedString": "Visual analog scale score" + }, + { + "id": "Observation.component:GeneralHealth.value[x]:valueQuantity", + "path": "Observation.component.valueQuantity", + "sliceName": "valueQuantity", + "type": [ + { + "code": "Quantity" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type-profile.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type-profile.xml new file mode 100644 index 000000000..8e6c5eae1 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type-profile.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="slice-by-polymorphic-type"/> + <url value="http://hl7.org/fhir/StructureDefinition/slice-by-polymorphic-type"/> + <name value="Test slicing by polymorphic type"/> + <status value="draft"/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Communication"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication"/> + <derivation value="constraint"/> + <snapshot> + <element id="Communication"> + <path value="Communication"/> + </element> + <element id="Communication.payload"> + <path value="Communication.payload"/> + <slicing> + <discriminator> + <type value="type"/> + <path value="content"/> + </discriminator> + <rules value="closed"/> + </slicing> + </element> + <element id="Communication.payload:string"> + <path value="Communication.payload"/> + <sliceName value="string"/> + <max value="1"/> + </element> + <element id="Communication.payload:string.contentString"> + <path value="Communication.payload.contentString"/> + <comment value="Foo"/> + <min value="1"/> + <type> + <code value="string"/> + </type> + </element> + <element id="Communication.payload:attachment"> + <path value="Communication.payload"/> + <sliceName value="attachment"/> + <max value="20"/> + </element> + <element id="Communication.payload:attachment.contentAttachment"> + <path value="Communication.payload.contentAttachment"/> + <comment value="Bar"/> + <min value="1"/> + <type> + <code value="Attachment"/> + </type> + </element> + </snapshot> + <differential> + <element id="Communication"> + <path value="Communication"/> + </element> + <element id="Communication.payload"> + <path value="Communication.payload"/> + <slicing> + <discriminator> + <type value="type"/> + <path value="content"/> + </discriminator> + <rules value="closed"/> + </slicing> + </element> + <element id="Communication.payload:string"> + <path value="Communication.payload"/> + <sliceName value="string"/> + <max value="1"/> + </element> + <element id="Communication.payload:string.contentString"> + <path value="Communication.payload.contentString"/> + <comment value="Foo"/> + <min value="1"/> + <type> + <code value="string"/> + </type> + </element> + <element id="Communication.payload:attachment"> + <path value="Communication.payload"/> + <sliceName value="attachment"/> + <max value="20"/> + </element> + <element id="Communication.payload:attachment.contentAttachment"> + <path value="Communication.payload.contentAttachment"/> + <comment value="Bar"/> + <min value="1"/> + <type> + <code value="Attachment"/> + </type> + </element> + </differential> +</StructureDefinition> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type.xml new file mode 100644 index 000000000..7badb61ad --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-by-polymorphic-type.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Communication xmlns="http://hl7.org/fhir"> + <status value="completed"/> + <payload> + <contentString value="someString"/> + </payload> + <payload> + <contentAttachment> + <title value="someAttachment"/> + </contentAttachment> + </payload> +</Communication> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-patient.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-patient.xml new file mode 100644 index 000000000..c63361b7c --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-patient.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Patient xmlns="http://hl7.org/fhir"> + <!-- Simple example to test validation against --> + <id value="slice-profile-and-local-patient"/> + <identifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203"/> + <code value="MR"/> + </coding> + </type> + </identifier> +</Patient> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-profile.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-profile.xml new file mode 100644 index 000000000..757697b96 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slice-profile-and-local-profile.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="slice-profile-and-local-profile"/> + <url value="http://hl7.org/fhir/StructureDefinition/slice-profile-and-local-profile"/> + <name value="slice-profile-and-local-profile"/> + <status value="draft"/> + <description value="Profile to test validation when slice has both a profile declaration and local constraints"/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Patient"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/> + <derivation value="constraint"/> + <differential> + <element id="Patient"> + <path value="Patient"/> + </element> + <element id="Patient.identifier"> + <path value="Patient.identifier"/> + <slicing> + <discriminator> + <type value="value"/> + <path value="type.coding.system"/> + </discriminator> + <discriminator> + <type value="value"/> + <path value="type.coding.code"/> + </discriminator> + <rules value="open"/> + </slicing> + </element> + <element id="Patient.identifier:foo"> + <path value="Patient.identifier"/> + <sliceName value="foo"/> + <min value="1"/> + <type> + <code value="Identifier"/> + <!-- This profile isn't actually declaring anything new - but it's enough for test purposes. In practice, it would point to something useful --> + <profile value="http://hl7.org/fhir/StructureDefinition/Identifier"/> + </type> + </element> + <element id="Patient.identifier:foo.type"> + <path value="Patient.identifier.type"/> + </element> + <element id="Patient.identifier:foo.type.coding"> + <path value="Patient.identifier.type.coding"/> + </element> + <element id="Patient.identifier:foo.type.coding.system"> + <path value="Patient.identifier.type.coding.system"/> + <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203"/> + </element> + <element id="Patient.identifier:foo.type.coding.code"> + <path value="Patient.identifier.type.coding.code"/> + <fixedUri value="MR"/> + </element> + </differential> +</StructureDefinition> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string-profile.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string-profile.xml new file mode 100644 index 000000000..ca646b1e5 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string-profile.xml @@ -0,0 +1,48 @@ +<StructureDefinition xmlns="http://hl7.org/fhir"> + <id value="CCDA-on-FHIR-Referral-Note"/> + <url value="http://hl7.org/fhir/ccda/StructureDefinition/slicing-types-by-string-profile"/> + <name value="Test of slicing by type with string"/> + <status value="draft"/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Communication"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication"/> + <derivation value="constraint"/> + <differential> + <element> + <path value="Communication"/> + </element> + <element> + <path value="Communication.payload"/> + <slicing> + <discriminator> + <type value="type"/> + <path value="content"/> + </discriminator> + <rules value="closed"/> + </slicing> + </element> + <element> + <path value="Communication.payload"/> + <sliceName value="string"/> + </element> + <element> + <path value="Communication.payload.contentString"/> + <min value="1"/> + <type> + <code value="string"/> + </type> + </element> + <element> + <path value="Communication.payload"/> + <sliceName value="attachment"/> + <max value="10"/> + </element> + <element> + <path value="Communication.payload.contentAttachment"/> + <type> + <code value="Attachment"/> + </type> + </element> + </differential> +</StructureDefinition> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string.xml new file mode 100644 index 000000000..3c09943a6 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/slicing-types-by-string.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<Communication xmlns="http://hl7.org/fhir"> + <status value="in-progress"/> + <payload> + <contentString value="test"/> + </payload> + <payload> + <contentAttachment> + <title value="some title"/> + </contentAttachment> + </payload> + <payload> + <contentAttachment> + <title value="some other title"/> + </contentAttachment> + </payload> +</Communication> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-example.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-example.xml new file mode 100644 index 000000000..286935c37 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-example.xml @@ -0,0 +1,15 @@ +<Parameters xmlns="http://hl7.org/fhir"> + <parameter> + <name value="string"/> + <valueString value="ccc"> + <extension url="http://hl7.org/fhir/StructureDefinition/translation"> + <extension url="lang"> + <valueCode value="en"/> + </extension> + <extension url="content"> + <valueString value="ddd"/> + </extension> + </extension> + </valueString> + </parameter> +</Parameters> \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-profile.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-profile.xml new file mode 100644 index 000000000..cbf4b69f2 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/string-extensions-and-constraints-profile.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<StructureDefinition xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../schema/fhir-single.xsd"> + <id value="string-extensions-and-constraints"/> + <url value="http://hl7.org/fhir/StructureDefinition/string-extensions-and-constraints"/> + <name value="Test extensions and constraints on strings to make sure that local constraints are enforced on simple types"/> + <status value="draft"/> + <kind value="resource"/> + <abstract value="false"/> + <type value="Parameters"/> + <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Parameters"/> + <derivation value="constraint"/> + <differential> + <element id="Parameters"> + <path value="Parameters"/> + </element> + <element id="Parameters.parameter"> + <path value="Parameters.parameter"/> + <slicing> + <discriminator> + <type value="value"/> + <path value="name"/> + </discriminator> + <rules value="open"/> + </slicing> + </element> + <element id="Parameters.parameter:string"> + <path value="Parameters.parameter"/> + <sliceName value="string"/> + </element> + <element id="Parameters.parameter:string.name"> + <path value="Parameters.parameter.name"/> + <fixedString value="string"/> + </element> + <element id="Parameters.parameter:string.valueString"> + <extension url="http://hl7.org/fhir/StructureDefinition/regex"> + <valueString value="(a)*"/> + </extension> + <path value="Parameters.parameter.valueString"/> + <type> + <code value="string"/> + </type> + <maxLength value="2"/> + </element> + <element id="Parameters.parameter:string.valueString.extension:translation"> + <path value="Parameters.parameter.valueString.extension"/> + <sliceName value="translation"/> + <type> + <code value="Extension"/> + <profile value="http://hl7.org/fhir/StructureDefinition/translation"/> + </type> + </element> + <element id="Parameters.parameter:string.valueString.extension:translation.extension:content"> + <path value="Parameters.parameter.valueString.extension.extension"/> + <sliceName value="content"/> + </element> + <element id="Parameters.parameter:string.valueString.extension:translation.extension:content.valueString"> + <extension url="http://hl7.org/fhir/StructureDefinition/regex"> + <valueString value="(b)*"/> + </extension> + <path value="Parameters.parameter.valueString.extension.extension.valueString"/> + <sliceName value="content"/> + <maxLength value="2"/> + </element> + </differential> +</StructureDefinition> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/synthea.json b/org.hl7.fhir.validation/src/test/resources/validation-examples/synthea.json new file mode 100644 index 000000000..fa68b8a40 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/synthea.json @@ -0,0 +1,36 @@ +{ + "resourceType": "Encounter", + "id": "f003", + "class" : { + "system" : "http://hl7.org/fhir/v3/ActCode", + "code" : "AMB" + }, + "text": { + "status": "generated", + "div": + "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p></div>" + }, + "identifier": [ + { + "use": "official", + "system": "http://www.bmc.nl/zorgportal/identifiers/encounters", + "value": "v6751" + } + ], + "status": "finished", + "subject": { + "reference": "Patient/f001", + "display": "P. van de Heuvel" + }, + "reason": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor", + "valueCode": "UNK" + } + ] + }, + "serviceProvider": { + "reference": "Organization/f001" + } +} \ No newline at end of file diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-pat.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-pat.xml new file mode 100644 index 000000000..4557d61a5 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-pat.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--Sample male patient. This includes optional elements in addition to the minimum dataset for the patient.--> +<Patient xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../Schemas/Patient.xsd"> + <id value="bc3027a7-924c-44b5-8f1b-bfd5266c6905"/> + <!--Identifies the profile being used--> + <meta> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Patient-1"/> + </meta> + <!--nhsCommunication complex extension start--> +<extension url="Extension-CareConnect-NHSCommunication-1" > + <extension url="language" > + <valueCodeableConcept> + <coding> + <system value="https://fhir.hl7.org.uk/ValueSet/CareConnect-HumanLanguage-1"/> + <code value="ga"/> + <display value="Irish"/> + </coding> + </valueCodeableConcept> + </extension> + <extension url="preferred"> + <valueBoolean value="true"/> + </extension> + <extension url="interpreterRequired"> + <valueBoolean value="false"/> + </extension> +</extension> + <!--Primary patient identifier i.e. NHS number and code to indicate it's been verified--> + + <identifier> + <extension url="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1"> + <valueCodeableConcept> + <coding> + <system value="https://fhir.hl7.org.uk/ValueSet/CareConnect-NHSNumberVerificationStatus-1"/> + <code value="01"/> + <display value="Number present and verified"/> + </coding> + </valueCodeableConcept> + </extension> + <system value="https://fhir.nhs.uk/Id/nhs-number"/> + <value value="9413946000"/> + </identifier> + <identifier> + <system value="https://fhir.nhs.uk/Id/local-patient-identifier"/> + <value value="A1234521"/> + <assigner> + <!-- This can be a reference to the profile elsewhere in the message or just text --> + <reference value="Organization/1ebc76fd-9612-4c72-81dd-de294a0e7287"/> + </assigner> + </identifier> + <name> + <use value="usual"/> + <family value="Jones"/> + <given value="Barry"/> + </name> + <telecom> + <system value="email"/> + <value value="barryJ@googlemail.com"/> + </telecom> + <telecom> + <system value="phone"/> + <value value="0113554466"/> + </telecom> + <gender value="male"/> + <birthDate value="1941-11-01"/> + <address> + <!-- Structured address--> + <line value="The Old Lodge"/> + <line value="1 Little Street"/> + <line value="Chapeltown"/> + <city value="Leeds"/> + <district value="West Yorkshire"/> + <postalCode value="LS6 1UR"/> + </address> + <!-- Patient's Carer contact --> + <contact> + <relationship> + <coding> + <system value="https://fhir.hl7.org.uk/CareConnect-PersonRelationshipType-1"/> + <code value="20"/> + <display value="Carer"/> + </coding> + </relationship> + <name> + <use value="usual"/> + <family value="Bloom"/> + <given value="Sandra"/> + </name> + <telecom> + <system value="email"/> + <value value="Sbloom123@yahoo.com"/> + </telecom> + <telecom> + <system value="phone"/> + <value value="0113237656"/> + </telecom> + </contact> +</Patient> diff --git a/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-sd-pat.xml b/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-sd-pat.xml new file mode 100644 index 000000000..dfedb4aef --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/validation-examples/uk-nhs-sd-pat.xml @@ -0,0 +1,15085 @@ +<?xml version="1.0" encoding="utf-8"?> +<StructureDefinition xmlns="http://hl7.org/fhir"> + <meta> + <lastUpdated value="2017-05-02T14:21:31.019+01:00" /> + <tag> + <system value="urn:hscic:publishOrder" /> + <code value="6" /> + </tag> + </meta> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> + <valueInteger value="5" /> + </extension> + <url value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Patient-1" /> + <version value="1.0.0" /> + <name value="CareConnect-Patient-1" /> + <status value="draft" /> + <publisher value="HL7 UK" /> + <description value="The Patient resource represents the patient involved in the provision of healthcare related services." /> + <copyright value="Copyright © 2016 HL7 UK Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html" /> + <fhirVersion value="1.0.1" /> + <mapping> + <identity value="rim" /> + <uri value="http://hl7.org/v3" /> + <name value="RIM" /> + </mapping> + <mapping> + <identity value="cda" /> + <uri value="http://hl7.org/v3/cda" /> + <name value="CDA (R2)" /> + </mapping> + <kind value="resource" /> + <constrainedType value="Patient" /> + <abstract value="false" /> + <base value="http://hl7.org/fhir/StructureDefinition/Patient" /> + <snapshot> + <element> + <path value="Patient" /> + <short value="The Patient resource carries the patient demographic details." /> + <definition value="Demographics and other administrative information about an individual or animal receiving care or other health-related services." /> + <alias value="SubjectOfCare Client Resident" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Resource" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Patient" /> + </type> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" /> + </extension> + <key value="dom-4" /> + <severity value="error" /> + <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" /> + <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="contained.where(('#'+id in %resource.descendants().reference).not()).empty()" /> + </extension> + <key value="dom-3" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource" /> + <xpath value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="contained.contained.empty()" /> + </extension> + <key value="dom-2" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" /> + <xpath value="not(parent::f:contained and f:contained)" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="contained.text.empty()" /> + </extension> + <key value="dom-1" /> + <severity value="error" /> + <human value="If the resource is contained in another resource, it SHALL NOT contain any narrative" /> + <xpath value="not(parent::f:contained and f:text)" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="ClinicalDocument.recordTarget.patientRole" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Patient[classCode=PAT]" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="administrative.individual" /> + </mapping> + </element> + <element> + <path value="Patient.id" /> + <short value="Logical id of this artifact" /> + <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." /> + <comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Resource.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.meta" /> + <short value="Metadata about the resource" /> + <definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Resource.meta" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Meta" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.implicitRules" /> + <short value="A set of rules under which this content was created" /> + <definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content." /> + <comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Resource.implicitRules" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.language" /> + <short value="Language of the resource content" /> + <definition value="The base language in which the resource is written." /> + <comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Resource.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <binding> + <strength value="required" /> + <description value="A human language." /> + <valueSet value="http://tools.ietf.org/html/bcp47" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.text" /> + <short value="Text summary of the resource, for human interpretation" /> + <definition 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 "clinically safe" 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." /> + <alias value="narrative" /> + <alias value="html" /> + <alias value="xhtml" /> + <alias value="display" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Narrative" /> + </type> + <condition value="ele-1" /> + <condition value="dom-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Act.text?" /> + </mapping> + </element> + <element> + <path value="Patient.contained" /> + <short value="Contained, inline Resources" /> + <definition 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." /> + <alias value="inline resources" /> + <alias value="anonymous resources" /> + <alias value="contained resources" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.contained" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Resource" /> + </type> + <mapping> + <identity value="rim" /> + <map value="Entity. Role, or Act" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + <short value="Additional Content defined by implementations" /> + <definition 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 set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="registrationDetails" /> + <short value="Additional registration information for the Patient resource" /> + <definition value="Optional Extensions Element - found in all resources." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-RegistrationDetails-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="ethnicCategory" /> + <short value="Ethnic category" /> + <definition value="The ethnicity of the subject." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-EthnicCategory-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="religiousAffiliation" /> + <short value="Religious affiliation" /> + <definition value="The religious affiliation of the subject." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-ReligiousAffiliation-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="patient-cadavericDonor" /> + <short value="Flag indicating whether the patient authorized the donation of body parts after death." /> + <definition value="Flag indicating whether the patient authorized the donation of body parts after death." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="residentialStatus" /> + <short value="The residential status of the patient " /> + <definition value="The residential status of the patient. For example if this patient is a UK resident." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-ResidentialStatus-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="false" /> + <binding> + <strength value="required" /> + <description value="The residential status of the patient" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-ResidentialStatus-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="treatmentCategory" /> + <short value="The treatment category for this patient" /> + <definition value="The treatment category for this patient. For example if this patient is entitled to free healthcare treatment." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-TreatmentCategory-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="false" /> + <binding> + <strength value="required" /> + <description value="The treatment category of the patient" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-TreatmentCategory-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.extension" /> + <name value="nhsCommunication" /> + <short value="NHS communication preferences for a resource" /> + <definition value="Communication preferences including a list of Languages which may be used for communication" /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-NHSCommunication-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="false" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.modifierExtension" /> + <short value="Extensions that cannot be ignored" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="DomainResource.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier" /> + <slicing> + <discriminator value="system" /> + <ordered value="true" /> + <rules value="openAtEnd" /> + </slicing> + <short value="An identifier for this patient" /> + <definition value="An identifier for this patient." /> + <requirements value="Patients are almost always assigned specific numerical identifiers." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".id" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="id" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.use" /> + <short value="usual | official | temp | secondary (If known)" /> + <definition value="The purpose of this identifier." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." /> + <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Identifies the purpose for this identifier, if known ." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type" /> + <short value="Description of identifier" /> + <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." /> + <comments value="This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type." /> + <requirements value="Allows users to make use of identifiers when the identifier system is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.system" /> + <short value="The namespace for the identifier" /> + <definition value="Establishes the namespace in which set of possible id values is unique." /> + <comments value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <requirements value="There are many sequences of identifiers. To perform matching, we need to know what sequence we're dealing with. The system identifies a particular sequence or set of unique identifiers." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <exampleUri value="http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / EI-2-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.root or Role.id.root" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierType" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.value" /> + <short value="The value that is unique" /> + <definition value="The portion of the identifier typically displayed to the user and which is unique within the context of the system." /> + <comments value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="123456" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.1 / EI.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period" /> + <short value="Time period when id is/was valid for use" /> + <definition value="Time period during which identifier is/was valid for use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.7 + CX.8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.effectiveTime or implied by context" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner" /> + <short value="Organization that issued id (may be just text)" /> + <definition value="Organization that issued/manages the identifier." /> + <comments value="The reference may be just a text description of the assigner." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.assigner" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / (CX.4,CX.9,CX.10)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierIssuingAuthority" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier" /> + <name value="nhsNumber" /> + <short value="The patient's NHS number" /> + <definition value="The patient's NHS number" /> + <requirements value="Patients are almost always assigned specific numerical identifiers." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".id" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="id" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.extension" /> + <name value="nhsNumberVerificationStatus" /> + <short value="NHS number verification status" /> + <definition value="The verification/tracing status of the NHS number." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.use" /> + <short value="usual | official | temp | secondary (If known)" /> + <definition value="The purpose of this identifier." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." /> + <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Identifier.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Identifies the purpose for this identifier, if known ." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type" /> + <short value="Description of identifier" /> + <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." /> + <comments value="This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type." /> + <requirements value="Allows users to make use of identifiers when the identifier system is not known." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Identifier.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.system" /> + <short value="The namespace for the identifier" /> + <definition value="Establishes the namespace in which set of possible id values is unique." /> + <comments value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <requirements value="There are many sequences of identifiers. To perform matching, we need to know what sequence we're dealing with. The system identifies a particular sequence or set of unique identifiers." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Identifier.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="https://fhir.nhs.uk/Id/nhs-number" /> + <exampleUri value="http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / EI-2-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.root or Role.id.root" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierType" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.value" /> + <short value="Ten numeric digit NHS number" /> + <definition value="The portion of the identifier typically displayed to the user and which is unique within the context of the system." /> + <comments value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Identifier.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="123456" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.1 / EI.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period" /> + <short value="Time period when id is/was valid for use" /> + <definition value="Time period during which identifier is/was valid for use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Identifier.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.7 + CX.8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.effectiveTime or implied by context" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner" /> + <short value="Organization that issued id (may be just text)" /> + <definition value="Organization that issued/manages the identifier." /> + <comments value="The reference may be just a text description of the assigner." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Identifier.assigner" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / (CX.4,CX.9,CX.10)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierIssuingAuthority" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier" /> + <name value="localIdentifier" /> + <short value=" The patient's other identifiers" /> + <definition value="An identifier for this patient." /> + <requirements value="Patients are almost always assigned specific numerical identifiers." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.identifier" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Identifier" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Identifier" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".id" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="id" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.use" /> + <short value="usual | official | temp | secondary (If known)" /> + <definition value="The purpose of this identifier." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." /> + <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Identifies the purpose for this identifier, if known ." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type" /> + <short value="Description of identifier" /> + <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." /> + <comments value="This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type." /> + <requirements value="Allows users to make use of identifiers when the identifier system is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.code or implied by context" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.type.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.system" /> + <short value="The namespace for the identifier" /> + <definition value="Establishes the namespace in which set of possible id values is unique." /> + <comments value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" /> + <requirements value="There are many sequences of identifiers. To perform matching, we need to know what sequence we're dealing with. The system identifies a particular sequence or set of unique identifiers." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Identifier.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <fixedUri value="https://fhir.nhs.uk/Id/local-patient-identifier" /> + <exampleUri value="http://www.acme.com/identifiers/patient or urn:ietf:rfc:3986 if the Identifier.value itself is a full uri" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / EI-2-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.root or Role.id.root" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierType" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.value" /> + <short value="The value that is unique" /> + <definition value="The portion of the identifier typically displayed to the user and which is unique within the context of the system." /> + <comments value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Identifier.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="123456" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.1 / EI.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period" /> + <short value="Time period when id is/was valid for use" /> + <definition value="Time period during which identifier is/was valid for use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.7 + CX.8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="Role.effectiveTime or implied by context" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner" /> + <short value="Organization that issued id (may be just text)" /> + <definition value="Organization that issued/manages the identifier." /> + <comments value="The reference may be just a text description of the assigner." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Identifier.assigner" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CX.4 / (CX.4,CX.9,CX.10)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./IdentifierIssuingAuthority" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.identifier.assigner.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.active" /> + <short value="Whether this patient's record is in active use" /> + <definition value="Whether this patient record is in active use." /> + <comments value="Default is true. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient." /> + <requirements value="Need to be able to mark a patient record as not to be used because it was created in error." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.active" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <defaultValueBoolean value="true" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="statusCode" /> + </mapping> + <mapping> + <identity value="w5" /> + <map value="status" /> + </mapping> + </element> + <element> + <path value="Patient.name" /> + <slicing> + <discriminator value="use" /> + <discriminator value="period.end" /> + <ordered value="false" /> + <rules value="openAtEnd" /> + </slicing> + <short value="A name associated with the patient" /> + <definition value="A name associated with the individual." /> + <comments value="A patient may have multiple names with different uses or applicable periods. For animals, the name is a "HumanName" in the sense that is assigned and used by humans and has the same patterns." /> + <requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." /> + <min value="1" /> + <max value="*" /> + <base> + <path value="Patient.name" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="HumanName" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="EN (actually, PN)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ProviderName" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.name" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-5, PID-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="name" /> + </mapping> + </element> + <element> + <path value="Patient.name.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.use" /> + <short value="usual | official | temp | nickname | anonymous | old | maiden" /> + <definition value="Identifies the purpose for this name." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows the appropriate name for a particular context of use to be selected from among a set of names." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of a human name" /> + <valueSet value="http://hl7.org/fhir/ValueSet/name-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.7, but often indicated by which field contains the name" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./NamePurpose" /> + </mapping> + </element> + <element> + <path value="Patient.name.text" /> + <short value="Text representation of the full name" /> + <definition value="A full text representation of the name." /> + <comments value="Can provide both a text representation and structured parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="implied by XPN.11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + </element> + <element> + <path value="Patient.name.family" /> + <short value="Family name (often called 'Surname')" /> + <definition value="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." /> + <comments value="For family name, hyphenated names such as "Smith-Jones" are a single name, but names with spaces such as "Smith Jones" are broken into multiple parts." /> + <alias value="surname" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.family" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = FAM]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./FamilyName" /> + </mapping> + </element> + <element> + <path value="Patient.name.given" /> + <short value="Given names (not always 'first'). Includes middle names" /> + <definition value="Given name." /> + <comments value="If only initials are recorded, they may be used in place of the full name. Not called "first name" since given names do not always come first." /> + <alias value="first name" /> + <alias value="middle name" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.given" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.2 + XPN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = GIV]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./GivenNames" /> + </mapping> + </element> + <element> + <path value="Patient.name.prefix" /> + <short value="Parts that come before the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.prefix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = PFX]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./TitleCode" /> + </mapping> + </element> + <element> + <path value="Patient.name.suffix" /> + <short value="Parts that come after the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.suffix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN/4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = SFX]" /> + </mapping> + </element> + <element> + <path value="Patient.name.period" /> + <short value="Time period when name was/is in use" /> + <definition value="Indicates the period of time when this name was valid for the named person." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows names to be placed in historical context." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.13 + XPN.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.name" /> + <name value="usual" /> + <short value="The patient's current usual name" /> + <definition value="The patient's current usual name" /> + <comments value="A patient may have multiple names with different uses or applicable periods. For animals, the name is a "HumanName" in the sense that is assigned and used by humans and has the same patterns." /> + <requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.name" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="HumanName" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="EN (actually, PN)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ProviderName" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.name" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-5, PID-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="name" /> + </mapping> + </element> + <element> + <path value="Patient.name.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.use" /> + <short value="usual | official | temp | nickname | anonymous | old | maiden" /> + <definition value="Identifies the purpose for this name." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows the appropriate name for a particular context of use to be selected from among a set of names." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <fixedCode value="usual" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of a human name" /> + <valueSet value="http://hl7.org/fhir/ValueSet/name-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.7, but often indicated by which field contains the name" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./NamePurpose" /> + </mapping> + </element> + <element> + <path value="Patient.name.text" /> + <short value="Text representation of the full name" /> + <definition value="A full text representation of the name." /> + <comments value="Can provide both a text representation and structured parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="implied by XPN.11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + </element> + <element> + <path value="Patient.name.family" /> + <short value="Family name (often called 'Surname')" /> + <definition value="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." /> + <comments value="For family name, hyphenated names such as "Smith-Jones" are a single name, but names with spaces such as "Smith Jones" are broken into multiple parts." /> + <alias value="surname" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.family" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = FAM]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./FamilyName" /> + </mapping> + </element> + <element> + <path value="Patient.name.given" /> + <short value="Given names (not always 'first'). Includes middle names" /> + <definition value="Given name." /> + <comments value="If only initials are recorded, they may be used in place of the full name. Not called "first name" since given names do not always come first." /> + <alias value="first name" /> + <alias value="middle name" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.given" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.2 + XPN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = GIV]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./GivenNames" /> + </mapping> + </element> + <element> + <path value="Patient.name.prefix" /> + <short value="Parts that come before the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.prefix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = PFX]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./TitleCode" /> + </mapping> + </element> + <element> + <path value="Patient.name.suffix" /> + <short value="Parts that come after the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.suffix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN/4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = SFX]" /> + </mapping> + </element> + <element> + <path value="Patient.name.period" /> + <short value="Time period when name was/is in use" /> + <definition value="Indicates the period of time when this name was valid for the named person." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows names to be placed in historical context." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.13 + XPN.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.name" /> + <name value="other" /> + <short value="The patient's other names" /> + <definition value="The patient's other names" /> + <comments value="A patient may have multiple names with different uses or applicable periods. For animals, the name is a "HumanName" in the sense that is assigned and used by humans and has the same patterns." /> + <requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.name" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="HumanName" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="EN (actually, PN)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ProviderName" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.name" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-5, PID-9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="name" /> + </mapping> + </element> + <element> + <path value="Patient.name.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.use" /> + <short value="usual | official | temp | nickname | anonymous | old | maiden" /> + <definition value="Identifies the purpose for this name." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows the appropriate name for a particular context of use to be selected from among a set of names." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of a human name" /> + <valueSet value="http://hl7.org/fhir/ValueSet/name-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.7, but often indicated by which field contains the name" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./NamePurpose" /> + </mapping> + </element> + <element> + <path value="Patient.name.text" /> + <short value="Text representation of the full name" /> + <definition value="A full text representation of the name." /> + <comments value="Can provide both a text representation and structured parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="implied by XPN.11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + </element> + <element> + <path value="Patient.name.family" /> + <short value="Family name (often called 'Surname')" /> + <definition value="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." /> + <comments value="For family name, hyphenated names such as "Smith-Jones" are a single name, but names with spaces such as "Smith Jones" are broken into multiple parts." /> + <alias value="surname" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.family" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = FAM]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./FamilyName" /> + </mapping> + </element> + <element> + <path value="Patient.name.given" /> + <short value="Given names (not always 'first'). Includes middle names" /> + <definition value="Given name." /> + <comments value="If only initials are recorded, they may be used in place of the full name. Not called "first name" since given names do not always come first." /> + <alias value="first name" /> + <alias value="middle name" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.given" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.2 + XPN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = GIV]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./GivenNames" /> + </mapping> + </element> + <element> + <path value="Patient.name.prefix" /> + <short value="Parts that come before the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.prefix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = PFX]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./TitleCode" /> + </mapping> + </element> + <element> + <path value="Patient.name.suffix" /> + <short value="Parts that come after the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.suffix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN/4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = SFX]" /> + </mapping> + </element> + <element> + <path value="Patient.name.period" /> + <short value="Time period when name was/is in use" /> + <definition value="Indicates the period of time when this name was valid for the named person." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows names to be placed in historical context." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.13 + XPN.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.name.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.telecom" /> + <short value="A contact detail for the individual" /> + <definition value="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." /> + <comments value="A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address may not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone)." /> + <requirements value="People have (primary) ways to contact them in some way such as phone, email." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.telecom" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="ContactPoint" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="value.empty() or system" /> + </extension> + <key value="cpt-2" /> + <severity value="error" /> + <human value="A system is required if a value is provided." /> + <xpath value="not(exists(f:value)) or exists(f:system)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="TEL" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ContactPoint" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".telecom" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-13, PID-14, PID-40" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="telecom" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.system" /> + <short value="phone | fax | email | pager | other" /> + <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="ContactPoint.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <condition value="cpt-2" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Telecommunications form for contact point" /> + <valueSet value="http://hl7.org/fhir/ValueSet/contact-point-system" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./scheme" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./ContactPointType" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.value" /> + <short value="The actual contact point details" /> + <definition value="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." /> + <comments value="Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value." /> + <requirements value="Need to support legacy numbers that are not in a tightly controlled format." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="ContactPoint.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.1 (or XTN.12)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./url" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.use" /> + <short value="home | work | temp | old | mobile - purpose of this contact point" /> + <definition value="Identifies the purpose for the contact point." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old." /> + <requirements value="Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Use of contact point" /> + <valueSet value="http://hl7.org/fhir/ValueSet/contact-point-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.2 - but often indicated by field" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./ContactPointPurpose" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.rank" /> + <short value="Specify preferred order of use (1 = highest)" /> + <definition value="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values." /> + <comments value="Note that rank does not necessarily follow the order in which the contacts are represented in the instance." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="ContactPoint.rank" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.period" /> + <short value="Time period when the contact point was/is in use" /> + <definition value="Time period when the contact point was/is in use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./useablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.telecom.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.gender" /> + <short value="male | female | other | unknown" /> + <definition value="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." /> + <comments value="The gender may not match the biological sex as determined by genetics, or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though the vast majority of systems and contexts only support M and F. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific gender aspect of interest (anatomical, chromosonal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosonal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overrideable error, not a "hard" error." /> + <requirements value="Needed for identification of the individual, in combination with (at least) name and birth date. Gender of individual drives many clinical processes." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.gender" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The gender of a person used for administrative purposes." /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.administrativeGenderCode" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-8" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" /> + </mapping> + </element> + <element> + <path value="Patient.birthDate" /> + <short value="The date of birth for the patient" /> + <definition value="The date of birth for the individual." /> + <comments value="At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension "patient-birthTime" available that should be used where Time is required (such as in maternaty/infant care systems)." /> + <requirements value="Age of the individual drives many clinical processes." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.birthDate" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="date" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="loinc" /> + <map value="21112-8" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.birthTime" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" /> + </mapping> + </element> + <element> + <path value="Patient.birthDate.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.birthDate.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.birthDate.extension" /> + <name value="patient-birthTime" /> + <short value="The time of day that the Patient was born. This includes the date to ensure that the timezone information can be communicated effectively." /> + <definition value="The time of day that the Patient was born. This includes the date to ensure that the timezone information can be communicated effectively." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.birthDate.value" /> + <representation value="xmlAttr" /> + <short value="Primitive value for date" /> + <definition value="Primitive value for date" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="date.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex"> + <valueString value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?" /> + </extension> + <code> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type"> + <valueString value="string" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type"> + <valueString value="xs:gYear, xs:gYearMonth, xs:date" /> + </extension> + </code> + </type> + </element> + <element> + <path value="Patient.deceased[x]" /> + <short value="Indicates if the individual is deceased or not" /> + <definition value="Indicates if the individual is deceased or not." /> + <comments value="If there's no value in the instance it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive." /> + <requirements value="The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.deceased[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-30 (bool) and PID-29 (datetime)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" /> + </mapping> + </element> + <element> + <path value="Patient.address" /> + <short value="Addresses for the individual" /> + <definition value="Addresses for the individual." /> + <comments value="Patient may have multiple addresses with different uses or applicable periods." /> + <requirements value="May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.address" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Address" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Address" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".addr" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="addr" /> + </mapping> + </element> + <element> + <path value="Patient.address.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.address.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.address.use" /> + <short value="home | work | temp | old - purpose of this address" /> + <definition value="The purpose of this address." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old address etc.for a current/permanent one. Applications can assume that an address is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows an appropriate address to be chosen from a list of many." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="home" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of an address" /> + <valueSet value="http://hl7.org/fhir/ValueSet/address-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./AddressPurpose" /> + </mapping> + </element> + <element> + <path value="Patient.address.type" /> + <short value="postal | physical | both" /> + <definition value="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="both" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The type of an address (physical / postal)" /> + <valueSet value="http://hl7.org/fhir/ValueSet/address-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.18" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="address type parameter" /> + </mapping> + </element> + <element> + <path value="Patient.address.text" /> + <short value="Text representation of the address" /> + <definition value="A full text representation of the address." /> + <comments value="Can provide both a text representation and parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="42 Grove Street, Overtown, West Yorkshire, LS21 1PF" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="address label parameter" /> + </mapping> + </element> + <element> + <path value="Patient.address.line" /> + <short value="Street name, number, direction & P.O. Box etc." /> + <definition value="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="home | work | temp | old - purpose of this address." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Address.line" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="42, Grove Street" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = AL]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="street" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StreetAddress (newline delimitted)" /> + </mapping> + </element> + <element> + <path value="Patient.address.city" /> + <short value="Name of city, town etc." /> + <definition value="The name of the city, town, village or other community or delivery center." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Municpality" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.city" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="Overtown" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CTY]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="locality" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Jurisdiction" /> + </mapping> + </element> + <element> + <path value="Patient.address.district" /> + <short value="District name (aka county)" /> + <definition value="The name of the administrative area (county)." /> + <comments value="District is sometimes known as county, but in some regions 'county' is used in place of city (municipality), so county name should be conveyed in city instead." /> + <alias value="County" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.district" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="West Yorkshire" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CNT | CPA]" /> + </mapping> + </element> + <element> + <path value="Patient.address.state" /> + <short value="Sub-unit of country (abbreviations ok)" /> + <definition value="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Province" /> + <alias value="Territory" /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Address.state" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = STA]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="region" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Region" /> + </mapping> + </element> + <element> + <path value="Patient.address.postalCode" /> + <short value="Postal code for area" /> + <definition value="A postal code designating a region defined by the postal service." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Zip" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.postalCode" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="LS21 1PF" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = ZIP]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="code" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./PostalIdentificationCode" /> + </mapping> + </element> + <element> + <path value="Patient.address.country" /> + <short value="Country (can be ISO 3166 3 letter code)" /> + <definition value="Country - a nation as commonly understood or generally accepted." /> + <comments value="ISO 3166 3 letter codes can be used in place of a full country name." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.country" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="GBR" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CNT]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="country" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Country" /> + </mapping> + </element> + <element> + <path value="Patient.address.period" /> + <short value="Time period when address was/is in use" /> + <definition value="Time period when address was/is in use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows addresses to be placed in historical context." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <examplePeriod> + <start value="2010-03-23T00:00:00" /> + <end value="2010-07-01T00:00:00" /> + </examplePeriod> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.12 / XAD.13 + XAD.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.address.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.address.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.address.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.address.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus" /> + <short value="Marital (civil) status of a patient" /> + <definition value="This field contains a patient's most recent marital (civil) status." /> + <comments value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." /> + <requirements value="Most, if not all systems capture it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.maritalStatus" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The domestic partnership status of a person." /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-MaritalStatus-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".patient.maritalStatusCode" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-16" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN]/maritalStatusCode" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <exampleUri value="http://hl7.org/fhir/v3/MaritalStatus" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.maritalStatus.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.multipleBirth[x]" /> + <short value="Whether patient is part of a multiple birth" /> + <definition value="Indicates whether the patient is part of a multiple or indicates the actual birth order." /> + <requirements value="For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.multipleBirth[x]" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <type> + <code value="integer" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-24 (bool), PID-25 (integer)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" /> + </mapping> + </element> + <element> + <path value="Patient.photo" /> + <short value="Image of the patient" /> + <definition value="Image of the patient." /> + <comments value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as "Attachment"." /> + <requirements value="Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Patient.photo" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Attachment" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="data.empty() or contentType" /> + </extension> + <key value="att-1" /> + <severity value="error" /> + <human value="It the Attachment has data, it SHALL have a contentType" /> + <xpath value="not(exists(f:data)) or exists(f:contentType)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ED/RP" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="ED" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="OBX-5 - needs a profile" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" /> + </mapping> + </element> + <element> + <path value="Patient.photo.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.photo.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.photo.contentType" /> + <short value="Mime type of the content, with charset etc." /> + <definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Processors of the data need to be able to know how to interpret the data." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.contentType" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="text/plain; charset=UTF-8, image/png" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The mime type of an attachment. Any valid mime type is allowed." /> + <valueSet value="http://www.rfc-editor.org/bcp/bcp13.txt" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./mediaType, ./charset" /> + </mapping> + </element> + <element> + <path value="Patient.photo.language" /> + <short value="Human language of the content (BCP-47)" /> + <definition value="The human language of the content. The value can be any valid value according to BCP 47." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Users need to be able to choose between the languages in a set of attachments." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.language" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="en-AU" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="A human language." /> + <valueSet value="http://tools.ietf.org/html/bcp47" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./language" /> + </mapping> + </element> + <element> + <path value="Patient.photo.data" /> + <short value="Data inline, base64ed" /> + <definition value="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." /> + <comments value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON." /> + <requirements value="The data needs to able to be transmitted inline." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.data" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="base64Binary" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="ED.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./data" /> + </mapping> + </element> + <element> + <path value="Patient.photo.url" /> + <short value="Uri where the data can be found" /> + <definition value="An alternative location where the data can be accessed." /> + <comments value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data." /> + <requirements value="The data needs to be transmitted by reference." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.url" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <exampleUri value="http://www.acme.com/logo-small.png" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="RP.1+RP.2 - if they refer to a URL (see v2.6)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./reference/literal" /> + </mapping> + </element> + <element> + <path value="Patient.photo.size" /> + <short value="Number of bytes of content (if url provided)" /> + <definition value="The number of bytes of data that make up this attachment." /> + <comments value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference." /> + <requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.size" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="unsignedInt" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A (needs data type R3 proposal)" /> + </mapping> + </element> + <element> + <path value="Patient.photo.hash" /> + <short value="Hash of the data (sha-1, base64ed)" /> + <definition value="The calculated hash of the data using SHA-1. Represented using base64." /> + <comments value="A stream of bytes, base64 encoded" /> + <requirements value="Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.hash" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="base64Binary" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value=".integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]" /> + </mapping> + </element> + <element> + <path value="Patient.photo.title" /> + <short value="Label to display in place of the data" /> + <definition value="A label or set of text to display in place of the data." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.title" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="Official Corporate Logo" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./title/data" /> + </mapping> + </element> + <element> + <path value="Patient.photo.creation" /> + <short value="Date attachment was first created" /> + <definition value="The date that the attachment was first created." /> + <requirements value="This is often tracked as an integrity issue for use of the attachment." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Attachment.creation" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A (needs data type R3 proposal)" /> + </mapping> + </element> + <element> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="Contact" /> + </extension> + <path value="Patient.contact" /> + <short value="A contact party (e.g. guardian, partner, friend) for the patient" /> + <definition value="A contact party (e.g. guardian, partner, friend) for the patient." /> + <comments value="Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact." /> + <requirements value="Need to track people you can contact about the patient." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.contact" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="name or telecom or address or organization" /> + </extension> + <key value="pat-1" /> + <severity value="error" /> + <human value="SHALL at least contain a contact's details or a reference to an organization" /> + <xpath value="f:name or f:telecom or f:address or f:organization" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" /> + </mapping> + </element> + <element> + <path value="Patient.contact.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.modifierExtension" /> + <short value="Extensions that cannot be ignored" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship" /> + <short value="The kind of relationship" /> + <definition value="The nature of the relationship between the patient and the contact person." /> + <comments value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." /> + <requirements value="Used to determine which contact person is the most relevant to approach, depending on circumstances." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.contact.relationship" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="extensible" /> + <description value="The nature of the relationship between a patient and a contact person for that patient." /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-PersonRelationshipType-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-7, NK1-3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <exampleUri value="https://fhir.hl7.org.uk/CareConnect-PersonRelationshipType-1" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.contact.relationship.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name" /> + <short value="A name associated with the contact person" /> + <definition value="A name associated with the contact person." /> + <comments value="Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts may or may not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely." /> + <requirements value="Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.contact.name" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="HumanName" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="EN (actually, PN)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ProviderName" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="name" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.use" /> + <short value="usual | official | temp | nickname | anonymous | old | maiden" /> + <definition value="Identifies the purpose for this name." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows the appropriate name for a particular context of use to be selected from among a set of names." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of a human name" /> + <valueSet value="http://hl7.org/fhir/ValueSet/name-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.7, but often indicated by which field contains the name" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./NamePurpose" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.text" /> + <short value="Text representation of the full name" /> + <definition value="A full text representation of the name." /> + <comments value="Can provide both a text representation and structured parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="HumanName.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="implied by XPN.11" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.family" /> + <short value="Family name (often called 'Surname')" /> + <definition value="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." /> + <comments value="For family name, hyphenated names such as "Smith-Jones" are a single name, but names with spaces such as "Smith Jones" are broken into multiple parts." /> + <alias value="surname" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="HumanName.family" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = FAM]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./FamilyName" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.given" /> + <short value="Given names (not always 'first'). Includes middle names" /> + <definition value="Given name." /> + <comments value="If only initials are recorded, they may be used in place of the full name. Not called "first name" since given names do not always come first." /> + <alias value="first name" /> + <alias value="middle name" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="HumanName.given" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.2 + XPN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = GIV]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./GivenNames" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.prefix" /> + <short value="Parts that come before the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.prefix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = PFX]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./TitleCode" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.suffix" /> + <short value="Parts that come after the name" /> + <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="HumanName.suffix" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN/4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./part[partType = SFX]" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.period" /> + <short value="Time period when name was/is in use" /> + <definition value="Indicates the period of time when this name was valid for the named person." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows names to be placed in historical context." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="HumanName.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XPN.13 + XPN.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.contact.name.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom" /> + <short value="A contact detail for the person" /> + <definition value="A contact detail for the person, e.g. a telephone number or an email address." /> + <comments value="Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification." /> + <requirements value="People have (primary) ways to contact them in some way such as phone, email." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.contact.telecom" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="ContactPoint" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="value.empty() or system" /> + </extension> + <key value="cpt-2" /> + <severity value="error" /> + <human value="A system is required if a value is provided." /> + <xpath value="not(exists(f:value)) or exists(f:system)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="TEL" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="ContactPoint" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-5, NK1-6, NK1-40" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="telecom" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.system" /> + <short value="phone | fax | email | pager | other" /> + <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <condition value="cpt-2" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Telecommunications form for contact point" /> + <valueSet value="http://hl7.org/fhir/ValueSet/contact-point-system" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./scheme" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./ContactPointType" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.value" /> + <short value="The actual contact point details" /> + <definition value="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." /> + <comments value="Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value." /> + <requirements value="Need to support legacy numbers that are not in a tightly controlled format." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.value" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.1 (or XTN.12)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./url" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Value" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.use" /> + <short value="home | work | temp | old | mobile - purpose of this contact point" /> + <definition value="Identifies the purpose for the contact point." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old." /> + <requirements value="Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="Use of contact point" /> + <valueSet value="http://hl7.org/fhir/ValueSet/contact-point-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XTN.2 - but often indicated by field" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./ContactPointPurpose" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.rank" /> + <short value="Specify preferred order of use (1 = highest)" /> + <definition value="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values." /> + <comments value="Note that rank does not necessarily follow the order in which the contacts are represented in the instance." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="ContactPoint.rank" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="positiveInt" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.period" /> + <short value="Time period when the contact point was/is in use" /> + <definition value="Time period when the contact point was/is in use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="ContactPoint.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./useablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.contact.telecom.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address" /> + <short value="Address for the contact person" /> + <definition value="Address for the contact person." /> + <comments value="Note: address is for postal addresses, not physical locations." /> + <requirements value="Need to keep track where the contact person can be contacted per postal mail or visited." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.contact.address" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Address" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="Address" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="addr" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.use" /> + <short value="home | work | temp | old - purpose of this address" /> + <definition value="The purpose of this address." /> + <comments value="This is labeled as "Is Modifier" because applications should not mistake a temporary or old address etc.for a current/permanent one. Applications can assume that an address is current unless it explicitly says that it is temporary or old." /> + <requirements value="Allows an appropriate address to be chosen from a list of many." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.use" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="home" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The use of an address" /> + <valueSet value="http://hl7.org/fhir/ValueSet/address-use" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./AddressPurpose" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.type" /> + <short value="postal | physical | both" /> + <definition value="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.type" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <exampleCode value="both" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="The type of an address (physical / postal)" /> + <valueSet value="http://hl7.org/fhir/ValueSet/address-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.18" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="unique(./use)" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="address type parameter" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.text" /> + <short value="Text representation of the address" /> + <definition value="A full text representation of the address." /> + <comments value="Can provide both a text representation and parts." /> + <requirements value="A renderable, unencoded form." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="120, Grove Street, Overtown, West Yorkshire, LS21 1PT" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./formatted" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="address label parameter" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.line" /> + <short value="Street name, number, direction & P.O. Box etc." /> + <definition value="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="home | work | temp | old - purpose of this address." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Address.line" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="120, Grove Street" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = AL]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="street" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StreetAddress (newline delimitted)" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.city" /> + <short value="Name of city, town etc." /> + <definition value="The name of the city, town, village or other community or delivery center." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Municpality" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.city" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="Overtown" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CTY]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="locality" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Jurisdiction" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.district" /> + <short value="District name (aka county)" /> + <definition value="The name of the administrative area (county)." /> + <comments value="District is sometimes known as county, but in some regions 'county' is used in place of city (municipality), so county name should be conveyed in city instead." /> + <alias value="County" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.district" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="West Yorkshire" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.9" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CNT | CPA]" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.state" /> + <short value="Sub-unit of country (abbreviations ok)" /> + <definition value="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Province" /> + <alias value="Territory" /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Address.state" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = STA]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="region" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Region" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.postalCode" /> + <short value="Postal code for area" /> + <definition value="A postal code designating a region defined by the postal service." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <alias value="Zip" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.postalCode" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="LS21 1PT" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.5" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = ZIP]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="code" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./PostalIdentificationCode" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.country" /> + <short value="Country (can be ISO 3166 3 letter code)" /> + <definition value="Country - a nation as commonly understood or generally accepted." /> + <comments value="ISO 3166 3 letter codes can be used in place of a full country name." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.country" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <exampleString value="GBR" /> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="AD.part[parttype = CNT]" /> + </mapping> + <mapping> + <identity value="vcard" /> + <map value="country" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./Country" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.period" /> + <short value="Time period when address was/is in use" /> + <definition value="Time period when address was/is in use." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <requirements value="Allows addresses to be placed in historical context." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Address.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <examplePeriod> + <start value="2010-03-23T00:00:00" /> + <end value="2010-07-01T00:00:00" /> + </examplePeriod> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="XAD.12 / XAD.13 + XAD.14" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./usablePeriod[type="IVL<TS>"]" /> + </mapping> + <mapping> + <identity value="servd" /> + <map value="./StartDate and ./EndDate" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.contact.address.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <path value="Patient.contact.gender" /> + <short value="male | female | other | unknown" /> + <definition value="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Needed to address the person correctly." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.contact.gender" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <binding> + <strength value="required" /> + <description value="The gender of a person used for administrative purposes." /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-15" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" /> + </mapping> + </element> + <element> + <path value="Patient.contact.organization" /> + <short value="Organization that is associated with the contact" /> + <definition value="Organization on behalf of which the contact is acting or for which the contact is working." /> + <requirements value="For guardians or business related contacts, the organization is relevant." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.contact.organization" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="http://hl7.org/fhir/StructureDefinition/Organization" /> + </type> + <condition value="ele-1" /> + <condition value="pat-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="scoper" /> + </mapping> + </element> + <element> + <path value="Patient.contact.organization.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.organization.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.organization.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.organization.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.period" /> + <short value="The period during which this contact person or organization is valid to be contacted relating to this patient" /> + <definition value="The period during which this contact person or organization is valid to be contacted relating to this patient." /> + <comments value="This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.contact.period" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Period" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="start.empty() or end.empty() or (start <= end)" /> + </extension> + <key value="per-1" /> + <severity value="error" /> + <human value="If present, start SHALL have a lower value than end" /> + <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="effectiveTime" /> + </mapping> + </element> + <element> + <path value="Patient.contact.period.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.contact.period.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.contact.period.start" /> + <short value="Starting time with inclusive boundary" /> + <definition value="The start of the period. The boundary is inclusive." /> + <comments value="If the low element is missing, the meaning is that the low boundary is not known." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.start" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./low" /> + </mapping> + </element> + <element> + <path value="Patient.contact.period.end" /> + <short value="End time with inclusive boundary, if not ongoing" /> + <definition value="The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time." /> + <comments value="The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has a end value of 2012-02-03." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Period.end" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="dateTime" /> + </type> + <meaningWhenMissing value="If the end of the period is missing, it means that the period is ongoing" /> + <condition value="ele-1" /> + <condition value="per-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="DR.2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./high" /> + </mapping> + </element> + <element> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="Animal" /> + </extension> + <path value="Patient.animal" /> + <short value="This patient is known to be an animal (non-human)" /> + <definition value="This patient is known to be an animal." /> + <comments value="The animal element is labeled "Is Modifier" since patients may be non-human. Systems SHALL either handle patient details appropriately (e.g. inform users patient is not human) or reject declared animal records. The absense of the animal element does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required. (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal)." /> + <requirements value="Many clinical systems are extended to care for animal patients as well as human." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Patient.animal" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=ANM]" /> + </mapping> + </element> + <element> + <path value="Patient.animal.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.modifierExtension" /> + <short value="Extensions that cannot be ignored" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species" /> + <short value="E.g. Dog, Cow" /> + <definition value="Identifies the high level taxonomic categorization of the kind of animal." /> + <comments value="If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognised taxonomic classification. It may or may not be Linnaean taxonomy and may or may not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species. (The common example is that the word "Hereford" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for "Hereford Cattle Breed" does.)." /> + <requirements value="Need to know what kind of animal." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.animal.species" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="example" /> + <description value="The species of an animal." /> + <valueSet value="http://hl7.org/fhir/ValueSet/animal-species" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-35" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="code" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.animal.species.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed" /> + <short value="E.g. Poodle, Angus" /> + <definition value="Identifies the detailed categorization of the kind of animal." /> + <comments value="Breed MAY be used to provide further taxonomic or non-taxonomic classification. It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type." /> + <requirements value="May need to know the specific kind within the species." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.animal.breed" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="example" /> + <description value="The breed of an animal." /> + <valueSet value="http://hl7.org/fhir/ValueSet/animal-breeds" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-37" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.animal.breed.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus" /> + <short value="E.g. Neutered, Intact" /> + <definition value="Indicates the current state of the animal's reproductive organs." /> + <comments value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." /> + <requirements value="Gender status can affect housing and animal behavior." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.animal.genderStatus" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="example" /> + <description value="The state of the animal's reproductive organs." /> + <valueSet value="http://hl7.org/fhir/ValueSet/animal-genderstatus" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="N/A" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="genderStatusCode" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.animal.genderStatus.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.communication" /> + <short value="A list of Languages which may be used to communicate with the patient about his or her health" /> + <definition value="Languages which may be used to communicate with the patient about his or her health." /> + <comments value="If no language is specified, this *implies* that the default local language is spoken. If you need to convey proficiency for multiple modes then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required." /> + <requirements value="If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest." /> + <min value="0" /> + <max value="0" /> + <base> + <path value="Patient.communication" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="patient.languageCommunication" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="LanguageCommunication" /> + </mapping> + </element> + <element> + <path value="Patient.communication.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.communication.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.communication.modifierExtension" /> + <short value="Extensions that cannot be ignored" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language" /> + <short value="The language which can be used to communicate with the patient about his or her health" /> + <definition value="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English." /> + <comments value="The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type." /> + <requirements value="Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.communication.language" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="CodeableConcept" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <binding> + <strength value="required" /> + <description value="A human language." /> + <valueSet value="http://tools.ietf.org/html/bcp47" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".languageCode" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-15, LAN-2" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding" /> + <short value="Code defined by a terminology system" /> + <definition value="A reference to a code defined by a terminology system." /> + <comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true." /> + <requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="CodeableConcept.coding" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Coding" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1-8, C*E.10-22" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="union(., ./translation)" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.system" /> + <short value="Identity of the terminology system" /> + <definition value="The identification of the code system that defines the meaning of the symbol in the code." /> + <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." /> + <requirements value="Need to be unambiguous about the source of the definition of the symbol." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.system" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="uri" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.3" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystem" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.version" /> + <short value="Version of the system - if relevant" /> + <definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." /> + <comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.version" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.7" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./codeSystemVersion" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.code" /> + <short value="Symbol in syntax defined by the system" /> + <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to refer to a particular code in the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.code" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./code" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.display" /> + <short value="Representation defined by the system" /> + <definition value="A representation of the meaning of the code in the system, following the rules of the system." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.2 - but note this is not well followed" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CV.displayName" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.coding.userSelected" /> + <short value="If this coding was chosen directly by the user" /> + <definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." /> + <comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely." /> + <requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Coding.userSelected" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="Sometimes implied by being first" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="CD.codingRationale" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]" /> + </mapping> + </element> + <element> + <path value="Patient.communication.language.text" /> + <short value="Plain text representation of the concept" /> + <definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." /> + <comments value="Very often the text is the same as a displayName of one of the codings." /> + <requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="CodeableConcept.text" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="C*E.9. But note many systems use C*E.2 for this" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="./originalText[mediaType/code="text/plain"]/data" /> + </mapping> + <mapping> + <identity value="orim" /> + <map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" /> + </mapping> + </element> + <element> + <path value="Patient.communication.preferred" /> + <short value="Language preference indicator" /> + <definition value="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." /> + <comments value="This language is specifically identified for communicating healthcare information." /> + <requirements value="People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.communication.preferred" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="boolean" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".preferenceInd" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-15" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="preferenceInd" /> + </mapping> + </element> + <element> + <path value="Patient.careProvider" /> + <short value="Patient's nominated practitioner" /> + <definition value="Patient's nominated care provider." /> + <comments value="This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disablity setting, or even organization that will provide people to perform the care provider roles. This is not to be used to record Care Teams, these should be recorded on either the CarePlan or EpisodeOfCare resources." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.careProvider" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Practitioner-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PD1-4" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="subjectOf.CareEvent.performer.AssignedEntity" /> + </mapping> + </element> + <element> + <path value="Patient.managingOrganization" /> + <short value="Organization that is the custodian of the patient record" /> + <definition value="Organization that is the custodian of the patient record." /> + <comments value="There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association)." /> + <requirements value="Need to know who recognizes this patient record, manages and updates it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Patient.managingOrganization" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value=".providerOrganization" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="scoper" /> + </mapping> + </element> + <element> + <path value="Patient.managingOrganization.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.managingOrganization.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.managingOrganization.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.managingOrganization.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link" /> + <short value="Link to another patient resource that concerns the same actual person" /> + <definition value="Link to another patient resource that concerns the same actual patient." /> + <comments value="There is no assumption that linked patient records have mutual links." /> + <requirements value="There are multiple usecases: * Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and * Distribution of patient information across multiple servers." /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Patient.link" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="BackboneElement" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="outboundLink" /> + </mapping> + </element> + <element> + <path value="Patient.link.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.link.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link.modifierExtension" /> + <short value="Extensions that cannot be ignored" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." /> + <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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <alias value="modifiers" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="BackboneElement.modifierExtension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link.other" /> + <short value="The other patient resource that the link refers to" /> + <definition value="The other patient resource that the link refers to." /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.link.other" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Patient-1" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))" /> + </extension> + <key value="ref-1" /> + <severity value="error" /> + <human value="SHALL have a local reference if the resource is provided inline" /> + <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])" /> + </constraint> + <isModifier value="true" /> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="v2" /> + <map value="PID-3, MRG-1" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="id" /> + </mapping> + </element> + <element> + <path value="Patient.link.other.id" /> + <short value="xml:id (or equivalent in JSON)" /> + <definition value="unique id for the element within a resource (for internal references)." /> + <comments value="RFC 4122" /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Element.id" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="id" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + </element> + <element> + <path value="Patient.link.other.extension" /> + <short value="Additional Content defined by implementations" /> + <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of 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 SHALL 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 level of simplicity for everyone." /> + <alias value="extensions" /> + <alias value="user content" /> + <min value="0" /> + <max value="*" /> + <base> + <path value="Element.extension" /> + <min value="0" /> + <max value="*" /> + </base> + <type> + <code value="Extension" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link.other.reference" /> + <short value="Relative, internal or absolute URL reference" /> + <definition value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources." /> + <comments value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure "/[type]/[id]" then it should be assumed that the reference is to a FHIR RESTful server." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.reference" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <condition value="ref-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link.other.display" /> + <short value="Text alternative for the resource" /> + <definition value="Plain text narrative that identifies the resource in addition to the resource reference." /> + <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it." /> + <min value="0" /> + <max value="1" /> + <base> + <path value="Reference.display" /> + <min value="0" /> + <max value="1" /> + </base> + <type> + <code value="string" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isSummary value="true" /> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="N/A" /> + </mapping> + </element> + <element> + <path value="Patient.link.type" /> + <short value="replace | refer | seealso - type of link" /> + <definition value="The type of link between this patient resource and another patient resource." /> + <comments value="Note that FHIR strings may not exceed 1MB in size" /> + <min value="1" /> + <max value="1" /> + <base> + <path value="Patient.link.type" /> + <min value="1" /> + <max value="1" /> + </base> + <type> + <code value="code" /> + </type> + <condition value="ele-1" /> + <constraint> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> + <valueString value="children()" /> + </extension> + <key value="ele-1" /> + <severity value="error" /> + <human value="All FHIR elements must have a @value or children" /> + <xpath value="@value|f:*|h:div" /> + </constraint> + <isModifier value="true" /> + <binding> + <strength value="required" /> + <description value="The type of link between this patient resource and another patient resource." /> + <valueSet value="http://hl7.org/fhir/ValueSet/link-type" /> + </binding> + <mapping> + <identity value="rim" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="cda" /> + <map value="n/a" /> + </mapping> + <mapping> + <identity value="rim" /> + <map value="typeCode" /> + </mapping> + </element> + </snapshot> + <differential> + <element> + <path value="Patient" /> + <short value="The Patient resource carries the patient demographic details." /> + <type> + <code value="Patient" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + </element> + <element> + <path value="Patient.extension" /> + <name value="registrationDetails" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-RegistrationDetails-1" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="ethnicCategory" /> + <max value="1" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-EthnicCategory-1" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="religiousAffiliation" /> + <max value="1" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-ReligiousAffiliation-1" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="patient-cadavericDonor" /> + <max value="1" /> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="residentialStatus" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-ResidentialStatus-1" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="treatmentCategory" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-TreatmentCategory-1" /> + </type> + </element> + <element> + <path value="Patient.extension" /> + <name value="nhsCommunication" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-NHSCommunication-1" /> + </type> + </element> + <element> + <path value="Patient.identifier" /> + <slicing> + <discriminator value="system" /> + <ordered value="true" /> + <rules value="openAtEnd" /> + </slicing> + </element> + <element> + <path value="Patient.identifier" /> + <name value="nhsNumber" /> + <short value="The patient's NHS number" /> + <definition value="The patient's NHS number" /> + <max value="1" /> + </element> + <element> + <path value="Patient.identifier.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + </element> + <element> + <path value="Patient.identifier.extension" /> + <name value="nhsNumberVerificationStatus" /> + <min value="1" /> + <max value="1" /> + <type> + <code value="Extension" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1" /> + </type> + </element> + <element> + <path value="Patient.identifier.use" /> + <max value="0" /> + </element> + <element> + <path value="Patient.identifier.type" /> + <max value="0" /> + <binding> + <strength value="extensible" /> + <valueSet value="http://hl7.org/fhir/ValueSet/identifier-type" /> + </binding> + </element> + <element> + <path value="Patient.identifier.system" /> + <min value="1" /> + <fixedUri value="https://fhir.nhs.uk/Id/nhs-number" /> + </element> + <element> + <path value="Patient.identifier.value" /> + <short value="Ten numeric digit NHS number" /> + <min value="1" /> + </element> + <element> + <path value="Patient.identifier.period" /> + <max value="0" /> + </element> + <element> + <path value="Patient.identifier.assigner" /> + <max value="0" /> + </element> + <element> + <path value="Patient.identifier" /> + <name value="localIdentifier" /> + <short value=" The patient's other identifiers" /> + </element> + <element> + <path value="Patient.identifier.system" /> + <min value="1" /> + <fixedUri value="https://fhir.nhs.uk/Id/local-patient-identifier" /> + </element> + <element> + <path value="Patient.identifier.value" /> + <min value="1" /> + </element> + <element> + <path value="Patient.identifier.assigner" /> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + </element> + <element> + <path value="Patient.name" /> + <slicing> + <discriminator value="use" /> + <discriminator value="period.end" /> + <ordered value="false" /> + <rules value="openAtEnd" /> + </slicing> + <min value="1" /> + </element> + <element> + <path value="Patient.name" /> + <name value="usual" /> + <short value="The patient's current usual name" /> + <definition value="The patient's current usual name" /> + <min value="1" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.use" /> + <min value="1" /> + <fixedCode value="usual" /> + </element> + <element> + <path value="Patient.name.family" /> + <min value="1" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.prefix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.suffix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.period.end" /> + <max value="0" /> + </element> + <element> + <path value="Patient.name" /> + <name value="other" /> + <short value="The patient's other names" /> + <definition value="The patient's other names" /> + </element> + <element> + <path value="Patient.name.use" /> + <min value="1" /> + </element> + <element> + <path value="Patient.name.family" /> + <min value="1" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.prefix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.name.suffix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.telecom.system" /> + <min value="1" /> + </element> + <element> + <path value="Patient.telecom.value" /> + <min value="1" /> + </element> + <element> + <path value="Patient.telecom.rank" /> + <max value="0" /> + </element> + <element> + <path value="Patient.gender" /> + <min value="1" /> + <binding> + <strength value="required" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1" /> + </binding> + </element> + <element> + <path value="Patient.birthDate" /> + <short value="The date of birth for the patient" /> + <min value="1" /> + </element> + <element> + <path value="Patient.birthDate.extension" /> + <slicing> + <discriminator value="url" /> + <rules value="open" /> + </slicing> + </element> + <element> + <path value="Patient.birthDate.extension" /> + <name value="patient-birthTime" /> + <type> + <code value="Extension" /> + <profile value="http://hl7.org/fhir/StructureDefinition/patient-birthTime" /> + </type> + </element> + <element> + <path value="Patient.address.text" /> + <exampleString value="42 Grove Street, Overtown, West Yorkshire, LS21 1PF" /> + </element> + <element> + <path value="Patient.address.line" /> + <exampleString value="42, Grove Street" /> + </element> + <element> + <path value="Patient.address.city" /> + <exampleString value="Overtown" /> + </element> + <element> + <path value="Patient.address.district" /> + <exampleString value="West Yorkshire" /> + </element> + <element> + <path value="Patient.address.state" /> + <max value="0" /> + </element> + <element> + <path value="Patient.address.postalCode" /> + <exampleString value="LS21 1PF" /> + </element> + <element> + <path value="Patient.address.country" /> + <exampleString value="GBR" /> + </element> + <element> + <path value="Patient.address.period" /> + <examplePeriod> + <start value="2010-03-23T00:00:00" /> + <end value="2010-07-01T00:00:00" /> + </examplePeriod> + </element> + <element> + <path value="Patient.maritalStatus" /> + <binding> + <strength value="required" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-MaritalStatus-1" /> + </binding> + </element> + <element> + <path value="Patient.maritalStatus.coding" /> + <min value="1" /> + <max value="1" /> + </element> + <element> + <path value="Patient.maritalStatus.coding.system" /> + <min value="1" /> + <exampleUri value="http://hl7.org/fhir/v3/MaritalStatus" /> + </element> + <element> + <path value="Patient.maritalStatus.coding.version" /> + <max value="0" /> + </element> + <element> + <path value="Patient.maritalStatus.coding.code" /> + <min value="1" /> + </element> + <element> + <path value="Patient.maritalStatus.coding.display" /> + <min value="1" /> + </element> + <element> + <path value="Patient.maritalStatus.coding.userSelected" /> + <max value="0" /> + </element> + <element> + <path value="Patient.maritalStatus.text" /> + <max value="0" /> + </element> + <element> + <path value="Patient.photo" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.relationship" /> + <binding> + <strength value="extensible" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-PersonRelationshipType-1" /> + </binding> + </element> + <element> + <path value="Patient.contact.relationship.coding.system" /> + <min value="1" /> + <exampleUri value="https://fhir.hl7.org.uk/CareConnect-PersonRelationshipType-1" /> + </element> + <element> + <path value="Patient.contact.relationship.coding.version" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.relationship.coding.code" /> + <min value="1" /> + </element> + <element> + <path value="Patient.contact.relationship.coding.display" /> + <min value="1" /> + </element> + <element> + <path value="Patient.contact.relationship.coding.userSelected" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.relationship.text" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.name" /> + <min value="1" /> + </element> + <element> + <path value="Patient.contact.name.use" /> + <min value="1" /> + </element> + <element> + <path value="Patient.contact.name.text" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.name.family" /> + <min value="1" /> + <max value="1" /> + </element> + <element> + <path value="Patient.contact.name.prefix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.contact.name.suffix" /> + <max value="1" /> + </element> + <element> + <path value="Patient.contact.name.period" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.telecom.rank" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.address.text" /> + <exampleString value="120, Grove Street, Overtown, West Yorkshire, LS21 1PT" /> + </element> + <element> + <path value="Patient.contact.address.line" /> + <exampleString value="120, Grove Street" /> + </element> + <element> + <path value="Patient.contact.address.city" /> + <exampleString value="Overtown" /> + </element> + <element> + <path value="Patient.contact.address.district" /> + <exampleString value="West Yorkshire" /> + </element> + <element> + <path value="Patient.contact.address.state" /> + <max value="0" /> + </element> + <element> + <path value="Patient.contact.address.postalCode" /> + <exampleString value="LS21 1PT" /> + </element> + <element> + <path value="Patient.contact.address.country" /> + <exampleString value="GBR" /> + </element> + <element> + <path value="Patient.contact.address.period" /> + <examplePeriod> + <start value="2010-03-23T00:00:00" /> + <end value="2010-07-01T00:00:00" /> + </examplePeriod> + </element> + <element> + <path value="Patient.contact.gender" /> + <binding> + <strength value="required" /> + <valueSet value="https://fhir.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1" /> + </binding> + </element> + <element> + <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name"> + <valueString value="Animal" /> + </extension> + <path value="Patient.animal" /> + <max value="0" /> + </element> + <element> + <path value="Patient.communication" /> + <max value="0" /> + </element> + <element> + <path value="Patient.careProvider" /> + <short value="Patient's nominated practitioner" /> + <max value="1" /> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Practitioner-1" /> + </type> + </element> + <element> + <path value="Patient.managingOrganization" /> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Organization-1" /> + </type> + </element> + <element> + <path value="Patient.link.other" /> + <type> + <code value="Reference" /> + <profile value="https://fhir.hl7.org.uk/StructureDefinition/CareConnect-Patient-1" /> + </type> + </element> + </differential> +</StructureDefinition> \ No newline at end of file