Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
EncountersSectionTest8000.1822013-01-31T13:34:53JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateEncountersSectionCode

Constraint

Consol Encounters Section SHALL contain exactly one [1..1] code (CONF:15466)/@code="46240-8" Encounters (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15467)

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 = '46240-8' 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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
</section>

0.060
testValidateEncountersSectionTitle

Constraint

Consol Encounters Section SHALL contain exactly one [1..1] title (CONF:8707)

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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
<title>title</title>
</section>

0.028
testValidateEncountersSectionText

Constraint

Consol Encounters Section SHALL contain exactly one [1..1] text (CONF:8708)

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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
<text/>
</section>

0.009
testValidateEncountersSectionEntriesOptionalTemplateId

Constraint

The 'EncountersSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.EncountersSectionImpl@3bc7fe3e{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.22.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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22.1"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
</section>

0.009
testValidateEncountersSectionCodeP

Constraint

Consol Encounters Section SHALL contain exactly one [1..1] code (CONF:15466)/@code="46240-8" Encounters (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15467)

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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
</section>

0.026
testValidateEncountersSectionEncounterActivities

Constraint

Consol Encounters Section SHALL contain at least one [1..*] entry (CONF:8709, CONF:8803) Contains exactly one [1..1] Encounter Activities (templateId: 2.16.840.1.113883.10.20.22.4.49)

OCL

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

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.22.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.22"/>
<code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Encounters"/>
<entry>
<encounter classCode="ENC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.49"/>
<code codeSystem="2.16.840.1.113883.6.12" codeSystemName="CPT-4"/>
</encounter>
</entry>
</section>

0.021
testGetConsolEncounterActivitiess

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
Properties »