Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ResultsSectionEntriesOptionalTest8000.3072013-01-31T13:36:20JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetResultOrganizers

Constraint

OCL

SuccessInvalid XML

Valid XML

0.043
testValidateResultsSectionEntriesOptionalTemplateId

Constraint

The 'ResultsSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ResultsSectionImpl@222f2141{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.3.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.3.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.3"/>
<templateId root="2.16.840.1.113883.10.20.22.2.3.1"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
</section>

0.014
testValidateResultsSectionEntriesOptionalCode

Constraint

Consol Results Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15431)/@code="30954-2" Relevant diagnostic tests and/or laboratory data (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15432)

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 = '30954-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">
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="Relevant diagnostic tests and/or laboratory data"/>
</section>

0.102
testValidateResultsSectionEntriesOptionalCodeP

Constraint

Consol Results Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15431)/@code="30954-2" Relevant diagnostic tests and/or laboratory data (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15432)

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.3"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
</section>

0.044
testValidateResultsSectionEntriesOptionalTitle

Constraint

Consol Results Section Entries Optional SHALL contain exactly one [1..1] title (CONF:8891)

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.3"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
<title>title</title>
</section>

0.048
testValidateResultsSectionEntriesOptionalText

Constraint

Consol Results Section Entries Optional SHALL contain exactly one [1..1] text (CONF:7118)

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.3"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
<text/>
</section>

0.015
testValidateResultsSectionEntriesOptionalResultOrganizer

Constraint

Consol Results Section Entries Optional SHOULD contain zero or more [0..*] entry (CONF:7119, CONF:7120) Contains exactly one [1..1] Result Organizer (templateId: 2.16.840.1.113883.10.20.22.4.1)

OCL

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

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.3"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
<entry>
<organizer/>
</entry>
</section>

0.038
Properties »