Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.DiagnosticResultsSectionTest

NameTestsErrorsFailuresTime(s)Time StampHost
DiagnosticResultsSectionTest9000.1232013-01-31T13:34:31JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetResultOrganizers

Constraint

OCL

SuccessInvalid XML

Valid XML

0.016
testValidateDiagnosticResultsSectionHasResult

Constraint

HITSP Diagnostic Results Section SHALL satisfy: Contains Result as entry within section, or within a ResultOrganizer. (C83-[CT-122-2])

OCL

self.entry->exists(entry : cda::Entry | entry.observation.oclIsKindOf(hitsp::Result)) or self.entry->exists(entry : cda::Entry | entry.organizer.oclIsKindOf(ccd::ResultOrganizer) and entry.organizer.component.observation->exists(obs : cda::Observation | obs.oclIsKindOf(hitsp::Result)))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15.1"/>
<templateId root="2.16.840.1.113883.10.20.1.31"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.023
testValidateDiagnosticResultsSectionTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

0.006
testValidateDiagnosticResultsSectionDiagnosticProcedure

Constraint

HITSP Diagnostic Results Section SHALL contain at least one [1..*] entry (C83-[CT-122-2]) Contains exactly one [1..1] Procedure (templateId: 2.16.840.1.113883.3.88.11.83.17)

OCL

self.entry->exists(entry : cda::Entry | not entry.procedure.oclIsUndefined() and entry.procedure.oclIsKindOf(hitsp::Procedure))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<procedure classCode="PROC" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19"/>
<templateId root="2.16.840.1.113883.3.88.11.83.17"/>
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>
</entry>
</section>

0.015
testValidateDiagnosticResultsSectionResult

Constraint

HITSP Diagnostic Results Section MAY contain zero or more [0..*] entry Contains exactly one [1..1] Result (templateId: 2.16.840.1.113883.3.88.11.83.15.1)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(hitsp::Result))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15.1"/>
<templateId root="2.16.840.1.113883.10.20.1.31"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.014
testValidateDiagnosticResultsSectionResultOrganizer

Constraint

HITSP Diagnostic Results Section MAY contain zero or more [0..*] entry Contains exactly one [1..1] Result Organizer (templateId: 2.16.840.1.113883.10.20.1.32)

OCL

self.entry->exists(entry : cda::Entry | not entry.organizer.oclIsUndefined() and entry.organizer.oclIsKindOf(hitsp::ResultOrganizer))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.122"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.28"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="STUDIES SUMMARY"/>
<entry>
<organizer moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32"/>
</organizer>
</entry>
</section>

0.016
testGetDiagnosticProcedures

Constraint

OCL

SuccessInvalid XML

Valid XML

0.015
testGetResults

Constraint

OCL

SuccessInvalid XML

Valid XML

0.014
Properties »