Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistorySectionTest9000.0622013-01-31T13:34:13JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateFamilyHistorySectionFamilyHistoryObsOrgs

Constraint

CCD Family History Section Family History Section SHOULD include one or more family history observations (templateId 2.16.840.1.113883.10.20.1.22), which MAY be contained within family history organizers (templateId 2.16.840.1.113883.10.20.1.23) (CONF-184)

OCL

self.entry.observation->exists(obs : cda::Observation | obs.oclIsTypeOf(ccd::FamilyHistoryObservation)) or self.entry.organizer->exists(org : cda::Organizer | org.oclIsTypeOf(ccd::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.1.4"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of family member diseases"/>
<entry>
<organizer/>
</entry>
</section>

0.009
testValidateFamilyHistorySectionNoSubject

Constraint

CCD Family History Section The family history section SHALL NOT contain Section / subject. (CONF-189)

OCL

self.subject.oclIsUndefined()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.4"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of family member diseases"/>
<subject/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.1.4"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of family member diseases"/>
</section>

0.004
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.004
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.015
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.008
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.004
testValidateFamilyHistorySectionFamilyHistoryOrganizer

Constraint

CCD Family History Section MAY contain at least one [1..*] entry Contains exactly one [1..1] Family History Organizer (templateId: 2.16.840.1.113883.10.20.1.23)

OCL

self.entry->exists(entry : cda::Entry | not entry.organizer.oclIsUndefined() and entry.organizer.oclIsKindOf(ccd::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.1.4"/>
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of family member diseases"/>
<entry>
<organizer/>
</entry>
</section>

0.006
testGetFamilyHistoryOrganizers

Constraint

OCL

SuccessInvalid XML

Valid XML

0.006
Properties »