Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.ProductTest

NameTestsErrorsFailuresTime(s)Time StampHost
ProductTest10000.0412013-01-31T13:34:18JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateProductHasMaterial

Constraint

CCD Product SHALL satisfy: Contain exactly one manufacturedMaterial. (CONF-357)

OCL

not self.manufacturedMaterial.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


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

0.005
testValidateProductHasMaterialCode

Constraint

CCD Product SHALL satisfy: Contain exactly one manufacturedMaterial / code. (CONF-358)

OCL

not self.manufacturedMaterial.code.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


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

0.005
testValidateProductHasMaterialCodeVocab

Constraint

CCD Product The value for "manufacturedMaterial / code" in a product template SHOULD be selected from the RxNorm (2.16.840.1.113883.6.88) code system for medications, and from the CDC Vaccine Code (2.16.840.1.113883.6.59) code system for immunizations10, or MAY be selected from ValueSet 2.16.840.1.113883.1.11.20.8 MedicationTypeCode STATIC 20061017. (CONF-359)

OCL

self.manufacturedMaterial.code.codeSystem = '2.16.840.1.113883.6.88' or self.manufacturedMaterial.code.codeSystem='2.16.840.1.113883.6.59' or self.manufacturedMaterial.code.codeSystem='2.16.840.1.113883.6.96'

SuccessInvalid XML


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

Valid XML


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

0.004
testValidateProductHasMaterialCodeOriginalText

Constraint

CCD Product SHALL satisfy: A manufacturedMaterial in a product template contains exactly one code / originalText, which represents the generic name of the product. (CONF-363)

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.10.20.1.53"/>
<manufacturedMaterial>
<code>
<originalText/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateProductHasMaterialName

Constraint

CCD Product MAY satisfy: A manufacturedMaterial in a product template contains exactly one name, which represents the brand name of the product. (CONF-364)

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.10.20.1.53"/>
<manufacturedMaterial>
<name/>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateProductMayHaveMaterialManufacturer

Constraint

CCD Product MAY satisfy: contains exactly one manufacturedProduct / manufacturerOrganization, which represents the manufacturer of the Material. (CONF-365)

OCL

self.manufacturerOrganization->size() = 1

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<manufacturerOrganization/>
</manufacturedproduct>

0.002
testValidateProductShouldHaveMaterialManufacturer

Constraint

CCD Product If ManufacturedProduct in a product template contains manufacturedProduct / id, then ManufacturedProduct SHOULD also contain manufacturedProduct / manufacturerOrganization. (CONF-367)

OCL

self.id->size() > 0 implies self.manufacturerOrganization->size() > 0

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<id/>
<id/>
<manufacturerOrganization/>
</manufacturedproduct>

0.003
testValidateProductTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.1.53"

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.003
testValidateProductId

Constraint

CCD Product MAY contain at least one [1..*] id (CONF-366)

OCL

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

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<id/>
</manufacturedproduct>

0.004
Properties »