Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AllergiesSectionTest8000.1402013-01-31T13:34:38JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateAllergiesSectionEntriesOptionalTemplateId

Constraint

The 'AllergiesSectionEntriesOptionalTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.consol.impl.AllergiesSectionImpl@75c1f5bd{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
</section>

0.008
testValidateAllergiesSectionCodeP

Constraint

Consol Allergies Section SHALL contain exactly one [1..1] code (CONF:15349)/@code="48765-2" Allergies, adverse reactions, alerts (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15350)

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
</section>

0.020
testValidateAllergiesSectionCode

Constraint

Consol Allergies Section SHALL contain exactly one [1..1] code (CONF:15349)/@code="48765-2" Allergies, adverse reactions, alerts (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15350)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.code = '48765-2' and value.codeSystem = '2.16.840.1.113883.6.1')

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
</section>

0.044
testValidateAllergiesSectionTitle

Constraint

Consol Allergies Section SHALL contain exactly one [1..1] title (CONF:7534)

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
<title>title</title>
</section>

0.022
testValidateAllergiesSectionText

Constraint

Consol Allergies Section SHALL contain exactly one [1..1] text (CONF:7530)

OCL

not self.text.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
<text/>
</section>

0.007
testValidateAllergiesSectionAllergyProblemAct

Constraint

Consol Allergies Section SHALL contain at least one [1..*] entry (CONF:7531, CONF:7532) Contains exactly one [1..1] Allergy Problem Act (templateId: 2.16.840.1.113883.10.20.22.4.30)

OCL

self.entry->exists(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(consol::AllergyProblemAct))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
<templateId root="2.16.840.1.113883.10.20.22.2.6"/>
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies, adverse reactions, alerts"/>
<entry>
<act/>
</entry>
</section>

0.017
testGetConsolAllergyProblemActs

Constraint

OCL

SuccessInvalid XML

Valid XML

0.018
Properties »