Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PlanOfCareSectionTest20000.6352013-01-31T13:35:40JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePlanOfCareSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10435 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.10"

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>

0.012
testValidatePlanOfCareSectionCode

Constraint

Consol Plan Of Care Section SHALL contain exactly one [1..1] code (CONF:14749)/@code="18776-5" Treatment plan (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:14750)

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 = '18776-5' 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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>

0.085
testValidatePlanOfCareSectionTitle

Constraint

Consol Plan Of Care Section SHALL contain exactly one [1..1] title (CONF:16986)

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<title>title</title>
</section>

0.039
testValidatePlanOfCareSectionText

Constraint

Consol Plan Of Care Section SHALL contain exactly one [1..1] text (CONF:7725)

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<text/>
</section>

0.014
testValidatePlanOfCareSectionPlanOfCareActivityAct

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:7726.CONF:8804) Contains exactly one [1..1] Plan Of Care Activity Act (templateId: 2.16.840.1.113883.10.20.22.4.39)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<act/>
</entry>
</section>

0.030
testValidatePlanOfCareSectionPlanOfCareActivityEncounter

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:8805, CONF:8806) Contains exactly one [1..1] Plan Of Care Activity Encounter (templateId: 2.16.840.1.113883.10.20.22.4.40)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<encounter/>
</entry>
</section>

0.030
testValidatePlanOfCareSectionPlanOfCareActivityObservation

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:8808, CONF:8807) Contains exactly one [1..1] Plan Of Care Activity Observation (templateId: 2.16.840.1.113883.10.20.22.4.44)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<observation/>
</entry>
</section>

0.030
testValidatePlanOfCareSectionPlanOfCareActivityProcedure

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:8809, CONF:8810) Contains exactly one [1..1] Plan Of Care Activity Procedure (templateId: 2.16.840.1.113883.10.20.22.4.41)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<procedure/>
</entry>
</section>

0.030
testValidatePlanOfCareSectionPlanOfCareActivitySubstanceAdministration

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:8811, CONF:8812) Contains exactly one [1..1] Plan Of Care Activity Substance Administration (templateId: 2.16.840.1.113883.10.20.22.4.42)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<substanceAdministration/>
</entry>
</section>

0.029
testValidatePlanOfCareSectionPlanOfCareActivitySupply

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:8813, CONF:14756) Contains exactly one [1..1] Plan Of Care Activity Supply (templateId: 2.16.840.1.113883.10.20.22.4.43)

OCL

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

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<supply/>
</entry>
</section>

0.029
testGetPlanOfCareActivityActs

Constraint

OCL

SuccessInvalid XML

Valid XML

0.032
testGetInstructionss

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
testValidatePlanOfCareSectionCodeP

Constraint

Consol Plan Of Care Section SHALL contain exactly one [1..1] code (CONF:14749)/@code="18776-5" Treatment plan (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:14750)

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.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
</section>

0.036
testValidatePlanOfCareSectionInstructions

Constraint

Consol Plan Of Care Section MAY contain zero or more [0..*] entry (CONF:14695, CONF:16751) 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"/>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.10"/>
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
<entry>
<act/>
</entry>
</section>

0.030
testGetPlanOfCareActivityEncounters

Constraint

OCL

SuccessInvalid XML

Valid XML

0.034
testGetPlanOfCareActivityObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
testGetPlanOfCareActivityProcedures

Constraint

OCL

SuccessInvalid XML

Valid XML

0.034
testGetPlanOfCareActivitySubstanceAdministrations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
testGetPlanOfCareActivitySupplies

Constraint

OCL

SuccessInvalid XML

Valid XML

0.034
Properties »