Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.EncounterDiagnosisTest

NameTestsErrorsFailuresTime(s)Time StampHost
EncounterDiagnosisTest8000.1572013-01-31T13:34:53JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testGetProblemObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.023
testValidateEncounterDiagnosisTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:14895, CONF:14896 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.80"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code code="29308-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Diagnosis"/>
</act>

0.009
testValidateEncounterDiagnosisClassCode

Constraint

Consol Encounter Diagnosis SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:14889)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code code="29308-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Diagnosis"/>
</act>

0.005
testValidateEncounterDiagnosisMoodCode

Constraint

Consol Encounter Diagnosis SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14890)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code code="29308-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Diagnosis"/>
</act>

0.005
testValidateEncounterDiagnosisCode

Constraint

Consol Encounter Diagnosis SHALL contain exactly one [1..1] code (CONF:14891)/@code="29308-4" Diagnosis (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:14897)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = '29308-4' and value.codeSystem = '2.16.840.1.113883.6.1')

SuccessInvalid XML


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

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code xsi:type="CE" code="29308-4" codeSystem="2.16.840.1.113883.6.1"/>
</act>

0.056
testValidateEncounterDiagnosisCodeP

Constraint

Consol Encounter Diagnosis SHALL contain exactly one [1..1] code (CONF:14891)/@code="29308-4" Diagnosis (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:14897)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code xsi:type="CE" code="29308-4" codeSystem="2.16.840.1.113883.6.1"/>
</act>

0.024
testValidateEncounterDiagnosisProblemObservation

Constraint

Consol Encounter Diagnosis SHALL contain at least one [1..*] entryRelationship (CONF:14892, CONF:14893, CONF:14898) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Problem Observation (templateId: 2.16.840.1.113883.10.20.22.4.4)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::ProblemObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.80"/>
<code code="29308-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Diagnosis"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</act>

0.027
Properties »