Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ImmunizationActivityTest43004.9752013-01-31T13:35:20JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateImmunizationActivityTextReference

Constraint

Consol Immunization Activity This text, if present, SHOULD contain zero or one [0..1] reference (CONF:15543)

OCL

not self.text.oclIsUndefined() implies self.text->forAll(reference->size() = 1)

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text><reference value="test"/></text>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.040
testValidateImmunizationActivityReferenceValue

Constraint

Consol Immunization Activity reference, if present, SHOULD contain zero or one [0..1] @value (CONF:15544)

OCL

self.text->forAll(reference->size() = 1) implies self.text->forAll(reference->one(value->size() = 1))

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text><reference/></text>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text><reference value="test"/></text>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.049
testValidateImmunizationActivityTextReferenceValue

Constraint

Consol Immunization Activity This reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1. (CONF:15545)

OCL

not self.text.reference.value.oclIsUndefined() implies not self.getSection().text.getText(self.text.reference.value.substring(2, self.text.reference.value.size())).oclIsUndefined()

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="">
Not a particularly severe reaction.
</content></text>
<entry>
<substanceAdministration classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceAdministration>
</entry>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.2.5"/>
<code code="10210-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GENERAL STATUS"/>
<text><content ID="1.2.3.4">
Not a particularly severe reaction.
</content></text>
<entry>
<substanceAdministration classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text>Some sample text<reference value="#1.2.3.4"/></text>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceAdministration>
</entry>
</section>

0.063
testValidateImmunizationActivityDoseQuantityUnit

Constraint

Consol Immunization Activity doseQuantity, if present, SHOULD contain zero or one [0..1] @unit, which SHALL be selected from ValueSet UCUM Units of Measure (case sensitive) 2.16.840.1.113883.1.11.12839 DYNAMIC (CONF:8842)

OCL

not self.doseQuantity.oclIsUndefined() implies not self.doseQuantity.unit.oclIsUndefined()

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<doseQuantity/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<doseQuantity unit="test"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.034
testValidateImmunizationActivityInstructionInversion

Constraint

Consol Immunization Activity entryRelationship with target entry Instructions SHALL contain exactly one [1..1] @inversionInd="true" True (CONF:8858)

OCL

self.entryRelationship->select(er : cda::EntryRelationship | er.act.oclIsTypeOf(consol::Instructions))->forAll(ent : cda::EntryRelationship | ent.inversionInd=true)

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship>
<act/>
</entryRelationship>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship/>
</substanceadministration>

0.023
testValidateImmunizationActivityDrugVehicleTypeCode

Constraint

Consol Immunization Activity participant with target entry Drug Vehicle SHALL contain exactly one [1..1] @typeCode="CSM" (CodeSystem: HL7ParticipationType 2.16.840.1.113883.5.90) (CONF:8851)

OCL

self.participant->select(par : cda::Participant2 | par.participantRole.oclIsKindOf(consol::DrugVehicle))->forAll(p : cda::Participant2 | p.typeCode=vocab::ParticipationType::CSM)

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<participant>
<participantRole/>
</participant>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<participant typeCode="CSM">
<participantRole/>
</participant>
</substanceadministration>

0.016
testValidateImmunizationActivityPreconditionTypeCode

Constraint

Consol Immunization Activity Precondition for Substance Adminstration SHALL contain exactly one [1..1] @typeCode="PRCN" (CodeSystem: HL7ActRelationshipType 2.16.840.1.113883.5.1002) (CONF:8870)

OCL

self.precondition->select(par : cda::Precondition | par.oclIsKindOf(consol::PreconditionForSubstanceAdministration))->forAll(p : cda::Precondition | p.typeCode=vocab::ActRelationshipType::PRCN)

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<precondition typeCode="CAUS"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<precondition typeCode="PRCN"/>
</substanceadministration>

0.015
testValidateImmunizationActivityTemplateId

Constraint

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

