Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
EncounterEntryTest7000.0742013-01-31T13:34:23JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateEncounterEntryTemplateId

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

OCL

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

SuccessInvalid XML


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

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.007
testValidateEncounterEntryClassCode

Constraint

IHE Encounter Entry SHALL contain exactly one [1..1] @classCode="ENC" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass)

OCL

self.classCode=vocab::ActClass::ENC

SuccessInvalid XML


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

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.004
testValidateEncounterEntryCode

Constraint

IHE Encounter Entry SHALL contain exactly one [1..1] code, where the @code SHOULD be selected from (CodeSystem: 2.16.840.1.113883.5.4 ActEncounterCode)

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.codeSystem = '2.16.840.1.113883.5.4')

SuccessInvalid XML


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

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.021
testValidateEncounterEntryCodeP

Constraint

IHE Encounter Entry SHALL contain exactly one [1..1] code, where the @code SHOULD be selected from (CodeSystem: 2.16.840.1.113883.5.4 ActEncounterCode)

OCL

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

SuccessInvalid XML


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

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.012
testValidateEncounterEntryId

Constraint

IHE Encounter Entry SHALL contain at least one [1..*] id

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<id root="root"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

0.013
testValidateEncounterEntryText

Constraint

IHE Encounter Entry SHALL contain exactly one [1..1] text

OCL

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

SuccessInvalid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
</encounter>

Valid XML


<encounter xmlns="urn:hl7-org:v3" classCode="ENC">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14"/>
<templateId root="2.16.840.1.113883.10.20.1.25"/>
<code codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActEncounterCode"/>
<text>text</text>
</encounter>

0.013
Properties »