Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ihe.tests.PatientContactGuardianTest

NameTestsErrorsFailuresTime(s)Time StampHost
PatientContactGuardianTest6000.0222013-01-31T13:34:25JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePatientContactGuardianTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
</guardian>

0.005
testValidatePatientContactGuardianAddr

Constraint

IHE Patient Contact Guardian SHOULD contain zero or more [0..*] addr

OCL

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

SuccessInvalid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
</guardian>

Valid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<addr/>
</guardian>

0.003
testValidatePatientContactGuardianClassCode

Constraint

IHE Patient Contact Guardian SHALL contain exactly one [1..1] @classCode="GUAR"

OCL

isDefined('classCode') and self.classCode=vocab::RoleClass::GUAR

SuccessInvalid XML


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

Valid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
</guardian>

0.003
testValidatePatientContactGuardianCode

Constraint

IHE Patient Contact Guardian SHALL contain zero or one [0..1] code, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.5.111 RoleCode)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.111')

SuccessInvalid XML


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

Valid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
</guardian>

0.003
testValidatePatientContactGuardianTelecom

Constraint

IHE Patient Contact Guardian SHOULD contain zero or more [0..*] telecom

OCL

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

SuccessInvalid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
</guardian>

Valid XML


<guardian xmlns="urn:hl7-org:v3" classCode="GUAR">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.4"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<telecom/>
</guardian>

0.003
Properties »