OCL

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

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.011
testValidateImmunizationActivityClassCode

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] @classCode="SBADM" (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8826)

OCL

self.classCode=vocab::ActClass::SBADM

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="ACCM"/>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.007
testValidateImmunizationActivityMoodCode

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] @moodCode, where the @code SHALL be selected from ValueSet MoodCodeEvnInt 2.16.840.1.113883.11.20.9.18 STATIC 2011-04-03 (CONF:8827)

OCL

not self.moodCode.oclIsUndefined() and self.moodCode.oclIsKindOf(vocab::x_DocumentSubstanceMood) and let value : vocab::x_DocumentSubstanceMood = self.moodCode.oclAsType(vocab::x_DocumentSubstanceMood) in value = vocab::x_DocumentSubstanceMood::EVN or value = vocab::x_DocumentSubstanceMood::INT

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" moodCode="RQO"/>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" moodCode="EVN" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" moodCode="INT" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.045
testValidateImmunizationActivityId

Constraint

Consol Immunization Activity SHALL contain at least one [1..*] id (CONF:8829)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<id/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.035
testValidateImmunizationActivityCode

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] code (CONF:8830)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<code xsi:type="CE"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.032
testValidateImmunizationActivityStatusCode

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] statusCode (CONF:8833)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<statusCode code="completed"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.039
testValidateImmunizationActivityEffectiveTime

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] effectiveTime (CONF:8834)

OCL

(self.effectiveTime->isEmpty() or self.effectiveTime->exists(element | element.isNullFlavorUndefined())) implies (self.effectiveTime->size() = 1)

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<effectiveTime/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.040
testValidateImmunizationActivityRouteCode

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] routeCode, where the @code SHALL be selected from ValueSet Medication Route FDA Value Set 2.16.840.1.113883.3.88.12.3221.8.7 STATIC 1 (CONF:8839)

OCL

(self.routeCode.oclIsUndefined() or self.routeCode.isNullFlavorUndefined()) implies (not self.routeCode.oclIsUndefined() and self.routeCode.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.routeCode.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.3.26.1.1' and (value.code = 'C38192' or value.code = 'C38193' or value.code = 'C38194' or value.code = 'C38675' or value.code = 'C38197' or value.code = 'C38633' or value.code = 'C38205' or value.code = 'C38206' or value.code = 'C38208' or value.code = 'C38209' or value.code = 'C38210' or value.code = 'C38211' or value.code = 'C38212' or value.code = 'C38200' or value.code = 'C38215' or value.code = 'C38219' or value.code = 'C38220' or value.code = 'C38221' or value.code = 'C38222' or value.code = 'C38223' or value.code = 'C38224' or value.code = 'C38225' or value.code = 'C38226' or value.code = 'C38227' or value.code = 'C38228' or value.code = 'C38229' or value.code = 'C38230' or value.code = 'C38231' or value.code = 'C38232' or value.code = 'C38233' or value.code = 'C38234' or value.code = 'C38217' or value.code = 'C38218' or value.code = 'C38235' or value.code = 'C38238' or value.code = 'C38239' or value.code = 'C38240' or value.code = 'C38241' or value.code = 'C38242' or value.code = 'C38243' or value.code = 'C38245' or value.code = 'C38246' or value.code = 'C38247' or value.code = 'C38249' or value.code = 'C38250' or value.code = 'C38251' or value.code = 'C38252' or value.code = 'C38253' or value.code = 'C38254' or value.code = 'C28161' or value.code = 'C38255' or value.code = 'C38256' or value.code = 'C38257' or value.code = 'C38258' or value.code = 'C38259' or value.code = 'C38260' or value.code = 'C38261' or value.code = 'C38262' or value.code = 'C38263' or value.code = 'C38264' or value.code = 'C38265' or value.code = 'C38266' or value.code = 'C38267' or value.code = 'C38207' or value.code = 'C38268' or value.code = 'C38269' or value.code = 'C38270' or value.code = 'C38272' or value.code = 'C38273' or value.code = 'C38276' or value.code = 'C38277' or value.code = 'C38278' or value.code = 'C38280' or value.code = 'C38203' or value.code = 'C38281' or value.code = 'C38282' or value.code = 'C38284' or value.code = 'C38285' or value.code = 'C48623' or value.code = 'C38286' or value.code = 'C38287' or value.code = 'C38288' or value.code = 'C38289' or value.code = 'C38291' or value.code = 'C38676' or value.code = 'C38292' or value.code = 'C38677' or value.code = 'C38293' or value.code = 'C38294' or value.code = 'C38295' or value.code = 'C38216' or value.code = 'C38296' or value.code = 'C38198' or value.code = 'C38297' or value.code = 'C38298' or value.code = 'C38299' or value.code = 'C38300' or value.code = 'C38301' or value.code = 'C38304' or value.code = 'C38305' or value.code = 'C38283' or value.code = 'C38307' or value.code = 'C38308' or value.code = 'C38309' or value.code = 'C38312' or value.code = 'C38271'))

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode code="C38192" codeSystem="2.16.840.1.113883.3.26.1.1"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

1.409
testValidateImmunizationActivityRouteCodeP

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] routeCode, where the @code SHALL be selected from ValueSet Medication Route FDA Value Set 2.16.840.1.113883.3.88.12.3221.8.7 STATIC 1 (CONF:8839)

