Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ScanDataEntererTest5000.0192013-01-31T13:34:27JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateScanDataEntererTimeEqualsDocumentEffectiveTime

Constraint

IHE Scan Data Enterer SHALL satisfy: The time shall be equal to that of ClinicalDocument/effectiveTime. At a minimum, the time shall be precise to the day and shall include the time zone offset from GMT.

OCL

self.time.value = self.getClinicalDocument().effectiveTime.value

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<effectiveTime value="20081204103022-0500"/>
<dataEnterer>
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
<time value="20071204103022-0500"/>
</dataEnterer>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<effectiveTime value="20071204103022-0500"/>
<dataEnterer>
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
<time value="20071204103022-0500"/>
</dataEnterer>
</ClinicalDocument>

0.005
testValidateScanDataEntererHasAssignedEntityId

Constraint

IHE Scan Data Enterer SHALL satisfy: The assignedEntity/id element has both the root and the extension attributes. The root shall be the oid of the scanning facility and the extension shall be an appropriately assigned, facility unique id of the operator.

OCL

self.assignedEntity.id->forAll(ident : datatypes::II | not ident.root.oclIsUndefined() and not ident.extension.oclIsUndefined())

SuccessInvalid XML


<dataenterer xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
<assignedEntity>
<id/>
</assignedEntity>
</dataenterer>

Valid XML


<dataenterer xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
<assignedEntity>
<id root="root" extension="extension"/>
</assignedEntity>
</dataenterer>

0.006
testValidateScanDataEntererTemplateId

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

OCL

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

SuccessInvalid XML


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

Valid XML


<dataenterer xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
</dataenterer>

0.002
testValidateScanDataEntererTime

Constraint

IHE Scan Data Enterer SHALL contain exactly one [1..1] time

OCL

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

SuccessInvalid XML


<dataenterer xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
</dataenterer>

Valid XML


<dataenterer xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.3"/>
<time value="time"/>
</dataenterer>

0.002
Properties »