Constraint Descriptor : constraint_pharmpadv_PharmaceuticalAdviceItemEntry_entryRelationship_act (type: WARNING, kind: )

Constraint : constraint_pharmpadv_PharmaceuticalAdviceItemEntry_entryRelationship_act

Constraint Name
constraint_pharmpadv_PharmaceuticalAdviceItemEntry_entryRelationship_act (type: WARNING, kind: )
Package
ihepadv
Description
Optional one or more Pharmaceutical Advice Concern entries (representing ICAs to other prescription or Dispense Items) SHOULD be present in case of validation issues with the objective Prescription Item. They SHALL conform to the Pharmaceutical Advice Concern Entry Content Module template (1.3.6.1.4.1.19376.1.9.1.3.5). The value for “entryRelationship/@typeCode” in a relationship between a pharmaceutical advice item entry and pharmaceutical advice concern entry SHALL be “REFR” 2.16.840.1.113883.5.1002 ActRelationshipType STATIC. The value for “entryRelationship/@inversionInd” in a relationship between a pharmaceutical advice item entry and pharmaceutical advice concern entry SHALL be “false”. (IHE PADV, 6.3.4.3.3.9)
OCL
self.entryRelationship->select(enresh : POCDMT000040EntryRelationship | 
	(not enresh.act.oclIsUndefined()) and 
	enresh.act.templateId->exists(ii : II | not ii.root.oclIsUndefined() and 
		ii.root='1.3.6.1.4.1.19376.1.9.1.3.5'
	)
)->forAll(enresh : POCDMT000040EntryRelationship | 
	not enresh.typeCode.oclIsUndefined() and 
	enresh.typeCode=XActRelationshipEntryRelationship::REFR and 
	(not enresh.inversionInd.oclIsUndefined()) and 
	enresh.inversionInd=false
)