Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.CognitiveStatusResultObservationTest

NameTestsErrorsFailuresTime(s)Time StampHost
CognitiveStatusResultObservationTest28000.6732013-01-31T13:34:43JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateResultObservationTemplateId

Constraint

The 'ResultObservationTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ResultObservationImpl@69e6c569{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.4.2')

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
</observation>

0.012
testGetNonMedicinalSupplyActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.020
testGetCaregiverCharacteristicss

Constraint

OCL

SuccessInvalid XML

Valid XML

0.020
testGetAssessmentScaleObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.020
testValidateCognitiveStatusResultObservationTextReference

Constraint

Consol Cognitive Status Result Observation text, if present, SHOULD contain zero or one [0..1] reference/@value (CONF:15924)

OCL

not self.text.oclIsUndefined() implies (self.text->forAll(reference->size() = 1) and self.text->forAll(reference->one(value->size() = 1)))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<text/>
<statusCode code="completed"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<text><reference value="test"/></text>
<statusCode code="completed"/>
</observation>

0.043
testValidateCognitiveStatusResultObservationTextReferenceValue

Constraint

Consol Cognitive Status Result Observation This reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:15926)

OCL

not self.text.reference.value.oclIsUndefined() implies not self.getSection().text.getText(self.text.reference.value.substring(2, self.text.reference.value.size())).oclIsUndefined()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="">
No particular health status observed.
</content></text>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<statusCode code="completed"/>
</observation>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="1.2.3.4">
No particular health status observed.
</content></text>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.044
testValidateCognitiveStatusResultObservationValueDatatype

Constraint

Consol Cognitive Status Result Observation If value/@xsi:type=CD, SHOULD contain a code from SNOMED CT (CodeSystem: 2.16.840.1.113883.6.96) (CONF:14271)

OCL

self.value->forAll(val | val.oclIsTypeOf(datatypes::CD) implies (val.isNullFlavorDefined() or val.oclAsType(datatypes::CD).codeSystem = '2.16.840.1.113883.6.96'))

SuccessInvalid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3">
<value xsi:type="CD"/>
</observation>

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</observation>

0.018
testValidateCognitiveStatusResultObservationClassCode

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14249)

OCL

self.classCode=vocab::ActClassObservation::OBS

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.005
testValidateCognitiveStatusResultObservationMoodCode

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14250)

OCL

self.moodCode=vocab::x_ActMoodDocumentObservation::EVN

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.024
testValidateCognitiveStatusResultObservationId

Constraint

Consol Cognitive Status Result Observation SHALL contain at least one [1..*] id (CONF:14257)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<id/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.025
testValidateCognitiveStatusResultObservationCodeP

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] code (CONF:14591)/@code="373930000" Cognitive function finding (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:14592)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.022
testValidateCognitiveStatusResultObservationCode

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] code (CONF:14591)/@code="373930000" Cognitive function finding (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:14592)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = '373930000' and value.codeSystem = '2.16.840.1.113883.6.96')

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code xsi:type="CE" code="373930000" codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
</observation>

0.047
testValidateCognitiveStatusResultObservationText

Constraint

Consol Cognitive Status Result Observation SHOULD contain zero or one [0..1] text (CONF:14258)

OCL

(self.text.oclIsUndefined() or self.text.isNullFlavorUndefined()) implies (not self.text.oclIsUndefined())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<text/>
<statusCode code="completed"/>
</observation>

0.022
testValidateCognitiveStatusResultObservationStatusCodeP

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] statusCode (CONF:14254)/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.025
testValidateCognitiveStatusResultObservationStatusCode

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] statusCode (CONF:14254)/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
</observation>

0.048
testValidateCognitiveStatusResultObservationEffectiveTime

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] effectiveTime (CONF:14261)

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.oclIsUndefined())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<effectiveTime/>
</observation>

0.026
testValidateCognitiveStatusResultObservationValue

Constraint

Consol Cognitive Status Result Observation SHALL contain exactly one [1..1] value (CONF:14263)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (not self.value->isEmpty())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<value xsi:type="CD"/>
</observation>

0.024
testValidateCognitiveStatusResultObservationInterpretationCode

Constraint

Consol Cognitive Status Result Observation SHOULD contain zero or more [0..*] interpretationCode (CONF:14264)

OCL

(self.interpretationCode->isEmpty() or self.interpretationCode->exists(element | element.isNullFlavorUndefined())) implies (not self.interpretationCode->isEmpty())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<interpretationCode/>
</observation>

