Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AllergyDrugSensitivityTest22000.7072013-01-31T13:34:30JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateAllergyDrugSensitivityAdverseEventDate

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: the observation/effectiveTime element is present to record event date

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_ALLERGY_DRUG_SENSITIVITY_Adverse_EVENT_DATE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<effectiveTime/>
</observation>
</entryRelationship>
</act>

0.012
testValidateAllergyDrugSensitivityAdverseEventType

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the observation/code element shall be present to record the adverse event type

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_ALLERGY_DRUG_SENSITIVITY_Adverse_EVENT_TYPE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<code/>
</observation>
</entryRelationship>
</act>

0.010
testValidateAllergyDrugSensitivityAdverseEventTypeVocab

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the code/@code attribute value is from Allergy/Adverse Event Type Value Set, 2.16.840.1.113883.3.88.12.3221.6.2, version: 20081218, Static (C154-[DE-6.02-1])

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_ALLERGY_DRUG_SENSITIVITY_Adverse_EVENT_TYPE_VOCAB__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<code code="416098002" codeSystem="2.16.840.1.113883.6.96"/>
</observation>
</entryRelationship>
</act>

0.065
testValidateAllergyDrugSensitivityAllergyProduct

Constraint

HITSP Allergy Drug Sensitivity the observation/participant element SHOULD be present

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined()))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant/>
</observation>
</entryRelationship>
</act>

0.011
testValidateAllergyDrugSensitivityAllergyProductTypeCode

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the participant/@typecode attribute shall be 'CSM'

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies par.typeCode = vocab::ParticipationType::CSM))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM"/>
</observation>
</entryRelationship>
</act>

0.015
testValidateAllergyDrugSensitivityProductDetailParticipantRole

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the participant/participantRole element may be present

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined()))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole/>
</participant>
</observation>
</entryRelationship>
</act>

0.021
testValidateAllergyDrugSensitivityProductDetailParticipantRoleClassCode

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the participant/participantRole/@classcode attribute shall be 'MANU'

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode=vocab::RoleClassRoot::MANU))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU"/>
</participant>
</observation>
</entryRelationship>
</act>

0.025
testValidateAllergyDrugSensitivityProductDetailPlayingEntity

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: The participant/participantRole/PlayingEntity element may be present

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode =vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode=vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined())))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT"/>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.032
testValidateAllergyDrugSensitivityProductDetailPlayingEntityClassCode

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the participant/participantRole/playingEntity/@classcode attribute shall be 'MMAT'

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode =vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode=vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode =vocab::EntityClassRoot::MMAT )))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT"/>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.036
testValidateAllergyDrugSensitivityProductDetailName

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the participant/participantRole/playingEntity/name element is present

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode=vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode = vocab::EntityClassRoot::MMAT and playe.name->size() = 1)))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<name/>
</playingEntity>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.044
testValidateAllergyDrugSensitivityProductCode

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: participant/participantRole/playingEntity/code element is present

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode=vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode = vocab::EntityClassRoot::MMAT and playe.code->size() = 1)))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<code/>
</playingEntity>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.044
testValidateAllergyDrugSensitivityAllergyProductFoodVocab

Constraint

HITSP Allergy Drug Sensitivity For participant/participantRole/playingEntity/code element, Food and substance allergies SHALL be coded as Ingredient Name Value Set, 2.16.840.1.113883.3.88.12.80.20, Dynamic (C154-[DE-6.04-1])

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode= vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode = vocab::EntityClassRoot::MMAT and playe.code->size() = 1 and (playe.code.codeSystem ='2.16.840.1.113883.4.9' or playe.code.codeSystem = '2.16.840.1.113883.3.26.1.5' or playe.code.codeSystem = '2.16.840.1.113883.6.88'))))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<code codeSystem="2.16.840.1.113883.4.9"/>
</playingEntity>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.060
testValidateAllergyDrugSensitivityAllergyProductMedClassVocab

Constraint

HITSP Allergy Drug Sensitivity For participant/participantRole/playingEntity/code element, Allergies to a class of medication SHALL be coded as Medication Drug Class Value Set, 2.16.840.1.113883.3.88.12.80.17, version: 20081218, Dynamic (C154-[DE-6.04-2])

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode= vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode = vocab::EntityClassRoot::MMAT and playe.code->size() = 1 and (playe.code.codeSystem ='2.16.840.1.113883.4.9' or playe.code.codeSystem = '2.16.840.1.113883.3.26.1.5' or playe.code.codeSystem = '2.16.840.1.113883.6.88'))))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.6"/>
<templateId root="2.16.840.1.113883.10.20.1.28"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<code codeSystem="2.16.840.1.113883.6.88"/>
</playingEntity>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.061
testValidateAllergyDrugSensitivityAllergyProductSpecificMedVocab

Constraint