OCL

(self.routeCode.oclIsUndefined() or self.routeCode.isNullFlavorUndefined()) implies (not self.routeCode.oclIsUndefined())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode code="code" codeSystem="codeSystem"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.035
testValidateImmunizationActivityApproachSiteCode

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] approachSiteCode, where the @code SHALL be selected from ValueSet Body Site Value Set 2.16.840.1.113883.3.88.12.3221.8.9 STATIC 2 (CONF:8840)

OCL

(self.approachSiteCode->isEmpty() or self.approachSiteCode->exists(element | element.isNullFlavorUndefined())) implies (self.approachSiteCode->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.codeSystem = '2.16.840.1.113883.6.96' and not value.code.oclIsUndefined()))

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode code="code" codeSystem="2.16.840.1.113883.6.96" codeSystemName="codeSystemName" displayName="displayName"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.074
testValidateImmunizationActivityApproachSiteCodeP

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] approachSiteCode, where the @code SHALL be selected from ValueSet Body Site Value Set 2.16.840.1.113883.3.88.12.3221.8.9 STATIC 2 (CONF:8840)

OCL

(self.approachSiteCode->isEmpty() or self.approachSiteCode->exists(element | element.isNullFlavorUndefined())) implies (not self.approachSiteCode->isEmpty())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode code="code" codeSystem="2.16.840.1.113883.6.96" codeSystemName="codeSystemName" displayName="displayName"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.036
testValidateImmunizationActivityDoseQuantity

Constraint

Consol Immunization Activity SHOULD contain zero or one [0..1] doseQuantity (CONF:8841)

OCL

(self.doseQuantity.oclIsUndefined() or self.doseQuantity.isNullFlavorUndefined()) implies (not self.doseQuantity.oclIsUndefined())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<doseQuantity/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.042
testValidateImmunizationActivityNegationInd

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] @negationInd="false" (CONF:8985)

OCL

not self.negationInd.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.014
testValidateImmunizationActivityText

Constraint

Consol Immunization Activity SHOULD contain zero or one [0..1] text (CONF:8831)

OCL

(self.text.oclIsUndefined() or self.text.isNullFlavorUndefined()) implies (not self.text.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<text/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.034
testValidateImmunizationActivityRepeatNumber

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] repeatNumber (CONF:8838)

OCL

(self.repeatNumber.oclIsUndefined() or self.repeatNumber.isNullFlavorUndefined()) implies (not self.repeatNumber.oclIsUndefined())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<repeatNumber/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

