Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FunctionalStatusResultOrganizerTest11000.2552013-01-31T13:34:57JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateResultOrganizerTemplateId

Constraint

The 'ResultOrganizerTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.mu2consol.impl.ResultOrganizerImpl@258b0bc{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
</organizer>

0.011
testValidateFunctionalStatusResultOrganizerCodeCodeSystem

Constraint

Consol Functional Status Result Organizer code SHOULD contain zero or one [0..1] @code should be selected from ICF (codeSystem 2.16.840.1.113883.6.254) or SNOMED CT (codeSystem 2.16.840.1.113883.6.96) (CONF:14747, CONF:14748)

OCL

self.code.isNullFlavorDefined() or self.code.codeSystem = '2.16.840.1.113883.6.254' or self.code.codeSystem = '2.16.840.1.113883.6.96'

SuccessInvalid XML


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

Valid XML


<organizer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<code xsi:type="CE" code="" codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
</organizer>

0.029
testValidateFunctionalStatusResultOrganizerClassCode

Constraint

Consol Functional Status Result Organizer SHALL contain exactly one [1..1] @classCode="CLUSTER" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14355)

OCL

self.classCode=vocab::x_ActClassDocumentEntryOrganizer::CLUSTER

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<statusCode code="completed"/>
</organizer>

0.006
testValidateFunctionalStatusResultOrganizerMoodCode

Constraint

Consol Functional Status Result Organizer SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14357)

OCL

self.moodCode=vocab::ActMood::EVN

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<statusCode code="completed"/>
</organizer>

0.006
testValidateFunctionalStatusResultOrganizerId

Constraint

Consol Functional Status Result Organizer SHALL contain at least one [1..*] id (CONF:14363)

OCL

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

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<id/>
<statusCode code="completed"/>
</organizer>

0.029
testValidateFunctionalStatusResultOrganizerCode

Constraint

Consol Functional Status Result Organizer SHALL contain exactly one [1..1] code (CONF:14364)

OCL

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

SuccessInvalid XML


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

Valid XML


<organizer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<code xsi:type="CE" code="" codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
</organizer>

0.027
testValidateFunctionalStatusResultOrganizerStatusCodeP

Constraint

Consol Functional Status Result Organizer SHALL contain exactly one [1..1] statusCode (CONF:14358)/@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


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<statusCode code="completed"/>
</organizer>

0.032
testValidateFunctionalStatusResultOrganizerStatusCode

Constraint

Consol Functional Status Result Organizer SHALL contain exactly one [1..1] statusCode (CONF:14358)/@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


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<statusCode code="completed"/>
</organizer>

0.061
testValidateFunctionalStatusResultOrganizerFunctionalStatusResultObservation

Constraint

Consol Functional Status Result Organizer SHALL contain at least one [1..*] component (CONF:14359, CONF:14368) Contains exactly one [1..1] Functional Status Result Observation (templateId: 2.16.840.1.113883.10.20.22.4.67)

OCL

self.component->exists(component : cda::Component4 | not component.observation.oclIsUndefined() and component.observation.oclIsKindOf(consol::FunctionalStatusResultObservation))

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.66"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<statusCode code="completed"/>
<component>
<observation/>
</component>
</organizer>

0.024
testGetFunctionalStatusResultObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.026
Properties »