Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProcedureActivityProcedureTest19000.3182013-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.009
testGetMedicationActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.008
testGetProblemAct

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testGetProblemObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.009
testValidateProcedureActivityProcedureTemplateId

Constraint

The 'ProcedureActivityProcedureTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ProcedureActivityProcedureImpl@4ed1ee4e{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.006
testValidateProcedureActivityProcedureMoodCode

Constraint

Consol Procedure Activity Procedure 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:7653)

OCL

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

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.004
testValidateProcedureActivityProcedureCode

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<code xsi:type="CE"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.009
testValidateProcedureActivityProcedureEffectiveTime

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<effectiveTime/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.011
testValidateProcedureActivityProcedureId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<id/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

0.012
testValidateProcedureActivityProcedureSpecimen

Constraint

Consol Procedure Activity Procedure MAY contain zero or more [0..*] specimen (CONF:7697)

OCL

self.specimen->exists(specimen : cda::Specimen | not specimen.oclIsUndefined() and specimen.oclIsKindOf(cda::Specimen))

SuccessInvalid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<specimen/>
</procedure>

0.145
testValidateProcedureActivityProcedureEncounterLocation

Constraint

CCD Procedure Activity Procedure MAY contain at least one [1..*] participant 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


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

Valid XML


<procedure 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>
</procedure>

0.008
testValidateProcedureActivityProcedurePerformer2

Constraint

CCD Procedure Activity Procedure MAY contain at least one [1..*] performer Contains exactly one [1..1] CDA Performer2

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.008
testValidateProcedureActivityProcedureProblemObservation

Constraint

CCD Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship 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


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

Valid XML


<procedure 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>
</procedure>

0.012
testValidateProcedureActivityProcedureProblemAct

Constraint

CCD Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship 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


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

Valid XML


<procedure 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>
</procedure>

0.012
testValidateProcedureActivityProcedureAgeObservation

Constraint

CCD Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship 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


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

Valid XML


<procedure 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>
</procedure>

0.012
testValidateProcedureActivityProcedureMedicationActivity

Constraint

Consol Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship (CONF:7886, CONF:7887, CONF:15915) 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


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="COMP">
<substanceAdministration/>
</entryRelationship>
</procedure>

0.012
testValidateProcedureActivityProcedurePatientInstruction

Constraint

Consol Procedure Activity Procedure MAY contain zero or one [0..1] entryRelationship (CONF:7775, CONF:7776, CONF:15913) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Instructions (templateId: 2.16.840.1.113883.10.20.22.4.20)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(consol::Instructions) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<procedure xmlns="urn:hl7-org:v3" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<entryRelationship typeCode="SUBJ">
<act/>
</entryRelationship>
</procedure>

0.012
Properties »