Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
FamilyHistoryOrganizerTest9000.0852013-01-31T13:34:23JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateIHEFamilyHistoryOrganizerHasParticipant

Constraint

IHE Family History Organizer The participant element MAY be present to record the relationship of the subject to other family members to create a pedigree graph.

OCL

self.participant->size() = 1

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<participant/>
</organizer>

0.008
testValidateIHEFamilyHistoryOrganizerHasParticipantParticipantRole

Constraint

IHE Family History Organizer SHALL satisfy: Participant shall contain a participantRole/@classCode = "PRS" element showing the relationship of the subject to other family members

OCL

self.participant.participantRole->one(pr : cda::ParticipantRole | pr.classCode = vocab::RoleClassRoot::PRS)

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<participant>
<participantRole classCode="PRS">
<code/>
</participantRole>
</participant>
</organizer>

0.006
testValidateIHEFamilyHistoryOrganizerHasParticipantRoleCode

Constraint

IHE Family History Organizer SHALL satisfy: The Participant/ParticipantRole/code element shall be present, and gives the relationship of the participant to the subject. The code attribute shall be present, and shall contain a value from the HL7 FamilyMember vocabulary

OCL

self.participant.participantRole.code->size() = 1

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<participant>
<participantRole>
<code/>
</participantRole>
</participant>
</organizer>

0.009
testValidateIHEFamilyHistoryOrganizerHasParticipantRolePlayingEntity

Constraint

IHE Family History Organizer SHALL satisfy: The Participant/ParticipantRole/PlayingEntity element shall be present with @classCode = 'PSN'

OCL

self.participant.participantRole.playingEntity->one(pe : cda::PlayingEntity | pe.classCode = vocab::EntityClassRoot::PSN)

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<participant>
<participantRole>
<code/>
<playingEntity classCode="PSN"/>
</participantRole>
</participant>
</organizer>

0.007
testValidateIHEFamilyHistoryOrganizerTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


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

0.006
testValidateIHEFamilyHistoryOrganizerCode

Constraint

IHE Family History Organizer SHALL contain exactly one [1..1] code, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.5.111 RoleCode)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.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="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
</organizer>

0.022
testValidateIHEFamilyHistoryOrganizerFamilyHistoryObservation

Constraint

IHE Family History Organizer SHALL contain at least one [1..*] component Contains exactly one [1..1] Family History Observation (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.13.3)

OCL

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

SuccessInvalid XML


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

Valid XML


<organizer xmlns="urn:hl7-org:v3" classCode="CLUSTER" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.15"/>
<templateId root="2.16.840.1.113883.10.20.1.23"/>
<code codeSystem="2.16.840.1.113883.5.111" codeSystemName="RoleCode"/>
<statusCode code="completed"/>
<component>
<observation moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.3"/>
<templateId root="2.16.840.1.113883.10.20.1.22"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</component>
</organizer>

0.012
testGetIHEFamilyHistoryObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.011
Properties »