Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
MedicationUseNoneKnownTest15000.6252013-01-31T13:35:33JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateMedicationUseNoneKnownTextReference

Constraint

Consol Medication Use None Known text, if present, SHOULD contain zero or one [0..1] reference (CONF:15580)

OCL

not self.text.oclIsUndefined() implies self.text->forAll(reference->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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text/>
<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.22.4.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text><reference/></text>
<statusCode code="completed"/>
</observation>

0.040
testValidateMedicationUseNoneKnownTextReferenceValue

Constraint

Consol Medication Use None Known reference, if present, SHOULD contain zero or one [0..1] @value (CONF:15581)

OCL

self.text->forAll(reference->size() = 1) implies self.text->forAll(reference->one(value->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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text><reference/></text>
<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.22.4.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text><reference value="test"/></text>
<statusCode code="completed"/>
</observation>

0.052
testValidateMedicationUseNoneKnownReferenceValue

Constraint

Consol Medication Use None Known reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:15582)

OCL

not self.text.reference.value.oclIsUndefined() implies not self.getSection().text.getText(self.text.reference.value.substring(2, self.text.reference.value.size())).oclIsUndefined()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="">
No particular health status observed.
</content></text>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<statusCode code="completed"/>
</observation>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="1.2.3.4">
No particular health status observed.
</content></text>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.068
testValidateMedicationUseNoneKnownTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7559, CONF:10508 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.29"

OCL

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

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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.011
testValidateMedicationUseNoneKnownClassCode

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:7557)

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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateMedicationUseNoneKnownMoodCode

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:7558)

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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.008
testValidateMedicationUseNoneKnownId

Constraint

Consol Medication Use None Known SHALL contain at least one [1..*] id (CONF:7560)

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.29"/>
<id/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.037
testValidateMedicationUseNoneKnownCodeP

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] code (CONF:7561)/@code="ASSERTION" Assertion (CodeSystem: 2.16.840.1.113883.5.4 HL7ActCode)

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="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.035
testValidateMedicationUseNoneKnownCode

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] code (CONF:7561)/@code="ASSERTION" Assertion (CodeSystem: 2.16.840.1.113883.5.4 HL7ActCode)

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 = 'ASSERTION' and value.codeSystem = '2.16.840.1.113883.5.4')

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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.075
testValidateMedicationUseNoneKnownEffectiveTime

Constraint

Consol Medication Use None Known SHOULD contain zero or one [0..1] effectiveTime (CONF:7563)

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
<effectiveTime/>
</observation>

0.041
testValidateMedicationUseNoneKnownStatusCode

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] statusCode (CONF:7562)/@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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.078
testValidateMedicationUseNoneKnownStatusCodeP

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] statusCode (CONF:7562)/@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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
</observation>

0.041
testValidateMedicationUseNoneKnownText

Constraint

Consol Medication Use None Known MAY contain zero or one [0..1] text (CONF:7565)

OCL

(self.text.oclIsUndefined() or self.text.isNullFlavorUndefined()) implies (not self.text.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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<text/>
<statusCode code="completed"/>
</observation>

0.036
testValidateMedicationUseNoneKnownValue

Constraint

Consol Medication Use None Known SHALL contain exactly one [1..1] value with data type CD/@code="182904002" Drug treatment unknown (CodeSystem: 2.16.840.1.113883.6.96 SNOMEDCT) (CONF:7564)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.code = '182904002' and value.codeSystem = '2.16.840.1.113883.6.96'))

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.29"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Assertion"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="182904002" codeSystem="2.16.840.1.113883.6.96" codeSystemName="" displayName=""/>
</observation>

0.089
Properties »