Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
SOPInstanceObservationTest21000.8382013-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.042
testValidateSOPInstanceObservationEffectiveTimeHasValue

Constraint

Consol SOP Instance Observation The effectiveTime, if present, SHALL contain exactly one [1..1] @value (CONF:9251)

OCL

not self.effectiveTime.oclIsUndefined() implies not self.effectiveTime.value.oclIsUndefined()

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime value="test"/>
</observation>

0.046
testValidateSOPInstanceObservationEffectiveTimeNoLow

Constraint

Consol SOP Instance Observation The effectiveTime, if present, SHALL NOT contain [0..0] low (CONF:9252)

OCL

not self.effectiveTime.oclIsUndefined() implies self.effectiveTime.low.oclIsUndefined()

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime>
<low/>
</effectiveTime>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime value="test"/>
</observation>

0.039
testValidateSOPInstanceObservationEffectiveTimeNoHigh

Constraint

Consol SOP Instance Observation The effectiveTime, if present, SHALL NOT contain [0..0] high (CONF:9253)

OCL

not self.effectiveTime.oclIsUndefined() implies self.effectiveTime.high.oclIsUndefined()

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime>
<high/>
</effectiveTime>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime value="test"/>
</observation>

0.039
testValidateSOPInstanceObservationTextMediaType

Constraint

Consol SOP Instance Observation text, if present, SHALL contain exactly one [1..1] @mediaType="application/dicom" (CONF:9247)

OCL

not self.text.oclIsUndefined() implies self.text.mediaType = 'application/dicom'

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text mediaType="application/dicom"/>
</observation>

0.036
testValidateSOPInstanceObservationTextReference

Constraint

Consol SOP Instance Observation The text, if present, SHALL contain exactly one [1..1] reference (CONF:9248)

OCL

not self.text.oclIsUndefined() implies self.text.reference->size() = 1

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text><reference/></text>
</observation>

0.045
testValidateSOPInstanceObservationTextReferenceValue

Constraint

Consol SOP Instance Observation text/reference SHALL contain a @value which contains a WADO reference as a URI (CONF:9249)

OCL

not self.text.oclIsUndefined() implies self.text.reference.value->size() = 1

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text><reference/></text>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text><reference value="test"/></text>
</observation>

0.047
testValidateSOPInstanceObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.6.2.8"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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>

0.014
testValidateSOPInstanceObservationClassCode

Constraint

Consol SOP Instance Observation SHALL contain exactly one [1..1] @classCode="DGIMG" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9240)

OCL

self.classCode=vocab::ActClassObservation::DGIMG

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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>

0.009
testValidateSOPInstanceObservationEffectiveTime

Constraint

Consol SOP Instance Observation SHOULD contain zero or one [0..1] effectiveTime (CONF:9250)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<effectiveTime/>
</observation>

0.053
testValidateSOPInstanceObservationId

Constraint

Consol SOP Instance Observation SHALL contain at least one [1..*] id (CONF:9242)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="DGIMG" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.8"/>
<id/>
<code codeSystem="1.2.840.10008.2.6.1" codeSystemName="DCMUID"/>
</observation>

0.048
testValidateSOPInstanceObservationMoodCode

Constraint

Consol SOP Instance Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood)

OCL

self.moodCode=vocab::x_ActMoodDocumentObservation::EVN

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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>

0.009
testValidateSOPInstanceObservationText

Constraint

Consol SOP Instance Observation SHOULD contain zero or one [0..1] text (CONF:9246)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<text/>
</observation>

0.046
testValidateSOPInstanceObservationCodeP

Constraint

Consol SOP Instance Observation SHALL contain exactly one [1..1] code (CONF:9244), where the @code SHALL be selected from (CodeSystem: 1.2.840.10008.2.6.1 DCMUID)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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>

0.044
testValidateSOPInstanceObservationCode

Constraint

Consol SOP Instance Observation SHALL contain exactly one [1..1] code (CONF:9244), where the @code SHALL be selected from (CodeSystem: 1.2.840.10008.2.6.1 DCMUID)

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.codeSystem = '1.2.840.10008.2.6.1')

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
</observation>

0.083
testValidateSOPInstanceObservationSOPInstanceObservation

Constraint

Consol SOP Instance Observation MAY contain zero or more [0..*] entryRelationship (CONF:9254, CONF:9255, CONF:9256) Contains @typeCode="SUBJ" SUBJ, 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::SUBJ)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<entryRelationship typeCode="SUBJ">
<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>
</observation>

0.049
testValidateSOPInstanceObservationPurposeofReferenceObservation

Constraint

Consol SOP Instance Observation MAY contain zero or more [0..*] entryRelationship (CONF:9257, CONF:9258, CONF:15935) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Purposeof Reference Observation (templateId: 2.16.840.1.113883.10.20.6.2.9)

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.9"/>
</observation>
</entryRelationship>
</observation>

0.049
testValidateSOPInstanceObservationReferencedFramesObservation

Constraint

Consol SOP Instance Observation MAY contain zero or more [0..*] entryRelationship (CONF:9260, CONF:9261, CONF:15936) Contains @typeCode="COMP" COMP, and Contains exactly one [1..1] Referenced Frames Observation (templateId: 2.16.840.1.113883.10.20.6.2.10)

OCL

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

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" 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>

Valid XML


<observation xmlns="urn:hl7-org:v3" 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"/>
<entryRelationship typeCode="COMP">
<observation classCode="ROIBND" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.6.2.10"/>
<code code="121190" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM" displayName="Referenced Frames"/>
</observation>
</entryRelationship>
</observation>

0.049
testGetPurposeofReferenceObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.042
testGetReferencedFramesObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.042
Properties »