Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ImmunizationMedicationInformationTest12000.0862013-01-31T13:35:25JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateImmunizationMedicationInformationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:9004, CONF:10499 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.54"

OCL

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

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.54"/>
</manufacturedproduct>

0.003
testValidateImmunizationMedicationInformationClassCode

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] @classCode="MANU" (CONF:9002)

OCL

isDefined('classCode') and self.classCode=vocab::RoleClassManufacturedProduct::MANU

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.54"/>
</manufacturedproduct>

0.002
testValidateImmunizationMedicationInformationId

Constraint

Consol Immunization Medication Information MAY contain zero or more [0..*] id (CONF:9005)

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.003
testValidateImmunizationMedicationInformationManufacturerOrganization

Constraint

Consol Immunization Medication Information SHOULD contain zero or one [0..1] manufacturerOrganization (CONF:9012) Contains exactly one [1..1] CDA Organization

OCL

self.manufacturerOrganization->one(manufacturerOrganization : cda::Organization | not manufacturerOrganization.oclIsUndefined() and manufacturerOrganization.oclIsKindOf(rim::Entity))

SuccessInvalid XML


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

Valid XML


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

0.002
testValidateImmunizationMedicationInformationManufacturedMaterial

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006)

OCL

self.manufacturedMaterial->one(manufacturedMaterial : cda::Material | not manufacturedMaterial.oclIsUndefined() and manufacturedMaterial.oclIsKindOf(cda::Material))

SuccessInvalid XML


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

Valid XML


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

0.003
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialCodeOriginalText

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial code SHOULD contain zero or one [0..1] originalText (CONF:9008)

OCL

self.manufacturedMaterial->excluding(null)->reject(code.originalText->size() = 1)

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<originalText/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.003
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialOriginalTextReference

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial originalText, if present, SHOULD contain zero or one [0..1] reference (CONF:15555)

OCL

self.manufacturedMaterial->excluding(null)->reject(code.originalText->size() = 1 implies code.originalText->one(reference->size() = 1))

SuccessInvalid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<originalText/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<originalText><reference value="ref1"/></originalText>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.004
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialTextReferenceValue

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial reference, if present, SHOULD contain zero or one [0..1] @value (CONF:15556)

OCL

self.manufacturedMaterial->excluding(null)->reject(code.originalText.reference->size() = 1 implies code.originalText.reference.value->size() = 1)

SuccessInvalid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<originalText><reference/></originalText>
</code>
</manufacturedMaterial>
</manufacturedproduct>

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<originalText><reference value="aaaaaaaaaaaaaaaaaaaaa"/></originalText>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.006
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialCodeTranslation

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial code MAY contain zero or more [0..*] translation (CONF:9011)

OCL

self.manufacturedMaterial->excluding(null)->reject(code->size() = 1 implies code.translation->size() > 0)

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code>
<translation/>
</code>
</manufacturedMaterial>
</manufacturedproduct>

0.005
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialCode

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial SHALL contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet Vaccines administered (CVX) 2.16.840.1.114222.4.11.934 STATIC 7 (CONF:9007)

OCL

self.manufacturedMaterial->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.12.292' and (value.code = '143' or value.code = '54' or value.code = '55' or value.code = '82' or value.code = '24' or value.code = '19' or value.code = '27' or value.code = '26' or value.code = '29' or value.code = '56' or value.code = '12' or value.code = '28' or value.code = '20' or value.code = '106' or value.code = '107' or value.code = '146' or value.code = '110' or value.code = '50' or value.code = '120' or value.code = '130' or value.code = '132' or value.code = '01' or value.code = '22' or value.code = '102' or value.code = '57' or value.code = '30' or value.code = '52' or value.code = '83' or value.code = '84' or value.code = '31' or value.code = '85' or value.code = '104' or value.code = '08' or value.code = '42' or value.code = '43' or value.code = '44' or value.code = '45' or value.code = '58' or value.code = '59' or value.code = '60' or value.code = '47' or value.code = '46' or value.code = '49' or value.code = '48' or value.code = '17' or value.code = '51' or value.code = '61' or value.code = '118' or value.code = '62' or value.code = '137' or value.code = '86' or value.code = '14' or value.code = '87' or value.code = '123' or value.code = '135' or value.code = '111' or value.code = '149' or value.code = '141' or value.code = '140' or value.code = '144' or value.code = '15' or value.code = '88' or value.code = '16' or value.code = '10' or value.code = '134' or value.code = '39' or value.code = '129' or value.code = '63' or value.code = '64' or value.code = '65' or value.code = '66' or value.code = '04' or value.code = '67' or value.code = '05' or value.code = '68' or value.code = '103' or value.code = '148' or value.code = '147' or value.code = '136' or value.code = '114' or value.code = '32' or value.code = '108' or value.code = '03' or value.code = '94' or value.code = '07' or value.code = '998' or value.code = '127' or value.code = '128' or value.code = '125' or value.code = '126' or value.code = '02' or value.code = '69' or value.code = '11' or value.code = '23' or value.code = '133' or value.code = '100' or value.code = '33' or value.code = '109' or value.code = '89' or value.code = '70' or value.code = '40' or value.code = '18' or value.code = '90' or value.code = '99' or value.code = '72' or value.code = '73' or value.code = '34' or value.code = '119' or value.code = '116' or value.code = '74' or value.code = '122' or value.code = '71' or value.code = '93' or value.code = '145' or value.code = '06' or value.code = '38' or value.code = '76' or value.code = '138' or value.code = '113' or value.code = '09' or value.code = '139' or value.code = '115' or value.code = '35' or value.code = '142' or value.code = '112' or value.code = '77' or value.code = '13' or value.code = '98' or value.code = '95' or value.code = '96' or value.code = '97' or value.code = '78' or value.code = '25' or value.code = '41' or value.code = '53' or value.code = '91' or value.code = '101' or value.code = '131' or value.code = '999' or value.code = '75' or value.code = '105' or value.code = '79' or value.code = '21' or value.code = '81' or value.code = '80' or value.code = '92' or value.code = '36' or value.code = '117' or value.code = '37' or value.code = '121')))

SuccessInvalid XML


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

Valid XML


<manufacturedproduct xmlns="urn:hl7-org:v3" classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.54"/>
<manufacturedMaterial>
<code code="143" codeSystem="2.16.840.1.113883.12.292"/>
</manufacturedMaterial>
</manufacturedproduct>

0.048
testValidateImmunizationMedicationInformationImmunizationMedicationInformationManufacturedMaterialLotNumberText

Constraint

Consol Immunization Medication Information SHALL contain exactly one [1..1] manufacturedMaterial (CONF:9006) manufacturedMaterial SHOULD contain zero or one [0..1] lotNumberText (CONF:9014)

OCL

self.manufacturedMaterial->excluding(null)->reject((lotNumberText.oclIsUndefined() or lotNumberText.isNullFlavorUndefined()) implies (not lotNumberText.oclIsUndefined()))

SuccessInvalid XML


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

Valid XML


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

0.004
Properties »