0.039
testValidateImmunizationActivityAdministrationUnitCode

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] administrationUnitCode (CONF:8846), where the @code SHALL be selected from ValueSet Medication Product Form Value Set 2.16.840.1.113883.3.88.12.3221.8.11 STATIC 1

OCL

(self.administrationUnitCode.oclIsUndefined() or self.administrationUnitCode.isNullFlavorUndefined()) implies (not self.administrationUnitCode.oclIsUndefined() and self.administrationUnitCode.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.administrationUnitCode.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.3.26.1.1' and (value.code = 'C42887' or value.code = 'C42888' or value.code = 'C42960' or value.code = 'C42971' or value.code = 'C42889' or value.code = 'C42892' or value.code = 'C42890' or value.code = 'C43451' or value.code = 'C42891' or value.code = 'C25158' or value.code = 'C42895' or value.code = 'C42896' or value.code = 'C42917' or value.code = 'C42902' or value.code = 'C42904' or value.code = 'C42916' or value.code = 'C42928' or value.code = 'C42936' or value.code = 'C42954' or value.code = 'C45414' or value.code = 'C42678' or value.code = 'C60884' or value.code = 'C60891' or value.code = 'C42900' or value.code = 'C42919' or value.code = 'C28944' or value.code = 'C60897' or value.code = 'C42901' or value.code = 'C45415' or value.code = 'C47890' or value.code = 'C43525' or value.code = 'C42679' or value.code = 'C42763' or value.code = 'C17423' or value.code = 'C42912' or value.code = 'C42913' or value.code = 'C42915' or value.code = 'C42929' or value.code = 'C60926' or value.code = 'C42932' or value.code = 'C42920' or value.code = 'C42984' or value.code = 'C60927' or value.code = 'C60928' or value.code = 'C60929' or value.code = 'C42933' or value.code = 'C42934' or value.code = 'C42906' or value.code = 'C60930' or value.code = 'C48193' or value.code = 'C42937' or value.code = 'C45416' or value.code = 'C42938' or value.code = 'C42903' or value.code = 'C42909' or value.code = 'C42939' or value.code = 'C42940' or value.code = 'C42921' or value.code = 'C42941' or value.code = 'C42894' or value.code = 'C42978' or value.code = 'C42942' or value.code = 'C42944' or value.code = 'C60931' or value.code = 'C42946' or value.code = 'C42914' or value.code = 'C42950' or value.code = 'C42974' or value.code = 'C42976' or value.code = 'C42977' or value.code = 'C42959' or value.code = 'C42957' or value.code = 'C42958' or value.code = 'C42956' or value.code = 'C42945' or value.code = 'C42899' or value.code = 'C42995' or value.code = 'C42926' or value.code = 'C42951' or value.code = 'C42988' or value.code = 'C60933' or value.code = 'C42922' or value.code = 'C47915' or value.code = 'C42947' or value.code = 'C42948' or value.code = 'C47916' or value.code = 'C45413' or value.code = 'C42949' or value.code = 'C42952' or value.code = 'C42953' or value.code = 'C60934' or value.code = 'C29167' or value.code = 'C60957' or value.code = 'C60958' or value.code = 'C42955' or value.code = 'C29269' or value.code = 'C42965' or value.code = 'C42966' or value.code = 'C60984' or value.code = 'C47887' or value.code = 'C42967' or value.code = 'C42907' or value.code = 'C60985' or value.code = 'C42968' or value.code = 'C42923' or value.code = 'C42911' or value.code = 'C42969' or value.code = 'C42943' or value.code = 'C42918' or value.code = 'C25394' or value.code = 'C42970' or value.code = 'C47913' or value.code = 'C42972' or value.code = 'C42908' or value.code = 'C42973' or value.code = 'C42975' or value.code = 'C42961' or value.code = 'C60988' or value.code = 'C42979' or value.code = 'C42980' or value.code = 'C42981' or value.code = 'C42982' or value.code = 'C42983' or value.code = 'C42986' or value.code = 'C42898' or value.code = 'C42987' or value.code = 'C60994' or value.code = 'C42935' or value.code = 'C60992' or value.code = 'C47912' or value.code = 'C42989' or value.code = 'C42962' or value.code = 'C42990' or value.code = 'C42991' or value.code = 'C47914' or value.code = 'C42993' or value.code = 'C42924' or value.code = 'C42994' or value.code = 'C42925' or value.code = 'C60995' or value.code = 'C47889' or value.code = 'C47898' or value.code = 'C42996' or value.code = 'C42998' or value.code = 'C42893' or value.code = 'C42897' or value.code = 'C60997' or value.code = 'C42905' or value.code = 'C42997' or value.code = 'C42910' or value.code = 'C42927' or value.code = 'C42931' or value.code = 'C42930' or value.code = 'C61004' or value.code = 'C61005' or value.code = 'C42964' or value.code = 'C42963' or value.code = 'C42999' or value.code = 'C61006' or value.code = 'C42985' or value.code = 'C42992' or value.code = 'C47892' or value.code = 'C47897' or value.code = 'C43000' or value.code = 'C43001' or value.code = 'C43002' or value.code = 'C43003'))

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode code="C42887" codeSystem="2.16.840.1.113883.3.26.1.1"/>
</substanceadministration>

2.188
testValidateImmunizationActivityAdministrationUnitCodeP

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] administrationUnitCode (CONF:8846), where the @code SHALL be selected from ValueSet Medication Product Form Value Set 2.16.840.1.113883.3.88.12.3221.8.11 STATIC 1

