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

Constraint : cons_lux_guard2

Constraint Name
cons_lux_guard2 (type: ERROR, kind: )
Constraint Class
RecordTargetSpec
Package
luxh
Description
If patient/guardian/code is present and has no nullFlavor, @code and @displayName values shall be from the value set eSanté_GuardianRole. @codeSystem shall have the constant value =�2.16.840.1.113883.5.111� and @codeSystemName shall have the constant value =�HL7:RoleCode�
OCL
self.patientRole.oclIsUndefined() or 
self.patientRole.patient.oclIsUndefined() or 
self.patientRole.patient.guardian->forAll(gar : POCDMT000040Guardian | 
	gar.code.oclIsUndefined() or  
	(not gar.code.nullFlavor.oclIsUndefined()) or  
	(gar.code.matchesValueSet('1.3.182.10.13.1', gar.code.code, gar.code.codeSystem, null, null) and
	(not gar.code.code.oclIsUndefined()) and 
		(not gar.code.codeSystem.oclIsUndefined()) and 
		gar.code.codeSystem='2.16.840.1.113883.5.111' and
		(not gar.code.codeSystemName.oclIsUndefined()) and 
		gar.code.codeSystemName='HL7:RoleCode' and
		(not gar.code.displayName.oclIsUndefined())
		)
)