Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ScanningDeviceTest8000.0282013-01-31T13:34:28JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateScanningDeviceTimeEqualsDocumentEffectiveTime

Constraint

IHE Scanning Device 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"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<time value="20071204103022-0500"/>
</author>
</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"/>
<author>
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<time value="20071204103022-0500"/>
</author>
</ClinicalDocument>

0.004
testValidateScanningDeviceHasAssignedAuthorId

Constraint

IHE Scanning Device SHALL satisfy: The assignedAuthor/id element shall be at least the root oid of the scanning device.

OCL

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

SuccessInvalid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
</author>

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor/>
</author>

0.002
testValidateScanningDeviceHasAssignedAuthoringDeviceCode

Constraint

IHE Scanning Device SHALL satisfy: The assignedAuthor/assignedAuthoringDevice/code element is present. The values set here are taken from appropriate DICOM vocabulary. The value of code@codeSystem shall be set to "1.2.840.10008.2.16.4". The value of code@code shall be set to "CAPTURE" for PDF scanned content and "WSD" for plaintext. The value of code@displayName shall be set to "Image Capture" for PDF scanned content and "Workstation" for plaintext.

OCL

self.assignedAuthor.assignedAuthoringDevice.code.codeSystem = '1.2.840.10008.2.16.4' and not self.assignedAuthor.assignedAuthoringDevice.code.code.oclIsUndefined() and not self.assignedAuthor.assignedAuthoringDevice.code.displayName.oclIsUndefined()

SuccessInvalid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice/>
</assignedAuthor>
</author>

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice>
<code code="CAPTURE" codeSystem="1.2.840.10008.2.16.4" displayName="PDF Capture"/>
</assignedAuthoringDevice>
</assignedAuthor>
</author>

0.006
testValidateScanningDeviceHasDeviceManufacturerModelName

Constraint

IHE Scanning Device SHALL satisfy: The assignedAuthor/assignedAuthoringDevice/manufacturerModelName element is present.

OCL

not self.assignedAuthor.assignedAuthoringDevice.manufacturerModelName.oclIsUndefined()

SuccessInvalid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice/>
</assignedAuthor>
</author>

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice>
<manufacturerModelName>model name</manufacturerModelName>
</assignedAuthoringDevice>
</assignedAuthor>
</author>

0.004
testValidateScanningDeviceHasDeviceSoftwareName

Constraint

IHE Scanning Device SHALL satisfy: The assignedAuthor/assignedAuthoringDevice/softwareName element is present.

OCL

not self.assignedAuthor.assignedAuthoringDevice.softwareName.oclIsUndefined()

SuccessInvalid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice/>
</assignedAuthor>
</author>

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<assignedAuthoringDevice>
<softwareName>software</softwareName>
</assignedAuthoringDevice>
</assignedAuthor>
</author>

0.003
testValidateScanningDeviceHasAssignedAuthorRepresentedOrganizationId

Constraint

IHE Scanning Device SHALL satisfy: The assignedAuthor/representedOrganization/id element is present. The root attribute shall be set to the oid of the scanning facility.

OCL

self.assignedAuthor.representedOrganization.id->forAll(ident : datatypes::II | not ident.root.oclIsUndefined())

SuccessInvalid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<representedOrganization>
<id/>
</representedOrganization>
</assignedAuthor>
</author>

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
<assignedAuthor>
<representedOrganization>
<id root="root"/>
</representedOrganization>
</assignedAuthor>
</author>

0.003
testValidateScanningDeviceTemplateId

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

OCL

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

SuccessInvalid XML


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

Valid XML


<author xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.2.20.2"/>
</author>

0.002
Properties »