chore: merge the 99 duplicated conditions that had a clear home
Correcting the note this was tracked under: "114 tied conditions need a human call" counted duplicated *names*, not ties. 99 of them had a clear plurality and were merged; 15 are genuine even splits. Same script and same safety property as the earlier pass — every moved question gains a question_category_links row to the system folded away, so filtering by that system still finds it. 786 categories to 662, 124 rows removed. Checked after: 0 questions with no category at all, 0 links pointing at a deleted row, and Pneumonia's questions still reach Pulmonology and Allergy/Immunology. The remaining 15 are written up in docs/tied-conditions.md as a decision rather than left as a task: what each is tied between, and the note that the choice only sets where a condition lives, since the other systems survive as cross-links either way. Backend 242/242. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
This commit is contained in:
parent
5575fe39bb
commit
e89e9f6f70
2 changed files with 48 additions and 5 deletions
15
docs/TODO.md
15
docs/TODO.md
|
|
@ -252,11 +252,16 @@ Captured so nothing is lost while the article writing runs.
|
|||
- [x] **Cross-system duplicate conditions merged** — done 2026-09-10. 216 names
|
||||
folded to one home each (347 rows removed, 1075 → 786), keeping the other
|
||||
systems as `question_category_links` rather than duplicate rows.
|
||||
- [ ] **114 tied conditions need a human call** — an even split across systems
|
||||
has no evidence-based winner, so nothing was merged. Run
|
||||
`scripts/merge_duplicate_conditions.py` to list them; the largest are
|
||||
Pneumonia, Behavioral Disorder, Intestinal Obstruction, Acute Rheumatic
|
||||
Fever, Hypoxic-Ischemic Encephalopathy.
|
||||
- [x] **99 of the 114 duplicated conditions merged** — done 2026-09-11. The
|
||||
note above was wrong: 114 was the count of duplicated *names*, and 99 of
|
||||
them had a clear plurality. Merged with the same script and the same
|
||||
safety property as the earlier pass — each moved question keeps a
|
||||
`question_category_links` row to the system it came from, so no filter
|
||||
narrows. 786 categories to 662; 0 questions unfiled, 0 orphan links.
|
||||
- [ ] **15 genuine ties need a human call.** An even split has no
|
||||
evidence-based winner, so nothing was merged. Listed in
|
||||
`docs/tied-conditions.md`; pick a home for each and the merge is one
|
||||
command.
|
||||
- [x] **Primary categories pushed down** — done 2026-09-10. 1,244 questions
|
||||
promoted from system to condition; 2,730 → 1,486 filed at system level.
|
||||
The system stays as a cross-link so no filter narrows.
|
||||
|
|
|
|||
38
docs/tied-conditions.md
Normal file
38
docs/tied-conditions.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# The 15 conditions with no evidence-based home
|
||||
|
||||
Every other duplicated condition name had a clear plurality — one system held
|
||||
most of its questions — and 99 were merged into it, keeping a cross-link to the
|
||||
systems folded away so no filter narrows.
|
||||
|
||||
These fifteen are split evenly. There is no fact in the data that picks a
|
||||
winner, so nothing was merged: an arbitrary rule would be a decision disguised
|
||||
as a computation.
|
||||
|
||||
**How to decide:** pick the system a learner would look under first. The others
|
||||
are kept as cross-links either way, so the question still appears when filtering
|
||||
by them — the choice only sets where the condition *lives* in the tree.
|
||||
|
||||
| Condition | Questions | Tied between |
|
||||
|---|---|---|
|
||||
| Feeding Difficulty | 30 | Neonatology · Gastroenterology & Nutrition |
|
||||
| Breastfeeding Jaundice | 16 | Neonatology · Gastroenterology & Nutrition |
|
||||
| Chlamydial Infection | 16 | Ophthalmology · Infectious Disease · Neonatology |
|
||||
| Chorioamnionitis | 14 | Infectious Disease · Adolescent Medicine · Neonatology |
|
||||
| Duodenal Atresia | 8 | Gastroenterology & Nutrition · Neonatology |
|
||||
| Chemical Burn | 8 | Toxicology · Emergency Medicine |
|
||||
| Contact Dermatitis | 8 | Dermatology · Allergy/Immunology |
|
||||
| Respiratory Infection | 8 | Pulmonology · Infectious Disease |
|
||||
| Gastritis | 6 | Primary Care & Prevention · Gastroenterology & Nutrition |
|
||||
| Organophosphate Poisoning | 6 | Toxicology · Emergency Medicine |
|
||||
| Pesticide Toxicity | 6 | Toxicology · Emergency Medicine |
|
||||
| Orchitis | 6 | Nephrology & Urology · Infectious Disease |
|
||||
| Neuroblastoma | 6 | Hematology-Oncology · Gastroenterology & Nutrition |
|
||||
| Epididymitis | 6 | Nephrology & Urology · Infectious Disease |
|
||||
| Holoprosencephaly | 6 | Genetics & Metabolism · Neonatology |
|
||||
|
||||
Some of these look decidable to a clinician even though the counts are level —
|
||||
Organophosphate Poisoning and Pesticide Toxicity are the same call twice, and
|
||||
Orchitis and Epididymitis are a pair. Answer those together.
|
||||
|
||||
Once chosen, the merge is `scripts/merge_duplicate_conditions.py`, which keeps
|
||||
the row you name and folds the rest into it.
|
||||
Loading…
Reference in a new issue