su.extract_address1("123 Sesame St, Toronto, ON M2Z1J9")('123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
[street:...][city:...][prov:...][pc:...][country:...][ph:...][cell:...][remove phone][rbp][partial]
Note that street, city, etc. is only needed for non-Canadian addresses. Canadian addresses, within certain formatting specifications, will be picked up automatically.
Examples:
('123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
('c/o Bob Roberts, 123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
('c/o Bob Roberts, 123 Sesame St', 'Toronto', 'ON', 'M2Z 1J9', 'Canada')
Use commas to separate street, city, and province. Province should be abbreviated.
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')
('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.
[mdod:...] or [md:...] - member date of death[dc] - member proof of death[sdod:...] or [sd:...] - spouse date of death[sdc] - spouse proof of deathValues passed into md/sd should preferably be formatted like 1-jan-2020 but any format parseable by the pandas.to_datetime function will work.
It’s best to avoid ambiguous formats like the one above. If there’s ambiguity, the default assumption is the month comes first:
[fn:...] / [ln:...] - member name[sfn:...] / [sln:...] - spouse name[mdob:<date>][sdob:<date>][poa] - - For member proof of age column[spoa] - For spouse proof of age column[bank:...]Should be formatted as [bank:xxx-xxxxx-x...]. Simple validation is included to check length of institution/transit numbers.
[sus] - suspend payments[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.)