Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AssessmentScaleSupportingObservationTest11000.1902013-01-31T13:34:41JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateAssessmentScaleSupportingObservationCodeCodeSystem

Constraint

Consol Assessment Scale Supporting Observation observation/code SHALL be from LOINC (CodeSystem: 2.16.840.1.113883.6.1) or SNOMED CT (CodeSystem: 2.16.840.1.113883.6.96) and represents components of the scale (CONF:16738, CONF:14458, CONF:16739)

OCL

self.code.isNullFlavorDefined() or self.code.codeSystem = '2.16.840.1.113883.6.1' or self.code.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.86"/>
<code code="" codeSystem="2.16.840.1.113883.6.1" codeSystemName="" displayName=""/>
<statusCode code="completed"/>
</observation>

0.021
testValidateAssessmentScaleSupportingObservationValueTranslation

Constraint

Consol Assessment Scale Supporting Observation If xsi:type="CD" , MAY have a translation code to further specify the source if the instrument has an applicable code system and valueSet for the integer (CONF:14639, CONF:16755)

OCL

self.value.oclAsType(datatypes::CD).translation->size() = 1

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

0.014
testValidateAssessmentScaleSupportingObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:16722, CONF:16723 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.86"

OCL

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

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

0.007
testValidateAssessmentScaleSupportingObservationClassCode

Constraint

Consol Assessment Scale Supporting Observation SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:16715)

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

0.005
testValidateAssessmentScaleSupportingObservationMoodCode

Constraint

Consol Assessment Scale Supporting Observation SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:16716)

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

0.005
testValidateAssessmentScaleSupportingObservationCode

Constraint

Consol Assessment Scale Supporting Observation SHALL contain exactly one [1..1] code (CONF:16717)

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

0.020
testValidateAssessmentScaleSupportingObservationId

Constraint

Consol Assessment Scale Supporting Observation SHALL contain at least one [1..*] id (CONF:16724)

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

0.022
testValidateAssessmentScaleSupportingObservationStatusCode

Constraint

Consol Assessment Scale Supporting Observation SHALL contain exactly one [1..1] statusCode (CONF:16720)/@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.86"/>
<statusCode code="completed"/>
</observation>

0.045
testValidateAssessmentScaleSupportingObservationStatusCodeP

Constraint

Consol Assessment Scale Supporting Observation SHALL contain exactly one [1..1] statusCode (CONF:16720)/@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.86"/>
<statusCode code="completed"/>
</observation>

0.024
testValidateAssessmentScaleSupportingObservationValue

Constraint

Consol Assessment Scale Supporting Observation SHALL contain at least one [1..*] value (CONF:16754)

OCL

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

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

0.022
Properties »