Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetProcedureActivityProcedures

Constraint

OCL

SuccessInvalid XML

Valid XML

0.039
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.015
testValidateProceduresSectionEntriesOptionalCode

Constraint

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

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

0.099
testValidateProceduresSectionEntriesOptionalCodeP

Constraint

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

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

0.043
testValidateProceduresSectionEntriesOptionalTitle

Constraint

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

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

0.046
testValidateProceduresSectionEntriesOptionalText

Constraint

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

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

0.014
testValidateProceduresSectionEntriesOptionalProcedureActivityProcedure

Constraint

Consol Procedures Section Entries Optional MAY contain zero or more [0..*] entry (CONF:6274, CONF:15509) 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"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<procedure/>
</entry>
</section>

0.035
testValidateProceduresSectionEntriesOptionalProcedureAcivityObservation

Constraint

Consol Procedures Section Entries Optional MAY contain zero or more [0..*] entry (CONF:6278, CONF:15510) 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"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<observation/>
</entry>
</section>

0.035
testValidateProceduresSectionEntriesOptionalProcedureActivityAct

Constraint

Consol Procedures Section Entries Optional MAY contain zero or more [0..*] entry (CONF:8533, CONF:15511) 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"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of Procedures"/>
<entry>
<act/>
</entry>
</section>

0.035
testGetProcedureAcivityObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.039
testGetProcedureActivityActs

Constraint

OCL

SuccessInvalid XML

Valid XML

0.039
Properties »