1. Ticket Details


Ticket IDAMM-1887
SeverityHigh
CategoryBug
Affected Module / FeatureHWC-UI Nurse Module

2. Issue Description

User facing issue in the HWC application. After filling in all the details under the Nurse section, when user tries to submit, an error screen appears.


3. Root Cause Analysis (RCA)


4. Corrective Actions (Fixes for this instance)

Replace the second filter to operate on the filtered result:

this.vansList = vanServicepointDetails.filter((van: any) => {  
  if (van.vanSession === 3) {  
    return van;  
  }  
});
// Fix: Use this.vansList instead of vanServicepointDetails this.vansList = this.vansList.filter( (thing: any, i: any, arr: any) => arr.findIndex((t: any) => t.vanID === thing.vanID) === i, );

Apply the same fix to both ServiceComponent.filterVanList() and ServicePointComponent.filterVanList(). service.component.ts:104-116 service-point.component.ts:146-157



5. Preventive Actions (To prevent recurrence)

1. Code Review Checklist

2. Code Quality Standards

    const activeVans = vanServicepointDetails.filter(van => van.vanSession === 3);  
    const uniqueVans = activeVans.filter((van, i, arr) =>   
    arr.findIndex(t => t.vanID === van.vanID) === i);  
    this.vansList = uniqueVans;

4. Shared Utility Functions


6. Verification of Effectiveness


7. Lessons Learned

1. Filter Chain Pitfalls

2. Code Duplication Risks

3. Silent Failures


8. CAPA Review & Closure

Reviewed ByDateRemarks