Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.FunctionalStatusSectionTest

NameTestsErrorsFailuresTime(s)Time StampHost
FunctionalStatusSectionTest12000.1062013-01-31T13:34:13JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateFunctionalStatusSectionClinicalStatements

Constraint

CCD Functional Status Section SHOULD satisfy: Contains one or more Problem Act and/or Result Organizer (CONF-123)

OCL

self.getEntryTargets(ccd::ProblemAct)->size() > 0 or self.getEntryTargets(ccd::ResultOrganizer)->size() > 0

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<act/>
</entry>
</section>

0.009
testValidateFunctionalStatusSectionObservationCode

Constraint

CCD Functional Status Section problem observation or result observation in the functional status section SHALL contain exactly one observation / code (CONF-128)

OCL

self.getObservations()->select(obs : cda::Observation | obs.oclIsKindOf(ccd::ProblemObservation) or obs.oclIsKindOf(ccd::ResultObservation))->forAll(ob : cda::Observation| ob.code->size() = 1)

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation/>
</entry>
</section>

Valid XML


<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<code xsi:type="CE"/>
</observation>
</entry>
</section>

0.010
testValidateFunctionalStatusSectionObservationCodeValueSet

Constraint

CCD Functional Status Section The value for Observation / code in a problem observation or result observation in the functional status section MAY be selected from ValueSet 2.16.840.1.113883.1.11.20.6 FunctionalStatusTypeCode STATIC 20061017 (CONF-129)

OCL

self.getObservations()->select(obs : cda::Observation | obs.oclIsKindOf(ccd::ProblemObservation) or obs.oclIsKindOf(ccd::ResultObservation))->forAll(ob : cda::Observation| ob.code.codeSystem = '2.16.840.1.113883.6.96')

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation/>
</entry>
</section>

Valid XML


<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<code xsi:type="CE" codeSystem="2.16.840.1.113883.6.96"/>
</observation>
</entry>
</section>

0.009
testValidateFunctionalStatusSectionValueDatatype

Constraint

CCD Functional Status Section Observation / value in a result observation in the functional status section MAY be of datatype CE or CD and MAY contain one or more Observation / value / translation, to represent equivalent values from other code systems. (CONF-134)

OCL

self.getObservations()->select(o | o.value->select(v | v.oclIsKindOf(datatypes::CD) or v.oclIsKindOf(datatypes::CE) ) ->isEmpty())->isEmpty()

SuccessInvalid XML


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

Valid XML


<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<value xsi:type="CE"/>
<value xsi:type="CD"/>
</observation>
</entry>
</section>

0.009
testValidateFunctionalStatusSectionIcfCodeSystem

Constraint

CCD Functional Status Section A problem observation or result observation in the functional status section MAY use codes from the International Classification of Functioning, Disability, and Health (ICF, http://www.who.int/classifications/icf/en/) (codeSystem 2.16.840.1.113883.6.254). (CONF-135)

OCL

self.getObservations()->select(o|o.code.codeSystem <> '2.16.840.1.113883.6.254')->isEmpty()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<code codeSystem="fffff"/>
</observation>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<code codeSystem="2.16.840.1.113883.6.254"/>
</observation>
</entry>
</section>

0.008
testValidateFunctionalStatusSectionProblemStatusObservation

Constraint

CCD Functional Status Section A problem observation in the functional status section SHALL contain exactly one status of functional status observation (CONF-136)

OCL

self.getObservations()->select(obs : cda::Observation | (obs.oclIsKindOf(ccd::ResultObservation) or obs.oclIsKindOf(ccd::ProblemObservation)))->forAll(ob : cda::Observation | ob.getObservations()->select(o: cda::Observation | o.oclIsKindOf(ccd::FunctionalStatusObservation))->size() = 1)

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation/>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>
</entry>
</section>

0.011
testValidateFunctionalStatusSectionResultStatusObservation

Constraint

CCD Functional Status Section A result observation in the functional status section SHALL contain exactly one status of functional status observation. (CONF-137)

OCL

self.getObservations()->select(obs : cda::Observation | (obs.oclIsKindOf(ccd::ResultObservation) or obs.oclIsKindOf(ccd::ProblemObservation)))->forAll(ob : cda::Observation | ob.getObservations()->select(o: cda::Observation | o.oclIsKindOf(ccd::FunctionalStatusObservation))->size() = 1)

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation/>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.5"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<entry>
<observation>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>
</entry>
</section>

0.012
testValidateFunctionalStatusSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10389 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.14"

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.14"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
</section>

0.004
testValidateFunctionalStatusSectionCode

Constraint

Consol Functional Status Section SHALL contain exactly one [1..1] code/@code="47420-5" Functional status assessment (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:7921)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.code = '47420-5' and value.codeSystem = '2.16.840.1.113883.6.1')

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.14"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
</section>

0.015
testValidateFunctionalStatusSectionTitle

Constraint

Consol Functional Status Section SHALL contain exactly one [1..1] title (CONF:7922)

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.14"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<title>title</title>
</section>

0.008
testValidateFunctionalStatusSectionText

Constraint

Consol Functional Status Section SHALL contain exactly one [1..1] text (CONF:7923)

OCL

not self.text.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.14"/>
<code code="47420-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Functional status assessment"/>
<text/>
</section>

0.004
Properties »