Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AdvanceDirectivesSectionEntriesOptionalTest8000.1402013-01-31T13:34:37JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetAdvanceDirectiveObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.023
testValidateAdvanceDirectivesSectionEntriesOptionalTemplateId

Constraint

The 'AdvanceDirectivesSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.consol.impl.AdvanceDirectivesSectionImpl@fc8fdf4{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.21.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.21.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
</section>

0.007
testValidateAdvanceDirectivesSectionEntriesOptionalCode

Constraint

Consol Advance Directives Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15340)/@code="42348-3" Advance Directives (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15342)

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 = '42348-3' 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.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
</section>

0.042
testValidateAdvanceDirectivesSectionEntriesOptionalCodeP

Constraint

Consol Advance Directives Section Entries Optional SHALL contain exactly one [1..1] code (CONF:15340)/@code="42348-3" Advance Directives (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15342)

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.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
</section>

0.019
testValidateAdvanceDirectivesSectionEntriesOptionalTitle

Constraint

Consol Advance Directives Section Entries Optional SHALL contain exactly one [1..1] title (CONF:7930)

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.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
<title>title</title>
</section>

0.021
testValidateAdvanceDirectivesSectionEntriesOptionalText

Constraint

Consol Advance Directives Section Entries Optional SHALL contain exactly one [1..1] text (CONF:7931)

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.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
<text/>
</section>

0.007
testValidateAdvanceDirectivesSectionEntriesOptionalAdvanceDirectiveObservation

Constraint

Consol Advance Directives Section Entries Optional MAY contain zero or more [0..*] entry (CONF:7957, CONF:8800) Contains exactly one [1..1] Advance Directive Observation (templateId: 2.16.840.1.113883.10.20.22.4.48)

OCL

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

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.21"/>
<code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance Directives"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.48"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.017
Properties »