Project

General

Profile

Actions

Bug #695

open
MN RH

Separate patients by department and condition (diabetes, thyroid, ANC, IVF)

Bug #695: Separate patients by department and condition (diabetes, thyroid, ANC, IVF)

Added by Medha N. 13 days ago. Updated 1 day ago.

Status:
Resolved
Priority:
High
Target version:
Start date:
10/30/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

Description

Patients of different departments, such as ANC and IVF, and conditions such as diabetes or thyroid, should be kept in separate lists. Example: when a diabetes camp or thyroid camp comes up, the doctor can call only those patients.

Summary
There’s no way to keep or pull patient lists segmented by department (e.g. ANC, IVF) or by condition/diagnosis (e.g. diabetes, thyroid), so staff can’t easily generate a call list for a condition-specific outreach event. Example from the reporter: when a diabetes camp or thyroid camp comes up, the doctor should be able to call only the patients with that condition, but there’s currently no filtered list that supports that.

Impact
Running a condition-specific outreach camp today would require someone to manually go through records to find every patient with a given diagnosis across departments, rather than pulling a filtered list in a few clicks. This is time-consuming and error-prone (easy to miss patients who should have been called), and becomes a recurring friction point every time the hospital runs one of these camps — the kind of thing a clinic would want to do regularly, not as a one-off.

Environment
Not tied to one specific screen — relevant modules are likely the Patients list and/or the condition/diagnosis data captured during Consultation (Problems, medical history, department of registration or visit).

Steps to Reproduce
This is a capability gap rather than a reproducible error, so there’s no fixed click-path that triggers it. Framed as a check instead:

Go to the Patients list (or search) and look for a way to filter or segment patients by department (e.g. ANC vs IVF) or by condition/diagnosis (e.g. diabetes, thyroid).
No such filter, tag, or saved-list capability is available today, per the reporter.

Expected vs Actual
Expected: the ability to filter or save a list of patients by department and/or by condition (diagnosis tag), so staff can generate, e.g., “all diabetic patients” or “all thyroid patients” as its own list, independent of visit history, for outreach purposes like camps.

Actual: no such segmentation exists; patients aren’t filterable this way today, per the reporter (not independently re-verified live this session, since browser access wasn’t available at write-up time).

Notes
Filed as an enhancement — this is a new capability request, not a defect in existing behavior.

Two different groupings are being asked for together and may need separate design treatment: (1) department-based segmentation (ANC vs IVF, etc.) — likely derivable from existing visit/registration department data already in the system; (2) condition-based segmentation (diabetes, thyroid) — depends on how diagnoses/conditions are currently captured. Recommend checking, during scoping, whether conditions are stored in a structured, filterable way (e.g. ICD-10 coded, as seen in the Add problem / Add medical history modals) or as free text, since free text would need to be addressed before a reliable “diabetes patient list” filter could work.

RH Updated by Roshni Harish. 11 days ago Actions #1

  • Description updated (diff)

RH Updated by Roshni Harish. 11 days ago Actions #2

  • Assignee set to Fiza M.

RH Updated by Roshni Harish. 11 days ago Actions #3

  • Assignee changed from Fiza M. to SK -

RH Updated by Roshni Harish. 10 days ago Actions #4

  • Priority changed from Normal to High

AM Updated by Arya M. 10 days ago Actions #5

  • Target version set to Sprint 1

S- Updated by SK - 4 days ago Actions #6

Triaged (2026-11-09), not resolved - partially open. Checked nuvita-analytics against origin/dev: a Cohort Builder already exists (CohortController.cs, CohortFilterParser.cs, CohortService.cs; spec clinq-docs/modules/analytics/specs/2026-07-18-s4-cohort-builder-design.md) that does NL-to-filter queries by diagnosis keyword, ward type, admission type, date range, LOS. But it is explicitly scoped as aggregate-only (no individual patient records/PII, DPDP constraint) and IPD-only (admissions/discharges) per its own design doc - it cannot produce a named, callable patient list for an OPD diabetes/thyroid/ANC camp, which is the actual ask here. No OPD/EMR patient-list-by-diagnosis or by-department filter exists.

Also flagged in the original report: conditions/diagnoses need to be checked for whether they're stored in a structured, filterable way (ICD-10 coded, as in Add problem/Add medical history) vs free text - free text would need addressing first. Not yet checked in this triage pass.

Parked per the user's call, alongside #137, #712, #713, #687, #654. Left assigned to SK, status unchanged.

S- Updated by SK - 1 day ago Actions #7

  • Status changed from New to Resolved
  • Resolved By set to SK -

Built an "Outreach Lists" page (OPD > Patient > Outreach Lists) - a call list of patients for a department- or condition-specific camp (e.g. "all diabetic patients", "all ANC patients").

Scope, as built:

  • Condition filter matches only coded Problems (EMR's ICD-10-backed list, via a new curated ConditionGroup master-data entity seeded with Diabetes/E10-E14 and Thyroid/E00-E07). Free-text medical-history entries are NOT searched - a stated limitation, not a bug. More condition groups can be added later with a data migration, no code change.
  • Department filter is "any visit ever" (OpdVisit history), not just the patient's most recent visit - a patient seen in both ANC and IVF appears under both.
  • Picking both filters combines them as AND (e.g. "diabetic ANC patients"). At least one filter is required.
  • Results show Name, Phone, MRN, with CSV export and print.

Commits on dev: nuvita-shared-kernel e35ce13 (published as Nuvita.SharedKernel 1.2.86), nuvita-emr 112ef36, nuvita-opd b9176527. Full backend+frontend suites green on all three (one known, pre-existing, unrelated failure left as-is: Nuvita.Opd.Tests.Triage.PediatricVitalRangesTests.Default_equals_Admin_PediatricReferenceDefaults references a nuvita-admin source file that does not exist on nuvita-admin's own dev branch - confirmed pre-existing before this branch touched anything, flagging for whoever owns that cross-repo check). Also fixed, as an unrelated drive-by needed to get the OPD suite compiling: three pre-existing OPD test files were constructing Billing's PaymentService with a stale IDocumentPrinter substitute where the real constructor now takes ILetterRenderer.

S- Updated by SK - 1 day ago Actions #8

  • Assignee changed from SK - to Roshni Harish.

Reassigning to Roshni for verification.

Actions

Also available in: PDF Atom