Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.hitsp.tests.FamilyHistoryTest

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistoryTest9000.1242013-01-31T13:34:32JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateFamilyHistoryRelatedSubjectCodeValueSet

Constraint

HITSP Family History subject/RelatedSubject/Code (Family Member Relationship to Patient) SHALL be coded as 2.16.840.1.113883.1.11.19579, Family Member Value Set, STATIC, V3NE08

OCL

self.subject.relatedSubject.code.codeSystem = '2.16.840.1.113883.5.111'

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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<code codeSystem="2.16.840.1.113883.5.111"/>
</relatedSubject>
</subject>
</organizer>

0.009
testValidateFamilyHistoryHasSDTCid

Constraint

HITSP Family History One RelatedSubject/subject/sdtc:id element SHALL be present.

OCL

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

SuccessInvalid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
</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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject>
<sdtc:id/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.013
testValidateFamilyHistoryHasFamilyName

Constraint

HITSP Family History RelatedSubject/subject/name SHOULD be present.

OCL

self.subject.relatedSubject.subject.name->size() > 0

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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject>
<name/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.012
testValidateFamilyHistoryHasGenderCode

Constraint

HITSP Family History RelatedSubject/subject/administrativeGenderCode SHALL be code as 2.16.840.1.113883.1.11.1, Adminstrative Gender Value Set, STATIC, 20081218

OCL

self.subject.relatedSubject.subject.administrativeGenderCode.codeSystem = '2.16.840.1.113883.5.1' and (self.subject.relatedSubject.subject.administrativeGenderCode.code = 'F' or self.subject.relatedSubject.subject.administrativeGenderCode.code='M' or self.subject.relatedSubject.subject.administrativeGenderCode.code='UN')

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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<subject>
<relatedSubject>
<subject>
<name/>
<administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
</subject>
</relatedSubject>
</subject>
</organizer>

0.035
testValidateFamilyHistoryFamilyMemberCondition

Constraint

HITSP Family History Family History Condition data elements SHALL declare conformance to the IHE Family History Observation entry by including a <templateID> element with the root attribute set to the value 1.3.6.1.4.1.19376.1.5.3.1.4.13.3

OCL

self.getObservations()->exists(obs : cda::Observation | obs.oclIsKindOf(ihe::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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<component>
<observation/>
</component>
</organizer>

0.008
testValidateFamilyHistoryTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.18"

OCL

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

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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
</organizer>

0.007
testValidateFamilyHistoryProblemStatusObservation

Constraint

HITSP Family History SHOULD contain zero or more [0..*] component Contains exactly one [1..1] IHE Problem Status Observation (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.1.1)

OCL

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

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.3.88.11.83.18"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<component>
<observation/>
</component>
</organizer>

0.018
testGetProblemStatusObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.016
Properties »