Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProblemSectionTest8000.2772013-01-31T13:35:56JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateProblemSectionCode

Constraint

Consol Problem Section SHALL contain exactly one [1..1] code (CONF:15409)/@code="11450-4" Problem List (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15410)

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 = '11450-4' 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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
</section>

0.094
testValidateProblemSectionTitle

Constraint

Consol Problem Section SHALL contain exactly one [1..1] title (CONF:9181)

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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
<title>title</title>
</section>

0.044
testValidateProblemSectionText

Constraint

Consol Problem Section SHALL contain exactly one [1..1] text (CONF:9182)

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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
<text/>
</section>

0.013
testValidateProblemSectionEntriesOptionalTemplateId

Constraint

The 'ProblemSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.consol.impl.ProblemSectionImpl@46e6f9aa{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.5.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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
</section>

0.013
testValidateProblemSectionCodeP

Constraint

Consol Problem Section SHALL contain exactly one [1..1] code (CONF:15409)/@code="11450-4" Problem List (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15410)

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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
</section>

0.041
testValidateProblemSectionProblemConcern

Constraint

Consol Problem Section SHALL contain at least one [1..*] entry (CONF:9183) Contains exactly one [1..1] Problem Concern Act (templateId: 2.16.840.1.113883.10.20.22.4.3)

OCL

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

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.5.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.5"/>
<code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
<entry>
<act/>
</entry>
</section>

0.033
testGetConsolProblemConcerns

Constraint

OCL

SuccessInvalid XML

Valid XML

0.037
Properties »