Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProceduresSectionTest13000.5102013-01-31T13:36:12JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateProceduresSectionHasProcedureActivity

Constraint

Consol Procedures Section There SHALL be at least one procedure, observation or act entry conformant to Procedure Activity Procedure template, Procedure Activity Observation template or Procedure Activity Act template in the Procedure Section. (CONF:8021)

OCL

self.getActs()->exists(a : cda::Act | a.oclIsKindOf(consol::ProcedureActivityAct)) or self.getObservations()->exists(o : cda::Observation | o.oclIsKindOf(consol::ProcedureActivityObservation)) or self.getProcedures()->exists(p : cda::Procedure | p.oclIsKindOf(consol::ProcedureActivityProcedure))

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<procedure/>
</entry>
</section>

0.057
testValidateProceduresSectionCode

Constraint

Consol Procedures Section SHALL contain exactly one [1..1] code (CONF:15425)/@code="47519-4" History of procedures (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15426)

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 = '47519-4' 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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
</section>

0.101
testValidateProceduresSectionTitle

Constraint

Consol Procedures Section SHALL contain exactly one [1..1] title (CONF:7893)

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<title>Procedures</title>
</section>

0.049
testValidateProceduresSectionText

Constraint

Consol Procedures Section SHALL contain exactly one [1..1] text (CONF:7894)

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<text/>
</section>

0.015
testValidateProceduresSectionEntriesOptionalTemplateId

Constraint

The 'ProceduresSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ProceduresSectionImpl@21bc663{#//}'

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.2.7.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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7.1"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of procedures"/>
</section>

0.013
testValidateProceduresSectionCodeP

Constraint

Consol Procedures Section SHALL contain exactly one [1..1] code (CONF:15425)/@code="47519-4" History of procedures (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15426)

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
</section>

0.045
testValidateProceduresSectionProcedureActivityProcedure

Constraint

Consol Procedures Section MAY contain zero or more [0..*] entry (CONF:7895, CONF:7896) Contains exactly one [1..1] Procedure Activity Procedure (templateId: 2.16.840.1.113883.10.20.22.4.14)

OCL

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

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<procedure/>
</entry>
</section>

0.035
testValidateProceduresSectionProcedureActivityObservation

Constraint

Consol Procedures Section MAY contain zero or more [0..*] entry (CONF:8017, CONF:8018) Contains exactly one [1..1] Procedure Activity Observation (templateId: 2.16.840.1.113883.10.20.22.4.13)

OCL

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

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<observation/>
</entry>
</section>

0.036
testValidateProceduresSectionProcedureActivityAct

Constraint

Consol Procedures Section MAY contain zero or more [0..*] entry (CONF:8019, CONF:8020) Contains exactly one [1..1] Procedure Activity Act (templateId: 2.16.840.1.113883.10.20.22.4.12)

OCL

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

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.7.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.7"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<act/>
</entry>
</section>

0.036
testGetConsolProcedureActivityProcedures

Constraint

OCL

SuccessInvalid XML

Valid XML

0.040
testGetProcedureActivityObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.040
testGetConsolProcedureActivityActs

Constraint

OCL

SuccessInvalid XML

Valid XML

0.040
Properties »