Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.ConditionEntryTest

NameTestsErrorsFailuresTime(s)Time StampHost
ConditionEntryTest13000.2512013-01-31T13:34:31JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateProblemEntryValue

Constraint

IHE Problem Entry SHALL contain exactly one [1..1] value with data type CD

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_PROBLEM_ENTRY_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="111" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.003
testValidateConditionEntryHasOnsetDate

Constraint

HITSP Condition Entry The onset date SHALL be recorded in the &lt;low> element of the &lt;effectiveTime> element when known. (C83-[DE-7.01-1])

OCL

not self.effectiveTime.low.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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="low"/>
<high value="high"/>
</effectiveTime>
</observation>

0.009
testValidateConditionEntryHasResolutionDate

Constraint

HITSP Condition Entry The resolution data SHALL be recorded in the &lt;high> element of the &lt;effectiveTime> element when known. (C83-[DE-7.01-2])

OCL

not self.effectiveTime.high.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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="low"/>
<high value="high"/>
</effectiveTime>
</observation>

0.009
testValidateConditionEntryHasUnknownResolutionDate

Constraint

HITSP Condition Entry If the problem is known to be resolved, but the date of resolution is not known, then the &lt;high> element SHALL be present, and the nullFlavor attribute SHALL be set to 'UNK'. Therefore, the existence of an &lt;high> element within a problem does indicate that the problem has been resolved. (C83-[DE-7.01-3])

OCL

not self.effectiveTime.high.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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="low"/>
<high value="high"/>
</effectiveTime>
</observation>

0.009
testValidateConditionEntryCodeP

Constraint

HITSP Condition Entry SHOULD contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet Problem Type 2.16.840.1.113883.3.88.12.3221.7.2 STATIC 1 (C154-[DE-7.02-1])

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>

0.016
testValidateConditionEntryCode

Constraint

HITSP Condition Entry SHOULD contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet Problem Type 2.16.840.1.113883.3.88.12.3221.7.2 STATIC 1 (C154-[DE-7.02-1])

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.codeSystem = '2.16.840.1.113883.6.96' and (value.code = '404684003' or value.code = '409586006' or value.code = '282291009' or value.code = '64572001' or value.code = '248536006' or value.code = '418799008' or value.code = '55607006'))

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code code="404684003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>

0.068
testValidateConditionEntryText

Constraint

HITSP Condition Entry SHALL contain exactly one [1..1] text

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<text/>
<statusCode code="completed"/>
</observation>

0.018
testValidateConditionEntryValue

Constraint

HITSP Condition Entry SHALL contain exactly one [1..1] value, where the @code SHALL be selected from ValueSet Problem 2.16.840.1.113883.3.88.12.3221.7.4 STATIC 1

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and not value.code.oclIsUndefined()))

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="aaaa" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.043
testValidateConditionEntryAgeObservation

Constraint

HITSP Condition Entry MAY contain zero or one [0..1] entryRelationship (CONF-160) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] CCD Age Observation (templateId: 2.16.840.1.113883.10.20.1.38)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(ccd::AgeObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.38"/>
<code code="397659008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Age"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>

0.018
testValidateConditionEntryProblemStatusObservation

Constraint

HITSP Condition Entry MAY contain zero or one [0..1] entryRelationship Contains @typeCode="REFR" REFR, and Contains exactly one [1..1] IHE Problem Status Observation (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.1.1)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(ihe::ProblemStatusObservation) 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.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.1.1"/>
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<templateId root="2.16.840.1.113883.10.20.1.50"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>

0.019
testGetHITSPAgeObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.017
testGetHITSPProblemStatusObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.016
Properties »