Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PlanOfCareSectionTest18100.3212013-01-31T13:34:17JKMSoftware-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.004
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.016
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.009
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.005
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.008
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.008
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.008
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.008
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.008
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.008
testGetPlanOfCareActivities

Constraint

OCL

ErrorInvalid XML

Valid XML

N/A

java.lang.UnsupportedOperationException
at org.openhealthtools.mdht.uml.cda.ccd.operations.PlanOfCareSectionOperations.getPlanOfCareActivities(PlanOfCareSectionOperations.java:672)
at org.openhealthtools.mdht.uml.cda.ccd.impl.PlanOfCareSectionImpl.getPlanOfCareActivities(PlanOfCareSectionImpl.java:168)
at org.openhealthtools.mdht.uml.cda.ccd.tests.PlanOfCareSectionTest.testGetPlanOfCareActivities(PlanOfCareSectionTest.java:414)
0.000
testGetPlanOfCareActivityAct

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
testGetPlanOfCareActivityEncounter

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
testGetPlanOfCareActivityObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
testGetPlanOfCareActivityProcedure

Constraint

OCL

SuccessInvalid XML

Valid XML

0.012
testGetPlanOfCareActivitySubstanceAdministration

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testGetPlanOfCareActivitySupply

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
Properties »