Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateImmunizationRefusalReasonTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8993, CONF:10500 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.53"

OCL

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

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.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>

0.011
testValidateImmunizationRefusalReasonClassCode

Constraint

Consol Immunization Refusal Reason SHALL contain exactly one [1..1] @classCode="OBS" Observation (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8991)

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.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>

0.007
testValidateImmunizationRefusalReasonCode

Constraint

Consol Immunization Refusal Reason SHALL contain exactly one [1..1] code, where the @code SHALL be selected from ValueSet No Immunization Reason Value Set 2.16.840.1.113883.1.11.19717 STATIC 1 (CONF:8995)

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.codeSystem = '2.16.840.1.113883.5.8' and (value.code = 'IMMUNE' or value.code = 'MEDPREC' or value.code = 'OSTOCK' or value.code = 'PATOBJ' or value.code = 'PHILISOP' or value.code = 'RELIG' or value.code = 'VACEFF' or value.code = 'VACSAF'))

SuccessInvalid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<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.53"/>
<code code="IMMUNE" codeSystem="2.16.840.1.113883.5.8" codeSystemName="" displayName=""/>
<statusCode code="completed"/>
</observation>

0.158
testValidateImmunizationRefusalReasonId

Constraint

Consol Immunization Refusal Reason SHALL contain at least one [1..*] id (CONF:8994)

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.53"/>
<id/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>

0.035
testValidateImmunizationRefusalReasonMoodCode

Constraint

Consol Immunization Refusal Reason SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8992)

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.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>

0.007
testValidateImmunizationRefusalReasonStatusCode

Constraint

Consol Immunization Refusal Reason SHALL contain exactly one [1..1] statusCode/@code="completed" (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF:8996)

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.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>

0.074
Properties »