Extract the first valid 4-digit year from an EP procedure item.
Checks dateInitiated, then dateLastActivity, then the first 4 characters
of reference (e.g. "1972/0001(SYN)"), returning NaN when none found.
Parameters
obj: Record<string,unknown>
Procedure item as a plain record
Returns number
4-digit year number, or NaN if no valid year field exists
Extract the first valid 4-digit year from an EP procedure item. Checks
dateInitiated, thendateLastActivity, then the first 4 characters ofreference(e.g."1972/0001(SYN)"), returningNaNwhen none found.