Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PreconditionForSubstanceAdministrationTest6000.1922013-01-31T13:35:50JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePreconditionForSubstanceAdministrationCriterionCode

Constraint

Consol Precondition For Substance Administration This criterion SHOULD contain zero or one [0..1] code (CONF:7367) (CONF:16854)

OCL

not self.criterion.oclIsUndefined() implies (not self.criterion.code.oclIsUndefined() or self.criterion.code.isNullFlavorDefined())

SuccessInvalid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion/>
</precondition>

Valid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion>
<code/>
</criterion>
</precondition>

0.003
testValidatePreconditionForSubstanceAdministrationCriterionText

Constraint

Consol Precondition For Substance Administration This criterion MAY contain zero or one [0..1] text (CONF:7373). (CONF:7373)

OCL

not self.criterion.oclIsUndefined() implies not self.criterion.text.oclIsUndefined()

SuccessInvalid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion/>
</precondition>

Valid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion>
<text/>
</criterion>
</precondition>

0.002
testValidatePreconditionForSubstanceAdministrationCriterionValue

Constraint

Consol Precondition For Substance Administration This criterion SHOULD contain zero or one [0..1] value with @xsi:type="CD" (CONF:7369)

OCL

(self.criterion.value.oclIsUndefined() or self.criterion.value.isNullFlavorUndefined()) implies (self.criterion.value.oclIsTypeOf(datatypes::CD))

SuccessInvalid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion/>
</precondition>

Valid XML


<precondition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion>
<value xsi:type="CD"/>
</criterion>
</precondition>

0.004
testValidatePreconditionForSubstanceAdministrationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7372, CONF:10517 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.25"

OCL

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

SuccessInvalid XML


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

Valid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
</precondition>

0.002
testValidatePreconditionForSubstanceAdministrationCriterion

Constraint

Consol Precondition For Substance Administration SHALL contain exactly one [1..1] criterion (CONF:7366) Contains exactly one [1..1] CDA Criterion

OCL

self.criterion->one(criterion : cda::Criterion | not criterion.oclIsUndefined() and criterion.oclIsKindOf(rim::Act))

SuccessInvalid XML


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

Valid XML


<precondition xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<criterion/>
</precondition>

0.002
Properties »