0.024
testValidateCognitiveStatusResultObservationMethodCode

Constraint

Consol Cognitive Status Result Observation MAY contain zero or one [0..1] methodCode (CONF:14265)

OCL

(self.methodCode->isEmpty() or self.methodCode->exists(element | element.isNullFlavorUndefined())) implies (not self.methodCode->isEmpty())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<methodCode/>
</observation>

0.024
testValidateCognitiveStatusResultObservationTargetSiteCode

Constraint

Consol Cognitive Status Result Observation MAY contain zero or one [0..1] targetSiteCode (CONF:14270)

OCL

(self.targetSiteCode->isEmpty() or self.targetSiteCode->exists(element | element.isNullFlavorUndefined())) implies (not self.targetSiteCode->isEmpty())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<targetSiteCode/>
</observation>

0.025
testValidateCognitiveStatusResultObservationAuthor

Constraint

Consol Cognitive Status Result Observation MAY contain zero or one [0..1] author (CONF:14266) Contains exactly one [1..1] CDA Author

OCL

self.author->one(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(rim::Participation))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<author/>
</observation>

0.015
testValidateCognitiveStatusResultObservationNonMedicinalSupplyActivity

Constraint

Consol Cognitive Status Result Observation MAY contain zero or more [0..*] entryRelationship (CONF:14272, CONF:14593, CONF:14273) Contains @typeCode="REFR" REFR, and Contains exactly one [1..1] Non Medicinal Supply Activity (templateId: 2.16.840.1.113883.10.20.22.4.50)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.supply.oclIsUndefined() and entryRelationship.supply.oclIsKindOf(consol::NonMedicinalSupplyActivity) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<supply/>
</entryRelationship>
</observation>

0.024
testValidateCognitiveStatusResultObservationCaregiverCharacteristics

Constraint

Consol Cognitive Status Result Observation MAY contain zero or more [0..*] entryRelationship (CONF:14276, CONF:14594, CONF:14277) Contains @typeCode="REFR" REFR, and Contains exactly one [1..1] Caregiver Characteristics (templateId: 2.16.840.1.113883.10.20.22.4.72)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::CaregiverCharacteristics) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<observation/>
</entryRelationship>
</observation>

0.024
testValidateCognitiveStatusResultObservationAssessmentScaleObservation

Constraint

Consol Cognitive Status Result Observation MAY contain zero or more [0..*] entryRelationship (CONF:14469, CONF:14595, CONF:14470) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Assessment Scale Observation (templateId: 2.16.840.1.113883.10.20.22.4.69)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::AssessmentScaleObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<entryRelationship typeCode="COMP">
<observation/>
</entryRelationship>
</observation>

0.024
testValidateCognitiveStatusResultObservationReferenceRange

Constraint

Consol Cognitive Status Result Observation SHOULD contain zero or more [0..*] referenceRange (CONF:14267)

OCL

self.referenceRange->exists(referenceRange : cda::ReferenceRange | not referenceRange.oclIsUndefined() and referenceRange.oclIsKindOf(cda::ReferenceRange))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3"/>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<referenceRange/>
</observation>

0.016
testValidateCognitiveStatusResultObservationReferenceRangeObservationRangeNoCode

Constraint

Consol Cognitive Status Result Observation SHOULD contain zero or more [0..*] referenceRange (CONF:14267) each SHALL contain exactly one [1..1] observationRange, where (CONF:14268) observationRange observationRange SHALL NOT contain [0..0] code (CONF:13939)

OCL

self.referenceRange->excluding(null).observationRange->excluding(null)->reject(code.oclIsUndefined())

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<referenceRange>
<observationRange>
<code/>
</observationRange>
</referenceRange>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<referenceRange>
<observationRange/>
</referenceRange>
</observation>

0.017
testValidateCognitiveStatusResultObservationReferenceRangeObservationRange

Constraint

Consol Cognitive Status Result Observation SHOULD contain zero or more [0..*] referenceRange (CONF:14267) referenceRange SHALL contain exactly one [1..1] observationRange, where its type is Observation Range (CONF:13938)

OCL

self.referenceRange->excluding(null)->reject(observationRange->one(observationRange : cda::ObservationRange | not observationRange.oclIsUndefined() and observationRange.oclIsKindOf(cda::ObservationRange)))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<referenceRange/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.74"/>
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<code code="373930000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Cognitive function finding"/>
<statusCode code="completed"/>
<referenceRange>
<observationRange/>
</referenceRange>
</observation>

0.023
Properties »