Codes

Contact Info

  • [street:...]
  • [city:...]
  • [prov:...]
  • [pc:...]
  • [country:...]
  • [ph:...]
  • [cell:...]
  • [remove phone]
  • [rbp]
  • [partial]
    • If using street, city, etc. but only partial update required. Fills empty values with what’s already in the address file.

Note that street, city, etc. is only needed for non-Canadian addresses. Canadian addresses, within certain formatting specifications, will be picked up automatically.

Examples:

su.extract_address1("123 Sesame St, Toronto, ON  M2Z1J9")
('123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
su.extract_address1(
    "c/o Bob Roberts, 123 Sesame St, Toronto, ON                              M2Z   1J9"
)
('c/o Bob Roberts, 123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
su.extract_address1(
    "c/o Bob Roberts, 123 Sesame St,    Toronto   , on             m2z     1J9"
)
('c/o Bob Roberts, 123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')

Use commas to separate street, city, and province. Province should be abbreviated.

# error - missing comma
su.extract_address1("Green Grove, 123 Sesame St,Toronto    on             m2z     1J9")
2024-12-31 20:13:21.423 | WARNING  | srs_updates.core:extract_address1:441 - Check province - s/b abbreviated; input str: Green Grove, 123 Sesame St,Toronto    on             m2z     1J9
Check province
('Green Grove', '123 Sesame St', 'TO', 'M2Z 1J9', 'Canada')
su.extract_address1(
    "Green Grove, 123 Sesame St,Toronto,    on,             m2z     1J9"
)
('Green Grove, 123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
# error - province not abbreviated
su.extract_address1(
    "Green Grove, 123 Sesame St,Toronto,    Quebec,             m2z     1J9"
)
2024-12-31 20:13:21.456 | WARNING  | srs_updates.core:extract_address1:441 - Check province - s/b abbreviated; input str: Green Grove, 123 Sesame St,Toronto,    Quebec,             m2z     1J9
Check province
('Green Grove, 123 Sesame St', 'Toronto', 'QU', 'M2Z 1J9', 'Canada')

If there’s other text in front of the address, use // as a separator:

su.extract_address1(
    "some text here // Green Grove Retirement Community, 123 Sesame St,Toronto,    QC,             m2z     1J9"
)
('Green Grove Retirement Community, 123 Sesame St',
 'Toronto',
 'QC',
 'M2Z 1J9',
 'Canada')

Emails will also be picked up automatically.

Phone numbers, if formatted as xxx-xxx-xxxx will also be picked up. Use the [ph:...] code if the format is different (e.g., number has extension). Use [cell:...] to specify cell phone numbers, otherwise it will be picked up as a main/home phone number.

Deaths

  • [mdod:...] or [md:...] - member date of death
  • [dc] - member proof of death
  • [sdod:...] or [sd:...] - spouse date of death
  • [sdc] - spouse proof of death

Values passed into md/sd should preferably be formatted like 1-jan-2020 but any format parseable by the pandas.to_datetime function will work.

pd.to_datetime("01-jan-2020")
Timestamp('2020-01-01 00:00:00')
pd.to_datetime("1-jan-2020")
Timestamp('2020-01-01 00:00:00')
pd.to_datetime("Jan 1, 2020")
Timestamp('2020-01-01 00:00:00')
pd.to_datetime("Jan. 1, 2020")
Timestamp('2020-01-01 00:00:00')
pd.to_datetime("January 1, 2020")
Timestamp('2020-01-01 00:00:00')
pd.to_datetime("5/17/2020")
Timestamp('2020-05-17 00:00:00')

It’s best to avoid ambiguous formats like the one above. If there’s ambiguity, the default assumption is the month comes first:

pd.to_datetime("7/11/2020")
Timestamp('2020-07-11 00:00:00')

Names

  • [fn:...] / [ln:...] - member name
  • [sfn:...] / [sln:...] - spouse name

DOB

  • [mdob:<date>]
  • [sdob:<date>]
  • [poa] - - For member proof of age column
  • [spoa] - For spouse proof of age column

Banking

  • [bank:...]

Should be formatted as [bank:xxx-xxxxx-x...]. Simple validation is included to check length of institution/transit numbers.

Suspend

  • [sus] - suspend payments

Misc

  • [cls] - flag to close log if default behaviour is to re-assign
  • [excl] - indicates the update should be excluded from the maintenance file
  • [comment:...] - append to Comment column in address file
  • [rbp] - adds Returned Mail flag to internal database, sets mailing address to TELUS Health address in CIBC Mellon’s database
  • [ssin:...]
  • [lang:E] or [lang:F]
  • [mail] - flag that address update should be for the mailing address columns for PIN, not residential
  • [remove spouse] - clear out all spouse fields (name, DOB, etc.)