Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
SeriesActTest16000.5672013-01-31T13:36:21JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetSOPInstanceObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.043
testValidateSeriesActIdHasRoot

Constraint

Consol Series Act ids SHALL contain exactly one [1..1] @root (CONF:9225)

OCL

self.id->forAll( not root.oclIsUndefined() )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<id/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<id root="test"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.024
testValidateSeriesActIdNoExtension

Constraint

Consol Series Act ids SHALL NOT contain [0..0] @extension (CONF:9226)

OCL

self.id->forAll( extension.oclIsUndefined() )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<id extension="test"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<id root="test"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.018
testValidateSeriesActCodeQualifier

Constraint

Consol Series Act code SHALL contain exactly one [1..1] qualifier (CONF:9229)

OCL

self.code.qualifier->size() = 1

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code>
<qualifier>
<name code="121139"/>
</qualifier>
</code>
</act>

0.024
testValidateSeriesActCodeQualifierCode

Constraint

Consol Series Act This qualifier SHALL contain exactly one [1..1] name="121139" Modality (CodeSystem: DCM 1.2.840.10008.2.16.4) (CONF:9230)

OCL

self.code.qualifier.name->one(name : datatypes::CV | name.code = '121139' and name.codeSystem = '1.2.840.10008.2.16.4')

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code>
<qualifier>
<name code="121139" codeSystem="1.2.840.10008.2.16.4"/>
</qualifier>
</code>
</act>

0.035
testValidateSeriesActCodeQualifierValue

Constraint

Consol Series Act This qualifier SHALL contain exactly one [1..1] value with @xsi:type="ANY" (CONF:9231)

OCL

self.code.qualifier.value->one(val | not val.oclIsUndefined() and val.oclIsKindOf(datatypes::ANY))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code>
<qualifier>
<value codeSystem="1.2.840.10008.2.16.4"/>
</qualifier>
</code>
</act>

0.034
testValidateSeriesActCodeQualifierValueCode

Constraint

Consol Series Act SHALL satisfy: The value element code contains a modality code and codeSystem is 1.2.840.10008.2.16.4 (CONF:9232)

OCL

self.code.qualifier.value->one(val | (not val.oclIsUndefined() or val.isNullFlavorUndefined()) implies val.oclIsKindOf(datatypes::ANY) and val.codeSystem = '1.2.840.10008.2.16.4')

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code>
<qualifier>
<value codeSystem="1.2.840.10008.2.16.4"/>
</qualifier>
</code>
</act>

0.057
testValidateSeriesActTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10918, CONF:10919 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.63"

OCL

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

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.014
testValidateSeriesActClassCode

Constraint

Consol Series Act SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9222)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.009
testValidateSeriesActMoodCode

Constraint

Consol Series Act SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:9223)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.009
testValidateSeriesActCode

Constraint

Consol Series Act SHALL contain exactly one [1..1] code/@code="113015" (CodeSystem: 1.2.840.10008.2.16.4 DCM) (CONF:9228)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = '113015' and value.codeSystem = '1.2.840.10008.2.16.4')

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code xsi:type="CE" code="113015" codeSystem="1.2.840.10008.2.16.4"/>
</act>

0.099
testValidateSeriesActEffectiveTime

Constraint

Consol Series Act SHOULD contain zero or one [0..1] effectiveTime (CONF:9235)

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.oclIsUndefined())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
<effectiveTime/>
</act>

0.053
testValidateSeriesActId

Constraint

Consol Series Act SHALL contain at least one [1..*] id (CONF:9224)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<id/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

0.048
testValidateSeriesActText

Constraint

Consol Series Act MAY contain zero or one [0..1] text (CONF:9233)

OCL

(self.text.oclIsUndefined() or self.text.isNullFlavorUndefined()) implies (not self.text.oclIsUndefined())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3"/>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
<text/>
</act>

0.047
testValidateSeriesActSOPInstanceObservation

Constraint

Consol Series Act SHALL contain at least one [1..*] entryRelationship (CONF:9237, CONF:9238, CONF:15927) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] SOP Instance Observation (templateId: 2.16.840.1.113883.10.20.6.2.8)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::SOPInstanceObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.63"/>
<code code="113015" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
<entryRelationship typeCode="COMP">
<observation classCode="DGIMG" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.8"/>
<code codeSystem="1.2.840.10008.2.6.1" codeSystemName="DCMUID"/>
</observation>
</entryRelationship>
</act>

0.050
Properties »