Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureActivityActTest18000.1622013-01-31T13:34:18JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetPatientInstructions

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testGetAgeObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
testValidateProcedureActivityActTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10519 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.12"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.005
testValidateProcedureActivityActMoodCode

Constraint

Consol Procedure Activity Act SHALL contain exactly one [1..1] @moodCode, where the @code SHALL be selected from ValueSet MoodCodeEvnInt 2.16.840.1.113883.11.20.9.18 STATIC 2011-04-03 (CONF:8290)

OCL

not self.moodCode.oclIsUndefined() and self.moodCode.oclIsKindOf(vocab::x_DocumentActMood) and let value : vocab::x_DocumentActMood = self.moodCode.oclAsType(vocab::x_DocumentActMood) in value = vocab::x_DocumentActMood::EVN or value = vocab::x_DocumentActMood::INT

SuccessInvalid XML


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

Valid XML


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

0.007
testValidateProcedureActivityActCode

Constraint

Consol Procedure Activity Act SHALL contain exactly one [1..1] code (CONF:8293)

OCL

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

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">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<code xsi:type="CE"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.009
testValidateProcedureActivityActEffectiveTime

Constraint

Consol Procedure Activity Act SHOULD contain zero or one [0..1] effectiveTime (CONF:8299)

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">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<effectiveTime/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.011
testValidateProcedureActivityActId

Constraint

Consol Procedure Activity Act SHALL contain at least one [1..*] id (CONF:8292)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<id/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
</act>

0.010
testValidateProcedureActivityActEncounterLocation

Constraint

CCD Procedure Activity Act MAY contain at least one [1..*] participant (CONF-437) Contains exactly one [1..1] Encounter Location (templateId: 2.16.840.1.113883.10.20.1.45)

OCL

self.participant->exists(participant : cda::Participant2 | not participant.oclIsUndefined() and participant.oclIsKindOf(ccd::EncounterLocation))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<participant typeCode="LOC">
<templateId root="2.16.840.1.113883.10.20.1.45"/>
</participant>
</act>

0.007
testValidateProcedureActivityActPerformer2

Constraint

CCD Procedure Activity Act MAY contain at least one [1..*] performer (CONF-438) Contains exactly one [1..1] CDA Performer2

OCL

self.performer->exists(performer : cda::Performer2 | not performer.oclIsUndefined() and performer.oclIsKindOf(rim::Participation))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<performer/>
</act>

0.008
testValidateProcedureActivityActProblemAct

Constraint

CCD Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF-439, CONF-440) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Problem Act (templateId: 2.16.840.1.113883.10.20.1.27)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(ccd::ProblemAct) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<entryRelationship typeCode="RSON">
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<code nullFlavor="NA"/>
</act>
</entryRelationship>
</act>

0.011
testValidateProcedureActivityActProblemObservation

Constraint

CCD Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF-439, CONF-440) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Problem Observation (templateId: 2.16.840.1.113883.10.20.1.28)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(ccd::ProblemObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.28"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</act>

0.011
testValidateProcedureActivityActAgeObservation

Constraint

CCD Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF-445) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Age Observation (templateId: 2.16.840.1.113883.10.20.1.38)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(ccd::AgeObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.38"/>
<code code="397659008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="Age"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</act>

0.011
testValidateProcedureActivityActMedicationActivity

Constraint

Consol Procedure Activity Act MAY contain zero or one [0..1] entryRelationship (CONF:8329) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Medication Activity (templateId: 2.16.840.1.113883.10.20.22.4.16)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.substanceAdministration.oclIsUndefined() and entryRelationship.substanceAdministration.oclIsKindOf(consol::MedicationActivity) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::COMP)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT">
<templateId root="2.16.840.1.113883.10.20.22.4.12"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<entryRelationship typeCode="COMP">
<substanceAdministration/>
</entryRelationship>
</act>

0.011
testValidateProcedureActivityActPatientInstruction

Constraint

CCD Procedure Activity Act MAY contain at least one [1..*] entryRelationship (CONF-441) Contains exactly one [1..1] Patient Instruction (templateId: 2.16.840.1.113883.10.20.1.49)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(ccd::PatientInstruction))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<entryRelationship>
<act moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.1.49"/>
</act>
</entryRelationship>
</act>

0.009
testGetProblemAct

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
testGetProblemObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testGetMedicationActivity

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
Properties »