Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
NumberOfPressureUlcersObservationTest19001.0862013-01-31T13:35:34JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateNumberOfPressureUlcersObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:14707, CONF:14708 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.76"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.012
testValidateNumberOfPressureUlcersObservationClassCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14705)

OCL

self.classCode=vocab::ActClassObservation::OBS

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateNumberOfPressureUlcersObservationMoodCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14706)

OCL

self.moodCode=vocab::x_ActMoodDocumentObservation::EVN

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateNumberOfPressureUlcersObservationId

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain at least one [1..*] id (CONF:14709)

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="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<id/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.037
testValidateNumberOfPressureUlcersObservationCodeP

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] code (CONF:14767)/@code="2264892003" number of pressure ulcers (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:14768)

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="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.035
testValidateNumberOfPressureUlcersObservationCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] code (CONF:14767)/@code="2264892003" number of pressure ulcers (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:14768)

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 = '2264892003' and value.codeSystem = '2.16.840.1.113883.6.96')

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
<statusCode code="completed"/>
</observation>

0.077
testValidateNumberOfPressureUlcersObservationStatusCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] statusCode (CONF:14714)/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus)

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


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.079
testValidateNumberOfPressureUlcersObservationStatusCodeP

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] statusCode (CONF:14714)/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus)

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
</observation>

0.042
testValidateNumberOfPressureUlcersObservationEffectiveTime

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] effectiveTime (CONF:14715)

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="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<effectiveTime/>
</observation>

0.042
testValidateNumberOfPressureUlcersObservationValue

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] value with data type INT (CONF:14771)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | element.oclIsTypeOf(datatypes::INT)))

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<value xsi:type="INT"/>
</observation>

0.053
testValidateNumberOfPressureUlcersObservationAuthor

Constraint

Consol Number Of Pressure Ulcers Observation MAY contain zero or one [0..1] author (CONF:14717) Contains exactly one [1..1] CDA Author

OCL

self.author->one(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(rim::Participation))

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<author/>
</observation>

0.024
testValidateNumberOfPressureUlcersObservationEntryRelationship

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718)

OCL

self.entryRelationship->select(entryRelationship : cda::EntryRelationship | not entryRelationship.oclIsUndefined() and entryRelationship.oclIsKindOf(cda::EntryRelationship))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->size() = 1

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

0.045
testValidateNumberOfPressureUlcersObservationEntryRelationshipObservationClassCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718) each SHALL contain exactly one [1..1] observation, where (CONF:14720) observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14721)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ).observation->excluding(null)->reject(classCode=vocab::ActClassObservation::OBS)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS"/>
</entryRelationship>
</observation>

0.034
testValidateNumberOfPressureUlcersObservationEntryRelationshipObservationMoodCode

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718) each SHALL contain exactly one [1..1] observation, where (CONF:14720) observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14722)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ).observation->excluding(null)->reject(moodCode=vocab::x_ActMoodDocumentObservation::EVN)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation moodCode="EVN"/>
</entryRelationship>
</observation>

0.034
testValidateNumberOfPressureUlcersObservationEntryRelationshipObservationValue

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718) each SHALL contain exactly one [1..1] observation, where (CONF:14720) observation SHALL contain exactly one [1..1] value with data type CD (CONF:14725), where the @code SHOULD be selected from ValueSet Pressure Ulcer Stage 2.16.840.1.113883.11.20.9.35 DYNAMIC

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ).observation->excluding(null)->reject((value->isEmpty() or value->exists(element | element.isNullFlavorUndefined())) implies (value->size() = 1 and value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and (value.code = '421076008' or value.code = '420324007' or value.code = '421927004' or value.code = '420597008' or value.code = '421594008'))))

SuccessInvalid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation>
<value xsi:type="CD"/>
</observation>
</entryRelationship>
</observation>

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation>
<value xsi:type="CD" code="421076008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</observation>
</entryRelationship>
</observation>

0.179
testValidateNumberOfPressureUlcersObservationEntryRelationshipObservationValueP

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718) each SHALL contain exactly one [1..1] observation, where (CONF:14720) observation SHALL contain exactly one [1..1] value with data type CD (CONF:14725), where the @code SHOULD be selected from ValueSet Pressure Ulcer Stage 2.16.840.1.113883.11.20.9.35 DYNAMIC

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ).observation->excluding(null)->reject((value->isEmpty() or value->exists(element | element.isNullFlavorUndefined())) implies (value->size() = 1 and value->forAll(element | element.oclIsTypeOf(datatypes::CD))))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation>
<value xsi:type="CD" code="421076008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</observation>
</entryRelationship>
</observation>

0.088
testValidateNumberOfPressureUlcersObservationEntryRelationshipTypeCode

Constraint

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->reject(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


Skip Fail Test

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

0.033
testValidateNumberOfPressureUlcersObservationEntryRelationshipObservation

Constraint

Consol Number Of Pressure Ulcers Observation SHALL contain exactly one [1..1] entryRelationship (CONF:14718) entryRelationship SHALL contain exactly one [1..1] observation, where its type is Observation (CONF:14720)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::SUBJ)->reject(observation->one(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(cda::Observation)))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.76"/>
<code code="2264892003" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT" displayName="number of pressure ulcers"/>
<statusCode code="completed"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</observation>

0.052
Properties »