Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistorySectionTest8000.1802013-01-31T13:34:56JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateFamilyHistorySectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:10388 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.15"

OCL

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

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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
</section>

0.009
testValidateFamilyHistorySectionCode

Constraint

Consol Family History Section SHALL contain exactly one [1..1] code (CONF:15469)/@code="10157-6" Family History (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15470)

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 = '10157-6' 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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
</section>

0.058
testValidateFamilyHistorySectionTitle

Constraint

Consol Family History Section SHALL contain exactly one [1..1] title (CONF:7934)

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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
<title>title</title>
</section>

0.027
testValidateFamilyHistorySectionText

Constraint

Consol Family History Section SHALL contain exactly one [1..1] text (CONF:7935)

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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
<text/>
</section>

0.009
testGetFamilyHistories

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testValidateFamilyHistorySectionCodeP

Constraint

Consol Family History Section SHALL contain exactly one [1..1] code (CONF:15469)/@code="10157-6" Family History (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15470)

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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
</section>

0.026
testValidateFamilyHistorySectionFamilyHistory

Constraint

Consol Family History Section MAY contain zero or more [0..*] entry (CONF:7955) Contains exactly one [1..1] Family History Organizer (templateId: 2.16.840.1.113883.10.20.22.4.45)

OCL

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

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.15"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Family History"/>
<entry>
<organizer/>
</entry>
</section>

0.022
Properties »