Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
HistoryOfPastIllnessSectionTest8000.2262013-01-31T13:35:18JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateHistoryOfPastIllnessSectionTemplateId

Constraint

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

OCL

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

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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
</section>

0.011
testValidateHistoryOfPastIllnessSectionCode

Constraint

Consol History Of Past Illness Section SHALL contain exactly one [1..1] code (CONF:15474)/@code="11348-0" HISTORY OF PAST ILLNESS (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15475)

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 = '11348-0' 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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
</section>

0.073
testGetProblemObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.029
testValidateHistoryOfPastIllnessSectionCodeP

Constraint

Consol History Of Past Illness Section SHALL contain exactly one [1..1] code (CONF:15474)/@code="11348-0" HISTORY OF PAST ILLNESS (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15475)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
</section>

0.032
testValidateHistoryOfPastIllnessSectionTitle

Constraint

Consol History Of Past Illness Section SHALL contain exactly one [1..1] title (CONF:7830)

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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
<title>title</title>
</section>

0.034
testValidateHistoryOfPastIllnessSectionText

Constraint

Consol History Of Past Illness Section SHALL contain exactly one [1..1] text (CONF:7831)

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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
<text/>
</section>

0.013
testValidateHistoryOfPastIllnessSectionProblemObservation

Constraint

Consol History Of Past Illness Section MAY contain zero or more [0..*] entry (CONF:8792) Contains exactly one [1..1] Problem Observation (templateId: 2.16.840.1.113883.10.20.22.4.4)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(consol::ProblemObservation))

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.20"/>
<code code="11348-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HISTORY OF PAST ILLNESS"/>
<entry>
<observation/>
</entry>
</section>

0.026
Properties »