Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistoryOrganizerTest18001.0052013-01-31T13:34:55JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
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.010
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.006
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.006
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.022
testGetFamilyHistoryObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.024
testValidateFamilyHistoryOrganizerSubject

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609)

OCL

self.subject->one(subject : cda::Subject | not subject.oclIsUndefined() and subject.oclIsKindOf(cda::Subject))

SuccessInvalid XML


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

Valid XML


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

0.018
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonAdministrativeGenderCode

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject SHALL contain exactly one [1..1] administrativeGenderCode (CONF:15974), where the @code SHALL be selected from ValueSet Administrative Gender (HL7 V3) 2.16.840.1.113883.1.11.1 DYNAMIC (CONF:15975)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((administrativeGenderCode.oclIsUndefined() or administrativeGenderCode.isNullFlavorUndefined()) implies (not administrativeGenderCode.oclIsUndefined() and administrativeGenderCode.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = administrativeGenderCode.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.1' and (value.code = 'F' or value.code = 'M' or value.code = 'UN')))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<subject>
<administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.105
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonAdministrativeGenderCodeP

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject SHALL contain exactly one [1..1] administrativeGenderCode (CONF:15974), where the @code SHALL be selected from ValueSet Administrative Gender (HL7 V3) 2.16.840.1.113883.1.11.1 DYNAMIC (CONF:15975)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((administrativeGenderCode.oclIsUndefined() or administrativeGenderCode.isNullFlavorUndefined()) implies (not administrativeGenderCode.oclIsUndefined()))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<subject>
<administrativeGenderCode/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.050
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonBirthTime

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject SHOULD contain zero or one [0..1] birthTime (CONF:15976)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((birthTime.oclIsUndefined() or birthTime.isNullFlavorUndefined()) implies (not birthTime.oclIsUndefined()))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<subject>
<birthTime/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.049
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonSDTCDeceasedInd

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject MAY contain zero or one [0..1] sDTCDeceasedInd (CONF:15981)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((sDTCDeceasedInd.oclIsUndefined() or sDTCDeceasedInd.isNullFlavorUndefined()) implies (not sDTCDeceasedInd.oclIsUndefined()))

SuccessInvalid XML


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

Valid XML


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

0.048
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonSDTCDeceasedTime

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject MAY contain zero or one [0..1] sDTCDeceasedTime (CONF:15982)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((sDTCDeceasedTime.oclIsUndefined() or sDTCDeceasedTime.isNullFlavorUndefined()) implies (not sDTCDeceasedTime.oclIsUndefined()))

SuccessInvalid XML


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

Valid XML


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

0.050
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubjectPersonSDTCId

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248) subject SHOULD contain zero or more [0..*] sDTCId (CONF:15249)

OCL

self.subject->excluding(null).relatedSubject->excluding(null).subject->excluding(null)->reject((sDTCId->isEmpty() or sDTCId->exists(element | element.isNullFlavorUndefined())) implies (not sDTCId->isEmpty()))

SuccessInvalid XML


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

Valid XML


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

0.051
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectClassCode

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) relatedSubject SHALL contain zero or one [0..1] @classCode="PRS" (CONF:15245)

OCL

self.subject->excluding(null).relatedSubject->excluding(null)->reject(classCode=vocab::x_DocumentSubject::PRS)

SuccessInvalid XML


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

Valid XML


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

0.019
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectCode

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) relatedSubject SHALL contain exactly one [1..1] code (CONF:15246), where the @code SHOULD be selected from ValueSet FamilyHistoryRelatedSubjectCode 2.16.840.1.113883.1.11.19579 STATIC 1 (CONF:15247)

OCL

self.subject->excluding(null).relatedSubject->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.111' and (value.code = 'ADOPT' or value.code = 'AUNT' or value.code = 'CHILD' or value.code = 'CHLDINLAW' or value.code = 'COUSN' or value.code = 'DOMPART' or value.code = 'FAMMEMB' or value.code = 'CHLDFOST' or value.code = 'GRNDCHILD' or value.code = 'GPARNT' or value.code = 'GRPRN' or value.code = 'GGRPRN' or value.code = 'HSIB' or value.code = 'MAUNT' or value.code = 'MCOUSN' or value.code = 'MGRPRN' or value.code = 'MGGRPRN' or value.code = 'MUNCLE' or value.code = 'NCHILD' or value.code = 'NPRN' or value.code = 'NSIB' or value.code = 'NIENEPH' or value.code = 'PRN' or value.code = 'PRNINLAW' or value.code = 'PAUNT' or value.code = 'PCOUSN' or value.code = 'PGRPRN' or value.code = 'PGGRPRN' or value.code = 'PUNCLE' or value.code = 'SIB' or value.code = 'SIBINLAW' or value.code = 'SIGOTHR' or value.code = 'SPS' or value.code = 'STEP' or value.code = 'STPPRN' or value.code = 'STPSIB' or value.code = 'UNCLE')))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<code code="CHILD" codeSystem="2.16.840.1.113883.5.111"/>
</relatedSubject>
</subject>
</organizer>

0.437
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectCodeP

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) relatedSubject SHALL contain exactly one [1..1] code (CONF:15246), where the @code SHOULD be selected from ValueSet FamilyHistoryRelatedSubjectCode 2.16.840.1.113883.1.11.19579 STATIC 1 (CONF:15247)

OCL

self.subject->excluding(null).relatedSubject->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<code code="1234" codeSystem="2.16.840.1.113883.5.111"/>
</relatedSubject>
</subject>
</organizer>

0.047
testValidateFamilyHistoryOrganizerSubjectRelatedSubjectSubject

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244) relatedSubject SHOULD contain zero or one [0..1] subject, where its type is Subject Person (CONF:15248)

OCL

self.subject->excluding(null).relatedSubject->excluding(null)->reject(subject->one(subject : cda::SubjectPerson | not subject.oclIsUndefined() and subject.oclIsKindOf(cda::SubjectPerson)))

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<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.22.4.45"/>
<subject>
<relatedSubject>
<subject/>
</relatedSubject>
</subject>
</organizer>

0.032
testValidateFamilyHistoryOrganizerSubjectRelatedSubject

Constraint

Consol Family History Organizer SHALL contain zero or one [0..1] subject (CONF:8609) subject SHALL contain exactly one [1..1] relatedSubject, where its type is Related Subject (CONF:15244)

OCL

self.subject->excluding(null)->reject(relatedSubject->one(relatedSubject : cda::RelatedSubject | not relatedSubject.oclIsUndefined() and relatedSubject.oclIsKindOf(cda::RelatedSubject)))

SuccessInvalid XML


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

Valid XML


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

0.026
Properties »