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

Constraint : constraint_ITI45Response_add_patientroot_ihehl7v3002

Constraint Name
constraint_ITI45Response_add_patientroot_ihehl7v3002 (type: ERROR, kind: )
Constraint Class
ITI45ResponsePatientSpec
Package
ITI45Response
Description
When the Patient role is scoped by a Provider organization, only patient IDs assigned by the provider organization are allowed in the Patient class, the root element of the patient IDs shall match the root element of the provider organization ID.
OCL
(
	self.providerOrganization.oclIsUndefined()
	or self.providerOrganization.id->size() = 0
)
xor
self.id->forAll(ii: II |
	self.providerOrganization.id->exists(orgid: II |
		not (orgid.root.oclIsUndefined()) and
		orgid.root = ii.root
	)
)