Constraint Descriptor : constraint_pharmdis_DispenseItemEntry_entryRelationship_substanceAdministration (type: ERROR, kind: )

Constraint : constraint_pharmdis_DispenseItemEntry_entryRelationship_substanceAdministration

Constraint Name
constraint_pharmdis_DispenseItemEntry_entryRelationship_substanceAdministration (type: ERROR, kind: )
Constraint Class
DispenseItemEntry
Package
ihedis
Description
The reference to the Prescription Item by which this dispense was performed SHALL be present, and unique, containing a Prescription Item Entry described in the Pharmacy Prescription (PRE) Content Profile. The value for “entryRelationship/@typeCode” in a relationship between a dispense item entry and prescription item entry SHALL be “REFR” 2.16.840.1.113883.5.1002 ActRelationshipType STATIC. (IHE DIS, 6.3.4.5.3.9)
OCL
self.entryRelationship->select(enresh : POCDMT000040EntryRelationship | 
	not enresh.typeCode.oclIsUndefined() and 
	enresh.typeCode=XActRelationshipEntryRelationship::REFR and 
	(not enresh.substanceAdministration.oclIsUndefined()) and 
	enresh.substanceAdministration.templateId->exists(ii : II | not ii.root.oclIsUndefined() and 
		ii.root='1.3.6.1.4.1.19376.1.9.1.3.2'
	)
)->size()=1