Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PatientAwarenessTest5000.0172013-01-31T13:34:16JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidatePatientAwarenessParticipantRoleId

Constraint

CCD Patient Awareness Patient awareness SHALL contain exactly one participant / participantRole / id, which SHALL have exactly one value, which SHALL also be present in ClinicalDocument / recordTarget / patientRole / id. (CONF-183)

OCL

self.participantRole.id->one(id : datatypes::II | not id.root.oclIsUndefined())-- TODO compare with ClinicalDocument/recordTarget/patientRole/id

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="SBJ">
<templateId root="2.16.840.1.113883.10.20.1.48"/>
<participantRole>
<id root="s"/>
</participantRole>
</participant2>

0.004
testValidatePatientAwarenessTemplateId

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.48"

OCL

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

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="SBJ">
<templateId root="2.16.840.1.113883.10.20.1.48"/>
</participant2>

0.003
testValidatePatientAwarenessTypeCode

Constraint

CCD Patient Awareness SHALL contain exactly one [1..1] @typeCode="SBJ" (CONF-181)

OCL

self.typeCode=vocab::ParticipationType::SBJ

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="SBJ">
<templateId root="2.16.840.1.113883.10.20.1.48"/>
</participant2>

0.002
testValidatePatientAwarenessAwarenessCode

Constraint

CCD Patient Awareness SHALL contain exactly one [1..1] awarenessCode (CONF-182)

OCL

(self.awarenessCode.oclIsUndefined() or self.awarenessCode.isNullFlavorUndefined()) implies (not self.awarenessCode.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<participant2 xmlns="urn:hl7-org:v3" typeCode="SBJ">
<templateId root="2.16.840.1.113883.10.20.1.48"/>
<awarenessCode/>
</participant2>

0.003
Properties »