OCL

(self.administrationUnitCode.oclIsUndefined() or self.administrationUnitCode.isNullFlavorUndefined()) implies (not self.administrationUnitCode.oclIsUndefined())

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode code="code" codeSystem="2.16.840.1.113883.3.26.1.1"/>
</substanceadministration>

0.035
testValidateImmunizationActivityDrugVehicle

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] participant (CONF:8850, CONF:8851, CONF:15547) Contains exactly one [1..1] Drug Vehicle (templateId: 2.16.840.1.113883.10.20.22.4.24)

OCL

self.participant->one(participant : cda::Participant2 | not participant.participantRole.oclIsUndefined() and participant.participantRole.oclIsKindOf(consol::DrugVehicle))

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<participant/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<participant>
<participantRole classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<code code="412307009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</participantRole>
</participant>
</substanceadministration>

0.026
testValidateImmunizationActivityIndication

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8853, CONF:8854, CONF:15537) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Indication (templateId: 2.16.840.1.113883.10.20.22.4.19)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::Indication) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.19"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</substanceadministration>

0.036
testValidateImmunizationActivityInstructions

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8856, CONF:8857, CONF:15538) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Instructions (templateId: 2.16.840.1.113883.10.20.22.4.20)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.act.oclIsUndefined() and entryRelationship.act.oclIsKindOf(consol::Instructions) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="SUBJ">
<act classCode="ACT" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.20"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</act>
</entryRelationship>
</substanceadministration>

0.037
testValidateImmunizationActivityMedicationDispense

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8863, CONF:8864, CONF:15540) Contains @typeCode="REFR" REFR, and Contains exactly one [1..1] Medication Dispense (templateId: 2.16.840.1.113883.10.20.22.4.18)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.supply.oclIsUndefined() and entryRelationship.supply.oclIsKindOf(consol::MedicationDispense) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="REFR">
<supply classCode="SPLY" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.18"/>
</supply>
</entryRelationship>
</substanceadministration>

0.037
testValidateImmunizationActivityReactionObservation

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8866, CONF:8867, CONF:15541) Contains @typeCode="CAUS" CAUS, and Contains exactly one [1..1] Reaction Observation (templateId: 2.16.840.1.113883.10.20.22.4.9)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::ReactionObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::CAUS)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="CAUS">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.9"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</substanceadministration>

