Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
DischargeDietSectionTest6000.1262013-01-31T13:34:50JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateDischargeDietSectionTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
</section>

0.009
testValidateDischargeDietSectionCode

Constraint

Consol Discharge Diet Section SHALL contain exactly one [1..1] code (CONF:15459)/@code="42344-2" Discharge Diet (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15460)

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 = '42344-2' 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="1.3.6.1.4.1.19376.1.5.3.1.3.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
</section>

0.054
testValidateDischargeDietSectionCodeP

Constraint

Consol Discharge Diet Section SHALL contain exactly one [1..1] code (CONF:15459)/@code="42344-2" Discharge Diet (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15460)

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="1.3.6.1.4.1.19376.1.5.3.1.3.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
</section>

0.024
testValidateDischargeDietSectionTitle

Constraint

Consol Discharge Diet Section SHALL contain exactly one [1..1] title (CONF:7977)

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="1.3.6.1.4.1.19376.1.5.3.1.3.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
<title>title</title>
</section>

0.027
testValidateDischargeDietSectionText

Constraint

Consol Discharge Diet Section SHALL contain exactly one [1..1] text (CONF:7978)

OCL

not self.text.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.33"/>
<code code="42344-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge Diet"/>
<text/>
</section>

0.008
Properties »