Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.MedicationInformationTest

NameTestsErrorsFailuresTime(s)Time StampHost
MedicationInformationTest9000.0242013-01-31T13:34:33JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateMedicationInformationCodedProductName

Constraint

HITSP Medication Information The coded product name SHALL appear in the @code attribute of the manufacturedMaterial/code element. (C83-[DE-8.13-CDA-1])

OCL

not self.manufacturedMaterial.code.code.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<manufacturedMaterial>
<code code="111" codeSystem="2.16.840.1.113883.3.88.12.80.17">
<translation/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.004
testValidateMedicationInformationCodedProductVocab

Constraint

HITSP Medication Information The coded product name SHALL be coded as 2.16.840.1.113883.3.88.12.80.17, Medication Clinical Drug Name Value Set, version: 20081218, Dynamic (C154-[DE-8.13-1])

OCL

self.manufacturedMaterial.code.codeSystem = '2.16.840.1.113883.6.88'

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<manufacturedMaterial>
<code codeSystem="2.16.840.1.113883.6.88">
<translation/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.002
testValidateMedicationInformationCodedIngredientVocab

Constraint

HITSP Medication Information When only the medication ingredient name is know, the coded product name MAY be coded as 2.16.840.1.113883.3.88.12.80.20, Ingredient Name Value Set, Dynamic (C154-[DE-8.13-3])

OCL

self.manufacturedMaterial.code.codeSystem = '2.16.840.1.113883.4.9'

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<manufacturedMaterial>
<code codeSystem="2.16.840.1.113883.4.9">
<translation/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.002
testValidateMedicationInformationCodedBrandName

Constraint

HITSP Medication Information The code for the specific brand of product SHALL appear in a manufacturedMaterial/translation element (C83-[DE-8.14-CDA-1])

OCL

self.manufacturedMaterial.code.translation->size() > 0

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<manufacturedMaterial>
<code codeSystem="2.16.840.1.113883.6.88">
<translation/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateMedicationInformationCodedBrandNameVocab

Constraint

HITSP Medication Information The brand name SHALL be coded as 2.16.840.1.113883.3.88.12.80.16, Medication Brand Name Value Set, version: 20081218, Dynamic, OR SHALL be coded as 2.16.840.1.113883.3.88.12.80.19, Medication Packaged Product Value Set, Dynamic (C154-[DE-8.14-1])

OCL

self.manufacturedMaterial.code.codeSystem = '2.16.840.1.113883.6.88' or self.manufacturedMaterial.code.codeSystem = '2.16.840.1.113883.6.69'

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<manufacturedMaterial>
<code codeSystem="2.16.840.1.113883.6.88"/>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateMedicationInformationFreeTextProductName

Constraint

HITSP Medication Information The product (generic) name SHALL appear in the originalText element beneath the manufacturedMaterial/code element (C83-[DE-8.15-CDA-1])

OCL

not self.manufacturedMaterial.code.originalText.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.8.2"/>
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
<manufacturedMaterial>
<code>
<originalText/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateMedicationInformationFreeTextBrandName

Constraint

HITSP Medication Information The brand name SHALL appear in the <name> element of the <manufacturedMaterial> element (C83-[DE-8.14-CDA-2])

OCL

not self.manufacturedMaterial.name.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.8.2"/>
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
<manufacturedMaterial>
<name/>
</manufacturedMaterial>
</manufacturedproduct>

0.002
testValidateMedicationInformationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:7409, CONF:10506 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.23"

OCL

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

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
</manufacturedproduct>

0.003
Properties »