Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
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.008
testValidateEncountersSectionEntriesOptionalCode

Constraint

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

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

0.058
testValidateEncountersSectionEntriesOptionalCodeP

Constraint

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

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

0.025
testValidateEncountersSectionEntriesOptionalTitle

Constraint

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

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

0.027
testValidateEncountersSectionEntriesOptionalText

Constraint

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

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

0.009
testValidateEncountersSectionEntriesOptionalEncounterActivities

Constraint

Consol Encounters Section Entries Optional SHOULD contain zero or more [0..*] entry (CONF:7951, CONF:8802) 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"/>
<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
testGetEncounterActivitiess

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
Properties »