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

Constraint : cons_lux_id5

Constraint Name
cons_lux_id5 (type: ERROR, kind: )
Constraint Class
RecordTargetSpec
Package
luxh
Description
The second id of recordTarget/patientRole if present and not nullFlavored, shall have @root=1.3.182.4.3 and @extension representing the SSN (11-digits or 13-digits)
OCL
self.patientRole.oclIsUndefined() or 
self.patientRole.id->size()<2 or 
(not self.patientRole.id->at(2).nullFlavor.oclIsUndefined()) or 
(
	
	(not self.patientRole.id->at(2).root.oclIsUndefined()) and 
	self.patientRole.id->at(2).root='1.3.182.4.3' and
	(not self.patientRole.id->at(2).extension.oclIsUndefined()) and
	self.patientRole.id->at(2).matches(self.patientRole.id->at(2).extension, '\\d{11}|\\d{13}')
)