HRMS to Innopac patron record conversion
HRMS data is supplied in a file containing one line per record (person).
The data is in a fixed format as follows [field name(field length)]:
hrs_id(9), dart_id (6), name (30), separation_date(8), hinman_box(4), local_phone(10), department(45), faculty_rank(2), home_address(32), home_city(25), home_zip_code(9), home_phone(10)
Faculty rank is a two-digit number which maps to the 3-digit 'ptype' field and the variable-length 'classific' field.
The department field maps to the 3-digit 'dept/affil (pcode3)' field.
Patron record expiration date is set to 2 years from 'today' (the day the file is processed.) or to their separation date, whichever is earlier.
Records with no faculty rank value get a default ptype of '004'.
Records whose department is not in the mapping table get a default pcode3 of '000'.
Valid dart_id's are looked up in the DND to get an email address for notices.
If there is a home address and no local address, copy the home address to the local address.
If there is a home telephone and no local telephone, copy the home telephone to the local telephone.
Set the home library to 'dart'.
Set the mblock to '-'.
Set the descript to '-'.
Set the stat_cat to 'f'.
Set the pmessage to ' ' (space).
If the ptype is '002' and the pcode3 is '060' (music faculty) change the ptype to '003'.
Records with no name are skipped.
Records whose separation date is earlier than today are skipped.
Records whose dart_id is empty or invalid are skipped.