Repository navigation
feat(tables): add accent-free province columns to the clinic and patient static tables - #30
Open
TatianaTchouakam wants to merge 1 commit into
Open
TatianaTchouakam wants to merge 1 commit into
TatianaTchouakam wants to merge 1 commit into
Conversation
TatianaTchouakam
force-pushed
the
feat/clinic-province-ascii
branch
from
October 28, 2026 11:53
52b40b9 to
d163148
Compare
The official name keeps its spelling ("Takéo"); a new <column>_ascii
column holds it without accents ("Takeo"), for joins, filters and maps:
clinic_province_ascii in clinic_data_static and province_ascii in
patient_data_static. Shared helpers in src/a4d/tables/accents.py.
Tests in test_accents.py and test_patient.py.
TatianaTchouakam
force-pushed
the
feat/clinic-province-ascii
branch
from
October 28, 2026 11:55
d163148 to
a6de9c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket 2.
Accent-free province columns
Follow-up to the question on #21. The official province name keeps its spelling ("Takéo"); a second column holds the same name without accents ("Takeo"), case and spaces kept. The accent-free copy is safe for joins, filters and maps that may not handle accented characters.
clinic_data_staticclinic_provinceclinic_province_asciipatient_data_staticprovinceprovince_asciiExamples: "Takéo" → "Takeo", "Hà Nội" → "Ha Noi", "Đà Nẵng" → "Da Nang", "Bangkok" → "Bangkok".
Changes
src/a4d/tables/accents.py(new), shared by both tables:fold_accents: NFKD normalisation, then combining marks removed; "đ"/"Đ" mapped by hand (they are letters of their own in Unicode, not "d" with an accent).add_ascii_columns(df, columns): adds<column>_asciifor each listed column present in the frame.src/a4d/tables/clinic.py:clinic_province_asciiadded right after the forward fill, so every row already has its province. Columns listed in_ASCII_COLUMNS, so other name columns can be added later.src/a4d/tables/patient.py:province_asciiadded topatient_data_static, after the one-row-per-patient grouping.tests/test_tables/test_accents.py(new): 3 tests for the shared functions.tests/test_tables/test_patient.py: 1 test, the static table keepsprovinceand addsprovince_ascii.Checks
ruff format,ruff check: clean.pytest: 1,405 passed, 66 skipped.clinic_data.xlsx(59 rows):clinic_province_asciiis present. No province in the clinic master data has an accent today, so both clinic columns are identical for now. The accented names appear in the patient table, whereprovinceholds the canonical names fromallowed_provinces.yaml.