Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
CaregiverCharacteristicsTest16000.3372013-01-31T13:34:42JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateCaregiverCharacteristicsValueCodeSystem

Constraint

Consol Caregiver Characteristics the code/@code SHALL be selected from LOINC (codeSystem: 2.16.840.1.113883.6.1) or SNOMED CT (CodeSystem: 2.16.840.1.113883.6.96 (CONF:14600)

OCL

self.value->forAll(val | val.isNullFlavorDefined() or val.oclAsType(datatypes::CD).codeSystem = '2.16.840.1.113883.6.1' or val.oclAsType(datatypes::CD).codeSystem = '2.16.840.1.113883.6.96')

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.72"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="" codeSystem="1.2.3.4" codeSystemName="" displayName=""/>
</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.72"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="" codeSystem="2.16.840.1.113883.6.1" codeSystemName="" displayName=""/>
</observation>

0.023
testValidateCaregiverCharacteristicsTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:14221, CONF:14222 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.72"

OCL

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

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.72"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateCaregiverCharacteristicsClassCode

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14219)

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.72"/>
<statusCode code="completed"/>
</observation>

0.005
testValidateCaregiverCharacteristicsMoodCode

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14220)

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.72"/>
<statusCode code="completed"/>
</observation>

0.005
testValidateCaregiverCharacteristicsId

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] id (CONF:14223)

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.72"/>
<id/>
<statusCode code="completed"/>
</observation>

0.023
testValidateCaregiverCharacteristicsCode

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] code (CONF:14230)

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: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.72"/>
<code xsi:type="CE"/>
<statusCode code="completed"/>
</observation>

0.021
testValidateCaregiverCharacteristicsStatusCode

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] statusCode (CONF:14233)/@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.72"/>
<statusCode code="completed"/>
</observation>

0.046
testValidateCaregiverCharacteristicsStatusCodeP

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] statusCode (CONF:14233)/@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.72"/>
<statusCode code="completed"/>
</observation>

0.024
testValidateCaregiverCharacteristicsValue

Constraint

Consol Caregiver Characteristics SHALL contain exactly one [1..1] value with data type CD (CONF:14599)

OCL

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

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.72"/>
<statusCode code="completed"/>
<value xsi:type="CD"/>
</observation>

0.030
testValidateCaregiverCharacteristicsParticipant

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227)

OCL

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

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.72"/>
<statusCode code="completed"/>
<participant/>
</observation>

0.015
testValidateCaregiverCharacteristicsParticipantParticipantRoleClassCode

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227) each SHALL contain exactly one [1..1] participantRole, where (CONF:14228) participantRole SHALL contain exactly one [1..1] @classCode (CONF:14229)

OCL

self.participant->excluding(null).participantRole->excluding(null)->reject(isDefined('classCode'))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<participantRole/>
</participant>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<participantRole classCode="PART"/>
</participant>
</observation>

0.015
testValidateCaregiverCharacteristicsParticipantTimeLow

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227) participant time, if present, SHALL contain exactly one [1..1] low (CONF:14831)

OCL

self.participant->excluding(null)->reject(not time.oclIsUndefined() implies time.low->size() = 1)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<time/>
</participant>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<time>
<low value="1"/>
<high value="2"/>
</time>
</participant>
</observation>

0.032
testValidateCaregiverCharacteristicsParticipantTimeHigh

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227) participant time, if present, MAY contain zero or one [0..1] high (CONF:14832)

OCL

self.participant->excluding(null)->reject(not time.oclIsUndefined() implies time.high->size() = 1)

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<time/>
</participant>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<time>
<low value="1"/>
<high value="2"/>
</time>
</participant>
</observation>

0.031
testValidateCaregiverCharacteristicsParticipantTime

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227) participant MAY contain zero or one [0..1] time (CONF:14830)

OCL

self.participant->excluding(null)->reject((time.oclIsUndefined() or time.isNullFlavorUndefined()) implies (not time.oclIsUndefined()))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<time>
<low value="1"/>
<high value="2"/>
</time>
</participant>
</observation>

0.034
testValidateCaregiverCharacteristicsParticipantParticipantRole

Constraint

Consol Caregiver Characteristics SHALL contain at least one [1..*] participant (CONF:14227) participant SHALL contain exactly one [1..1] participantRole, where its type is Participant Role (CONF:14228)

OCL

self.participant->excluding(null)->reject(participantRole->one(participantRole : cda::ParticipantRole | not participantRole.oclIsUndefined() and participantRole.oclIsKindOf(cda::ParticipantRole)))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.72"/>
<statusCode code="completed"/>
<participant>
<participantRole/>
</participant>
</observation>

0.022
Properties »