0.036
testValidateImmunizationActivityPrecondition

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] precondition (CONF:8869, CONF:8870, CONF:15548) Contains exactly one [1..1] Precondition For Substance Administration (templateId: 2.16.840.1.113883.10.20.22.4.25)

OCL

self.precondition->one(precondition : cda::Precondition | not precondition.oclIsUndefined() and precondition.oclIsKindOf(consol::PreconditionForSubstanceAdministration))

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<precondition typeCode="PRCN"/>
</substanceadministration>

0.031
testValidateImmunizationActivityImmunizationRefusalReason

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8988, CONF:8989, CONF:15542) Contains @typeCode="RSON" RSON, and Contains exactly one [1..1] Immunization Refusal Reason (templateId: 2.16.840.1.113883.10.20.22.4.53)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::ImmunizationRefusalReason) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::RSON)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.53"/>
<code codeSystem="2.16.840.1.113883.5.8" codeSystemName="ActReason"/>
<statusCode code="completed"/>
</observation>
</entryRelationship>
</substanceadministration>

0.038
testValidateImmunizationActivityConsumable

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] consumable (CONF:8847)

OCL

self.consumable->one(consumable : cda::Consumable | not consumable.oclIsUndefined() and consumable.oclIsKindOf(cda::Consumable))

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<consumable/>
</substanceadministration>

0.025
testValidateImmunizationActivityPerformer

Constraint

Consol Immunization Activity SHOULD contain zero or one [0..1] performer (CONF:8849) Contains exactly one [1..1] CDA Performer2

OCL

self.performer->one(performer : cda::Performer2 | not performer.oclIsUndefined() and performer.oclIsKindOf(rim::Participation))

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<performer/>
</substanceadministration>

0.023
testValidateImmunizationActivityMedicationSupplyOrder

Constraint

Consol Immunization Activity MAY contain zero or one [0..1] entryRelationship (CONF:8860, CONF:8861, CONF:15539) Contains @typeCode="REFR" REFR, and Contains exactly one [1..1] Medication Supply Order (templateId: 2.16.840.1.113883.10.20.22.4.17)

OCL

self.entryRelationship->one(entryRelationship : cda::EntryRelationship | not entryRelationship.supply.oclIsUndefined() and entryRelationship.supply.oclIsKindOf(consol::MedicationSupplyOrder) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


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

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<entryRelationship typeCode="REFR">
<supply classCode="SPLY" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.17"/>
</supply>
</entryRelationship>
</substanceadministration>

0.038
testValidateImmunizationActivityConsumableImmunizationMedicationInformation

Constraint

Consol Immunization Activity SHALL contain exactly one [1..1] consumable (CONF:8847) consumable SHALL contain exactly one [1..1] manufacturedProduct, where its type is Immunization Medication Information (CONF:15546)

OCL

self.consumable->excluding(null)->reject(manufacturedProduct->one(manufacturedProduct : cda::ManufacturedProduct | not manufacturedProduct.oclIsUndefined() and manufacturedProduct.oclIsKindOf(consol::ImmunizationMedicationInformation)))

SuccessInvalid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<consumable/>
</substanceadministration>

Valid XML


<substanceadministration xmlns="urn:hl7-org:v3" classCode="SBADM" negationInd="false">
<templateId root="2.16.840.1.113883.10.20.22.4.52"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<administrationUnitCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<consumable>
<manufacturedProduct/>
</consumable>
</substanceadministration>

0.034
testGetDrugVehicle

Constraint

OCL

SuccessInvalid XML

Valid XML

0.037
testGetIndication

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetInstructions

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetMedicationDispense

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetReactionObservation

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetImmunizationRefusalReason

Constraint

OCL

SuccessInvalid XML

Valid XML

0.035
testGetMedicationSupplyOrder

Constraint

OCL

SuccessInvalid XML

Valid XML

0.036
Properties »