HITSP Allergy Drug Sensitivity For participant/participantRole/playingEntity/code element, Allergies to a specific medication SHALL be coded with Medication Brand Name Value Set, 2.16.840.1.113883.3.88.12.80.16, version: 20081218, Dynamic (C154-[DE-6.04-3])

OCL

self.getObservations()->exists(obs : cda::Observation | obs.participant->exists( par : cda::Participant2 | not par.oclIsUndefined() implies (par.typeCode = vocab::ParticipationType::CSM and par.participantRole->exists(prole : cda::ParticipantRole | not prole.oclIsUndefined() and prole.classCode= vocab::RoleClassRoot::MANU and prole.playingEntity->exists( playe : cda::PlayingEntity | not playe.oclIsUndefined() and playe.classCode = vocab::EntityClassRoot::MMAT and playe.code->size() = 1 and (playe.code.codeSystem ='2.16.840.1.113883.4.9' or playe.code.codeSystem = '2.16.840.1.113883.3.26.1.5' or playe.code.codeSystem = '2.16.840.1.113883.6.88'))))))

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<code codeSystem="2.16.840.1.113883.6.88"/>
</playingEntity>
</participantRole>
</participant>
</observation>
</entryRelationship>
</act>

0.061
testValidateAllergyDrugSensitivityReactionText

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: the text element is present in the Reaction Observation entry

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( ro | (not ro.oclIsKindOf(ccd::ReactionObservation)) or (ro.oclIsKindOf(ccd::ReactionObservation) and not ro.text.oclIsUndefined()) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.18"/>
<statusCode code="completed"/>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.54"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.18"/>
<statusCode code="completed"/>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.54"/>
<text>somecontent</text>
<statusCode code="completed"/>
</observation>
</entryRelationship>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<text>somecontent</text>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.024
testValidateAllergyDrugSensitivityReactionCode

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: the code element is present in the Reaction Observation entry

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( ro | (not ro.oclIsKindOf(ccd::ReactionObservation)) or (ro.oclIsKindOf(ccd::ReactionObservation) and not ro.code.oclIsUndefined()) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation>
<code/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.023
testValidateAllergyDrugSensitivityReactionCodeVocab

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the code element is coded as Problem Value Set, 2.16.840.1.113883.3.88.12.3221.7.4, version: 20100125, Dynamic (C154-[DE-6.06-1])

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( ro | (not ro.oclIsKindOf(ccd::ReactionObservation)) or (ro.oclIsKindOf(ccd::ReactionObservation) and not ro.code.oclIsUndefined() and ro.code.codeSystem = '2.16.840.1.113883.6.96' and (ro.code.code = '404684003' or ro.code.code = '243796009') ) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation>
<code/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation>
<code code="243796009" codeSystem="2.16.840.1.113883.6.96"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.040
testValidateAllergyDrugSensitivitySeverityText

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: The text element is present in the Severity Observation template

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( so | (not so.oclIsKindOf(ccd::SeverityObservation)) or (so.oclIsKindOf(ccd::SeverityObservation) and not so.text.oclIsUndefined()) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.55"/>
<code code="SEV" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Severity observation"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.55"/>
<code code="SEV" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7ActCode" displayName="Severity observation"/>
<text/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.024
testValidateAllergyDrugSensitivitySeverityCode

Constraint

HITSP Allergy Drug Sensitivity SHOULD satisfy: the code element is present in the Severity Observation entry

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( so | (not so.oclIsKindOf(ccd::SeverityObservation)) or (so.oclIsKindOf(ccd::SeverityObservation) and not so.code.oclIsUndefined()) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation>
<code/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.023
testValidateAllergyDrugSensitivitySeverityCodeVocab

Constraint

HITSP Allergy Drug Sensitivity SHALL satisfy: the code element is coded as Problem Severity Value Set, 2.16.840.1.113883.3.88.12.3221.6.8, version: 20081218, Static (C154-[DE-6.08-1])

OCL

self.getObservations()->forAll(obs | obs.getObservations()->forAll( so | (not so.oclIsKindOf(ccd::SeverityObservation)) or (so.oclIsKindOf(ccd::SeverityObservation) and not so.code.oclIsUndefined() and so.code.codeSystem = '2.16.840.1.113883.6.96' and (so.code.code = '255604002' or so.code.code = '371923003' or so.code.code = '6736007' or so.code.code = '371924009' or so.code.code = '24484000' or so.code.code = '399166001')) ) )

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation/>
</entryRelationship>
</observation>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
<entryRelationship>
<observation>
<entryRelationship>
<observation>
<code code="371923003" codeSystem="2.16.840.1.113883.6.96"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</act>

0.062
testValidateAllergyDrugSensitivityTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( C83-[DE-6-CDA-1] ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.88.11.83.6"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.6"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
<code nullFlavor="NA"/>
</act>

0.007
Properties »