Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
InstructionsSectionTest8000.2312013-01-31T13:35:27JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateInstructionsSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10112, CONF:10402 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.45"

OCL

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

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.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
</section>

0.011
testValidateInstructionsSectionCode

Constraint

Consol Instructions Section SHALL contain exactly one [1..1] code (CONF:15375)/@code="69730-0" Instructions (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15376)

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 = '69730-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.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
</section>

0.077
testValidateInstructionsSectionCodeP

Constraint

Consol Instructions Section SHALL contain exactly one [1..1] code (CONF:15375)/@code="69730-0" Instructions (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15376)

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.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
</section>

0.033
testValidateInstructionsSectionText

Constraint

Consol Instructions Section SHALL contain exactly one [1..1] text (CONF:10115)

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.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
<text/>
</section>

0.012
testValidateInstructionsSectionTitle

Constraint

Consol Instructions Section SHALL contain exactly one [1..1] title (CONF:10114)

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.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
<title>title</title>
</section>

0.036
testValidateInstructionsSectionInstructions

Constraint

Consol Instructions Section SHOULD contain zero or more [0..*] entry (CONF:10116, CONF:10117) Contains exactly one [1..1] Instructions (templateId: 2.16.840.1.113883.10.20.22.4.20)

OCL

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

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.45"/>
<code code="69730-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Instructions"/>
<entry>
<act classCode="ACT" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.20"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</act>
</entry>
</section>

0.028
testGetInstructionss

Constraint

OCL

SuccessInvalid XML

Valid XML

0.031
Properties »