1. Ticket Details
| Field | Description |
|---|---|
| Ticket ID | AMM-2228 |
| Severity | Higher |
| Category | Bug |
| Affected Module / Feature | TM |
2. Issue Description
Doctor unable to search for a second diagnosis after adding the first one for a beneficiary.
3. Root Cause Analysis (RCA)
Technique Used: Log/Trace Review
The onDiagnosisInputKeyup() method in the diagnosis components was passing the .FormArray row index as the pageNo parameter to the SNOMED CT search API.
The API searchDiagnosisBasedOnPageNo(term, pageNo) expects a pagination page number, not a row identifier.
onDiagnosisInputKeyup(value: string, index: number) {
this.masterdataService
.searchDiagnosisBasedOnPageNo(value, index) // index used as pageNo
.subscribe((results) => {
this.suggestedDiagnosisList[index] = results?.data?.sctMaster;
});
}
Impact
- Affected all 4 diagnosis components: General OPD, PNC, NCD Care, NCD Screening
- Doctors could only add 1 diagnosis per beneficiary via inline search
- The dialog-based search (via Enter key/directive) was not affected as it manages pagination independently
4. Corrective Actions (Fixes for this instance)
| Action | Owner | Target Date | Status |
|---|---|---|---|
Changed all 4 components to always pass pageNo: 0 to fetch the first page of results // After fix The index continues to be used correctly for storing results per-row in Files Changed - general-opd-diagnosis.component.ts | Developer |
| Completed |
5. Preventive Actions (To prevent recurrence)
| Action | Owner | Target Date | Status |
|---|---|---|---|
6. Verification of Effectiveness
General OPD flow: Login as Doctor, open a beneficiary, add 1st diagnosis via search,
click "+" and search for a 2nd diagnosis — verify search results appear for both rowsMultiple rows: Add 3rd, 4th, 5th diagnosis in subsequent rows — verify all rows
return search results regardless of row positionPNC visit: Repeat multi-diagnosis search in PNC visit category — verify results
appear for all rowsNCD Care visit: Repeat multi-diagnosis search in NCD Care visit category — verify
results appear for all rowsNCD Screening visit: Repeat multi-diagnosis search in NCD Screening visit category —
verify results appear for all rowNo regression on 1st row: Verify the first diagnosis row still returns search results
as beforeSave and view: Save the case record with multiple diagnoses and reopen in view mode —
verify all added diagnoses are displayed correctlyAPI verification: Check DevTools → Network tab and confirm all search requests send
pageNo: 0 in the request payload, regardless of which row the search is triggered from
7. Lessons Learned
8. CAPA Review & Closure
| Reviewed By | Date | Remarks |
|---|---|---|