Unit Test Results.

Designed for use with JUnit and Ant.

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

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

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateFamilyHistoryOrganizerHasComponent

Constraint

CCD Family History Organizer A family history organizer SHALL contain one or more Organizer / component. (CONF-205)

OCL

self.component->size() >= 1

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<component>
<observation/>
</component>
</organizer>

0.056
testValidateFamilyHistoryOrganizerHasFamilyHistoryObservation

Constraint

CCD Family History Organizer The target of a family history organizer Organizer / component relationship SHOULD be a family history observation, but MAY be some other clinical statement

OCL

self.component->exists (comp : cda::Component4 | comp.observation->exists(obs : cda::Observation | obs.oclIsKindOf(ccd::FamilyHistoryObservation)))

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<component>
<observation/>
</component>
</organizer>

0.005
testValidateFamilyHistoryOrganizerHasSubject

Constraint

CCD Family History Organizer A family history organizer SHALL contain exactly one subject participant, representing the family member who is the subject of the family history observations (CONF-208)

OCL

self.subject->size() = 1

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject/>
</organizer>

0.005
testValidateFamilyHistoryOrganizerHasSubjectPatientRelationship

Constraint

CCD Family History Organizer A subject participant SHALL contain exactly one RelatedSubject, representing the relationship of the subject to the patient (CONF-212)

OCL

self.subject.relatedSubject->size() = 1

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject/>
</organizer>

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject/>
</subject>
</organizer>

0.005
testValidateFamilyHistoryOrganizerRelationshipValueCode

Constraint

CCD Family History Organizer The value for RelatedSubject / @classCode SHALL be "PRS" "Personal relationship" 2.16.840.1.113883.5.110 RoleClass STATIC (CONF-213)

OCL

self.subject.relatedSubject.classCode = vocab::x_DocumentSubject::PRS

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject classCode="PRS"/>
</subject>
</organizer>

0.004
testValidateFamilyHistoryOrganizerHasRelatedSubjectCode

Constraint

CCD Family History Organizer RelatedSubject SHALL contain exactly one RelatedSubject / code

OCL

self.subject.relatedSubject.code->size() = 1

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject/>
</subject>
</organizer>

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<code/>
</relatedSubject>
</subject>
</organizer>

0.006
testValidateFamilyHistoryOrganizerRelatedSubjectCodeValueSet

Constraint

CCD Family History Organizer The value for "RelatedSubject / code" SHOULD be selected from ValueSet 2.16.840.1.113883.1.11.19579 FamilyHistoryRelatedSubjectCode DYNAMIC or 2.16.840.1.113883.1.11.20.21 FamilyHistoryPersonCode DYNAMIC (CONF-215)

OCL

self.subject.relatedSubject.code.codeSystem = '2.16.840.1.113883.1.11.19579' or self.subject.relatedSubject.code.codeSystem = '2.16.840.1.113883.1.11.20.21'

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<code codeSystem="2.16.840.1.113883.1.11.19579"/>
</relatedSubject>
</subject>
</organizer>

0.008
testValidateFamilyHistoryOrganizerHasRelatedSubjectSubject

Constraint

CCD Family History Organizer RelatedSubject SHOULD contain exactly one RelatedSubject / subject (CONF-217)

OCL

self.subject.relatedSubject.subject->size() = 1

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject/>
</subject>
</organizer>

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject/>
</relatedSubject>
</subject>
</organizer>

0.006
testValidateFamilyHistoryOrganizerHasGenderCode

Constraint

CCD Family History Organizer RelatedSubject / subject SHOULD contain exactly one RelatedSubject / subject / administrativeGenderCode. (CONF-218)

OCL

self.subject.relatedSubject.subject.administrativeGenderCode->size() = 1

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject/>
</relatedSubject>
</subject>
</organizer>

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject>
<administrativeGenderCode/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.006
testValidateFamilyHistoryOrganizerRelatedSubjectBirthTime

Constraint

CCD Family History Organizer SHOULD satisfy: subject/relatedSubject/subject contains exactly one birthTime (CONF-219)

OCL

not self.subject.relatedSubject.subject.birthTime.oclIsUndefined()

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject/>
</relatedSubject>
</subject>
</organizer>

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject>
<birthTime/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.006
testValidateFamilyHistoryOrganizerTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
</organizer>

0.004
testValidateFamilyHistoryOrganizerStatusCode

Constraint

CCD Family History Organizer SHALL contain exactly one [1..1] statusCode/@code="completed" (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF-203, CONF-204)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<statusCode code="completed"/>
</organizer>

0.013
testValidateFamilyHistoryOrganizerClassCode

Constraint

Consol Family History Organizer SHALL contain exactly one [1..1] @classCode="CLUSTER" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8600)

OCL

self.classCode=vocab::x_ActClassDocumentEntryOrganizer::CLUSTER

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
</organizer>

0.003
testValidateFamilyHistoryOrganizerMoodCode

Constraint

Consol Family History Organizer SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8601)

OCL

self.moodCode=vocab::ActMood::EVN

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
</organizer>

0.003
testValidateFamilyHistoryOrganizerFamilyHistoryObservation

Constraint

Consol Family History Organizer SHALL contain at least one [1..*] component (CONF:8607, CONF:16888) Contains exactly one [1..1] Family History Observation (templateId: 2.16.840.1.113883.10.20.22.4.46)

OCL

self.component->exists(component : cda::Component4 | not component.observation.oclIsUndefined() and component.observation.oclIsKindOf(consol::FamilyHistoryObservation))

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<component>
<observation/>
</component>
</organizer>

0.007
testGetFamilyHistoryObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.006
Properties »