Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
StatusObservationTest11000.0612013-01-31T13:34:20JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateStatusObservationTemplateId

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.1.57"

OCL

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

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.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.006
testValidateStatusObservationCode

Constraint

CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513)

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 = '33999-4' and value.codeSystem = '2.16.840.1.113883.6.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.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1"/>
<statusCode code="completed"/>
</observation>

0.003
testValidateStatusObservationValue

Constraint

CCD Status Observation SHALL contain exactly one [1..1] value with data type CE (CONF-516)

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_STATUS_OBSERVATION_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

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="1.3.6.1.4.1.19376.1.5.3.1.4.1.1"/>
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<templateId root="2.16.840.1.113883.10.20.1.50"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
<value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.002
testValidateStatusObservationTargetOfEntryRelationship

Constraint

CCD Status Observation Target of an entryRelationship whose value for "entryRelationship / @typeCode" SHALL be "REFR" 2.16.840.1.113883.5.1002 ActRelationshipType STATIC. (CONF-509)

OCL

self.validateTargetOfEntryRelationship()

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.004
testValidateStatusObservationNoAdditionalParticipants

Constraint

CCD Status Observation SHALL NOT contain any Observation participants. (CONF-518)

OCL

self.participant->isEmpty()

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.004
testValidateStatusObservationNoAdditionalRelationships

Constraint

CCD Status Observation SHALL NOT be the source of any Observation relationships. (CONF-519)

OCL

self.entryRelationship->select(er|not er.observation.oclIsUndefined())->isEmpty()

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateStatusObservationClassCode

Constraint

CCD Status Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF-510)

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.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.004
testValidateStatusObservationMoodCode

Constraint

CCD Status Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF-511)

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.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.004
testValidateStatusObservationStatusCode

Constraint

CCD Status Observation SHALL contain exactly one [1..1] statusCode/@code="completed" (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF-514, CONF-515)

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.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.021
testValidateTargetOfEntryRelationship

Constraint

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_TARGET_OF_ENTRY_RELATIONSHIP__EOCL_EXP

SuccessInvalid XML


Skip Fail Test

Skip Pass Test

Valid XML

0.000
Properties »