Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
CoverageActivityTest11000.1662013-01-31T13:34:12JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateCoverageActivityInformationSource

Constraint

CCD Coverage Activity SHALL satisfy: An alert observation contains one or more sources of information. (CONF-47)

OCL

not self.informant->isEmpty() or not self.getSection().informant->isEmpty() or not self.getClinicalDocument().informant->isEmpty() or self.reference->exists(ref : cda::Reference | ref.typeCode = vocab::x_ActRelationshipExternalReference::XCRPT) or (self.entryRelationship->exists(rel : cda::EntryRelationship | rel.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR and rel.observation.code.code = '48766-0'))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="DEF">
<templateId root="2.16.840.1.113883.10.20.1.20"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment sources"/>
<statusCode code="completed"/>
<informant/>
</act>

0.017
testValidateCoverageActivitySequenceNumber

Constraint

CCD Coverage Activity MAY satisfy: entryRelationship contains sequenceNumber, which serves to prioritize the payment sources. (CONF-44)

OCL

self.entryRelationship->exists(rel : cda::EntryRelationship | not rel.sequenceNumber.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="DEF">
<templateId root="2.16.840.1.113883.10.20.1.20"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment sources"/>
<statusCode code="completed"/>
<entryRelationship>
<sequenceNumber/>
</entryRelationship>
</act>

0.083
testValidateCoverageActivityTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8897, CONF:10492 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.60"

OCL

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

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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

0.004
testValidateCoverageActivityClassCode

Constraint

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

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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

0.004
testValidateCoverageActivityMoodCode

Constraint

Consol Coverage Activity SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8873)

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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

0.004
testValidateCoverageActivityId

Constraint

Consol Coverage Activity SHALL contain at least one [1..*] id (CONF:8874)

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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.60"/>
<id/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

0.007
testValidateCoverageActivityStatusCode

Constraint

Consol Coverage Activity SHALL contain exactly one [1..1] statusCode/@code="completed" (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF:8875)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

0.013
testValidateCoverageActivityCode

Constraint

Consol Coverage Activity SHALL contain exactly one [1..1] code/@code="48768-6" Payment Sources (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:8876)

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 = '48768-6' and value.codeSystem = '2.16.840.1.113883.6.1')

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.60"/>
<code xsi:type="CE" code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
<statusCode code="completed"/>
</act>

0.013
testValidateCoverageActivityPolicyActivity

Constraint

Consol Coverage Activity SHALL contain at least one [1..*] entryRelationship (CONF:8878, CONF:8879, CONF:15528) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Policy Activity (templateId: 2.16.840.1.113883.10.20.22.4.61)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(consol::PolicyActivity) 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.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.60"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
<statusCode code="completed"/>
<entryRelationship typeCode="COMP">
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>
</entryRelationship>
</act>

0.010
testGetPolicyActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.005
Properties »