Files
doczyai-pipelines/src/constants/mappings/numeric_mappings.json
T
Siddhant Medar f412754167 Merged in feature/generic-parent-child (pull request #852)
Feature/generic parent child

* Refactor parent_child module with generic hierarchy lineage

- Add generic_hierarchy_lineage.py for core parent-child mapping
- Add generic_hierarchy_lineage_qc.py for QC validation engine
- Add bcbs_generic_hierarchy_lineage.py for BCBS-specific processing
- Add column_mapper.py for automatic column detection
- Rename parent_child_preprocessing.py to generic_hierarchy_lineage_preprocessing.py
- Remove old parent_child_mapping.py (replaced by generic_hierarchy_lineage.py)
- Fix import paths from src.generic_hierarchy_lineage to src.parent_child
- Replace hardcoded BCBS xwalk path with configurable parameter
- Remove global warning suppression

* Fix code review issues in parent_child module

- Fix import paths from src.generic_hierarchy_lineage to src.parent_child
- Replace hardcoded BCBS crosswalk path with configurable xwalk_path param
- Remove global warnings.filterwarnings('ignore') suppressions
- Change bare except clauses to except Exception with logging
- Add explicit client= CLI argument with backward compatible fallback
- Convert print statements to logging in bcbs_generic_hierarchy_lineage.py

* Add tests for parent_child module and fix JSON path resolution

- Add 55 unit tests covering grouping keys, parent identification,
  child ranking, and QC utilities
- Use pathlib to resolve JSON config paths relative to module location,
  allowing tests to run from any directory

* WIP: Refactor parent_child module structure

* Extract constants to centralized location for parent_child module

- Create src/constants/parent_child/ with generic.py and bcbs.py
- Update pipeline.py to use centralized constants (ASSIGNMENT_NO_PARENT, tier values, grouping key config)
- Update bcbsnc/mapping.py to use BCBS-specific constants
- Update imports in __main__.py and bcbsnc/__init__.py
- Pass client parameter from runner.py and saas/main.py

* Fix code formatting in parent_child module

* Merge remote-tracking branch 'origin/main' into feature/generic-parent-child

* Fix client detection and output path in parent_child module

* Fix typo in numeric_mappings.json filename and update logging

* Add type hints to parent_child module

* Merged main into feature/generic-parent-child


Approved-by: Katon Minhas
2026-01-28 20:18:11 +00:00

60 lines
1.3 KiB
JSON

{
"ordinal_regex_pattern": "\\b(?:first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh|twelfth|thirteenth|fourteenth|fifteenth|sixteenth|seventeenth|eighteenth|nineteenth|twentieth|twenty-first|twenty-second|twenty-third|twenty-fourth|twenty-fifth|\\d{1,2}(?:st|nd|rd|th))\\b",
"ordinal_word_to_number": {
"first": 1,
"second": 2,
"third": 3,
"fourth": 4,
"fifth": 5,
"sixth": 6,
"seventh": 7,
"eighth": 8,
"ninth": 9,
"tenth": 10,
"eleventh": 11,
"twelfth": 12,
"thirteenth": 13,
"fourteenth": 14,
"fifteenth": 15,
"sixteenth": 16,
"seventeenth": 17,
"eighteenth": 18,
"nineteenth": 19,
"twentieth": 20,
"twenty-first": 21,
"twenty-second": 22,
"twenty-third": 23,
"twenty-fourth": 24,
"twenty-fifth": 25
},
"cardinal_word_to_number": {
"one": 1,
"two": 2,
"three": 3,
"four": 4,
"five": 5,
"six": 6,
"seven": 7,
"eight": 8,
"nine": 9,
"ten": 10,
"eleven": 11,
"twelve": 12,
"thirteen": 13,
"fourteen": 14,
"fifteen": 15,
"sixteen": 16,
"seventeen": 17,
"eighteen": 18,
"nineteen": 19,
"twenty": 20,
"twenty one": 21,
"twenty two": 22,
"twenty three": 23,
"twenty four": 24,
"twenty five": 25
}
}