diff --git a/care/facility/static_data/icd11.py b/care/facility/static_data/icd11.py index 9aaf193475..dc987eae43 100644 --- a/care/facility/static_data/icd11.py +++ b/care/facility/static_data/icd11.py @@ -15,7 +15,9 @@ def fetch_from_db(): "id": str(diagnosis["id"]), "label": diagnosis["label"], } - for diagnosis in ICD11Diagnosis.objects.all().values("id", "label") + for diagnosis in ICD11Diagnosis.objects.filter(is_leaf=True).values( + "id", "label" + ) ] return []