Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
994675c
feat(tracking): added tracking on Visit Details and added tracking se…
Jul 5, 2025
d3694fa
feat(tracking): added tracking in visit details
Jul 5, 2025
c23aa21
feat(tracking): added tracking in Past Illness
Jul 5, 2025
20e7606
feat(tracking): added tracking in comorbidity
Jul 5, 2025
da29107
feat(tracking): added tracking to Medication history
Jul 5, 2025
e8668e3
feat: added tracking to previous history button
Jul 5, 2025
7a56ed2
feat(tracking): added tracking in personal history
Jul 5, 2025
18054b6
feat(tracking): added tracking to family history
Jul 5, 2025
347742a
feat(tracking): added tracking to menstrual history
Jul 5, 2025
976abbd
feat(tracking): added tracking to past obsteric history
Jul 5, 2025
e2b55a8
feat(tracking): added tracking to vitals component
Jul 5, 2025
574fb6b
feat(tracking): added tracking to examination component
Jul 5, 2025
875ae43
feat(tracking): completed exmaination tracking
Jul 5, 2025
2869937
Merge branch 'develop' of github.com:abhijeetw035/HWC-UI into develop
Jul 6, 2025
6df003c
fix(bug): fixed family history component
Jul 6, 2025
f8430ac
feat(tracking): added tracking to previous significant findings
Jul 6, 2025
de118bf
feat(tracking): added tracking to previous visit details component
Jul 6, 2025
6a9be15
feat(tracking): added tracking to findings and diagnosis component
Jul 6, 2025
ab8ca49
feat(tracking): added tracking to investigations component
Jul 6, 2025
4c5c835
feat(tracking): added tracking to prescription
Jul 6, 2025
41045f6
feat(tracking): added tracking to general-refer component
Jul 6, 2025
1725878
fix(tracking): fixed correct naming of tracking component
Jul 6, 2025
d22c9fd
feat(tracking): updated environment files for tracking (added trackin…
Jul 9, 2025
101baf4
fix: corrected domain name
Jul 9, 2025
8a507c7
perf(tracking): remove error handeling from ts files and Added at ser…
Jul 9, 2025
f21b90f
fix: aam-1725 provisional diagnosis rendering issue fix and performan…
5Amogh Jul 17, 2025
f0e5735
fix: amm-1724 removed commented code
5Amogh Jul 17, 2025
0ab27a9
fix(tracking): added https in the tracking url
Jul 20, 2025
0ef04e1
Update version in pom.xml to 3.4.0
5Amogh Jul 21, 2025
a93f88c
Merge pull request #160 from PSMRI/amogh-3.2.0
5Amogh Jul 21, 2025
1991848
Update pom.xml
5Amogh Jul 21, 2025
50bb9b4
Merge pull request #151 from abhijeetw035/matomo-tracking
drtechie Jul 21, 2025
d21a390
fix: amm-1725 provisonal diagnosis in quick consult issue fix
5Amogh Jul 25, 2025
b9cc53e
Merge pull request #161 from PSMRI/amogh-3.2.0
5Amogh Jul 25, 2025
6b06aa2
Display HRP-marked Beneficiaries in Red for Easy Identification (#162)
helenKaryamsetty Jul 25, 2025
4646fc3
fix: amm-1668 beneficiary details addition
5Amogh Jul 30, 2025
dd97cc7
Merge pull request #163 from PSMRI/amogh-3.2.0
5Amogh Jul 31, 2025
9de5103
fix: amm-1572 added data not found value for languages
snehar-nd Aug 13, 2025
cc4b171
fix: amm-1572 added data not found value for languages (#169)
snehar-nd Aug 19, 2025
54ddd77
fix: added common-ui to hwc-ui
snehar-nd Aug 19, 2025
df6a1c0
Sn/dev/3.5.0 (#171)
snehar-nd Aug 20, 2025
a391775
fix: changed version to 3.4.0
snehar-nd Aug 20, 2025
0cd124b
Sn/dev/3.5.0 (#172)
snehar-nd Aug 20, 2025
1f94f37
version 3.4.0 (#173)
snehar-nd Aug 20, 2025
1460199
fix: changed version to 3.4.0
snehar-nd Aug 20, 2025
84fcd53
fix: reverted maven-war-plugin version
snehar-nd Aug 20, 2025
2285878
fix: aam-1725 provisional diagnosis rendering issue fix and performan…
helenKaryamsetty Aug 22, 2025
2377949
fix: aam-1725 provisional diagnosis rendering issue fix and performan…
helenKaryamsetty Aug 22, 2025
222de3b
fix(feat): highRisk flw patients display in red colorfor doctor workl…
helenKaryamsetty Aug 22, 2025
d0118b9
common ui commit to release-3.5.0 (#178)
helenKaryamsetty Aug 25, 2025
11c0a9f
Revert "Display HRP-marked Beneficiaries in Red for Easy Identificati…
helenKaryamsetty Aug 26, 2025
72d328f
fix: aam-1725 provisional diagnosis rendering issue fix and performan…
helenKaryamsetty Aug 26, 2025
dec1fd2
feat(tracking): added userID tracking after login success (#165)
abhijeetw035 Aug 28, 2025
a10bcca
feat: amm-1830 infinite scroll for provisional diagnosis
5Amogh Sep 3, 2025
24181ab
Merge branch 'release-3.5.0' of https://github.com/PSMRI/HWC-UI into …
5Amogh Sep 3, 2025
22103aa
Merge pull request #182 from PSMRI/AMM-1830
5Amogh Sep 4, 2025
eedbf98
feat: amm56-1337 work in progress for feedback module
5Amogh Sep 4, 2025
52e97b8
fix: deployment issue fix
5Amogh Sep 5, 2025
18200f2
Merge pull request #183 from PSMRI/AMM-1830
5Amogh Sep 5, 2025
f9c285f
fix: amm-1478 fixed Preview casessheet problem in previous history
snehar-nd Sep 5, 2025
3a3a576
fix: amm-1478 fixed Preview casessheet problem in previous history (#…
snehar-nd Sep 5, 2025
a9b3354
fix: amm-1785 doctor signature in casesheet
snehar-nd Sep 5, 2025
18575ef
Merge pull request #190 from PSMRI/sn/3.4.1
snehar-nd Sep 9, 2025
09f0244
fix: update pom.xml
snehar-nd Sep 9, 2025
b87f2b6
Merge pull request #191 from PSMRI/sn/3.4.1
snehar-nd Sep 9, 2025
e68be94
feat: amm-1337 work in progress for feedback module
5Amogh Sep 9, 2025
931e06c
feat: amm-1337 feedback module integration
5Amogh Sep 10, 2025
a61272e
Merge branch 'release-3.5.0' of https://github.com/PSMRI/HWC-UI into …
5Amogh Sep 10, 2025
1bb920c
feat: amm-1337 feedback module translation addition
5Amogh Sep 11, 2025
70f11ab
feat: amm-1337 common-ui ref update
5Amogh Sep 11, 2025
4fa9cea
Merge pull request #192 from PSMRI/AMM-1337
5Amogh Sep 11, 2025
06f8936
Update pom.xml
5Amogh Sep 25, 2025
d5a4229
Update pom.xml
5Amogh Sep 25, 2025
bf0282a
Update pom.xml
5Amogh Sep 25, 2025
2c335de
fix: 1857 1859 Signature in casesheet enhancement
snehar-nd Sep 30, 2025
f266cc6
Merge pull request #199 from PSMRI/sn/3.5.1
5Amogh Sep 30, 2025
00604de
fix: userid was 0, fixed the issue for signature
snehar-nd Sep 30, 2025
41e6c68
Merge pull request #200 from PSMRI/sn/3.5.1
snehar-nd Sep 30, 2025
67688b8
fix: provisional diagnosis issue^C
snehar-nd Oct 9, 2025
60a068e
Merge pull request #203 from PSMRI/sn/3.5.1
snehar-nd Oct 10, 2025
e2d9221
Update pom.xml
snehar-nd Oct 13, 2025
e8bced6
fix: aam 1895 reports tabular fix
snehar-nd Oct 13, 2025
9e2c073
Update pom.xml
snehar-nd Oct 13, 2025
7b9e64d
Merge pull request #207 from PSMRI/sn/3.5.1
snehar-nd Oct 15, 2025
e1e48f9
fix: amm-1572 pushing the commonui code to hwcui
snehar-nd Nov 12, 2025
34eceeb
Merge pull request #213 from PSMRI/sn/dev/3.5.0
snehar-nd Nov 12, 2025
f2ca9c9
fix: updated the maven-antrun-plugin version
snehar-nd Nov 17, 2025
ff531bd
Merge pull request #215 from PSMRI/sn/dev/3.5.0
snehar-nd Nov 17, 2025
32c0937
Merge branch 'release-3.6.0' into release-3.4.0
5Amogh Dec 3, 2025
41c7439
Merge pull request #220 from PSMRI/release-3.4.0
5Amogh Dec 3, 2025
d5025ba
Merge pull request #221 from PSMRI/release-3.4.1
5Amogh Dec 3, 2025
f79452e
Merge branch 'release-3.6.0' into release-3.5.0
5Amogh Dec 3, 2025
fdfb9e3
Merge pull request #222 from PSMRI/release-3.5.0
5Amogh Dec 3, 2025
5dffc48
fix: git-conflict updated common-ui reference
5Amogh Dec 3, 2025
77529d0
fix: git-conflict updated common-ui reference
5Amogh Dec 3, 2025
35d3605
Merge branch 'release-3.6.0' into release-3.8.0
5Amogh Dec 3, 2025
7dbfe2f
Merge pull request #223 from PSMRI/release-3.8.0
5Amogh Dec 3, 2025
58cb284
feat: amm-1959 enabling cho reports btn
5Amogh Dec 8, 2025
7fd6aac
fix: amm-1931 handling session expiry
snehar-nd Dec 8, 2025
529179d
fix: amm-1931 handled language for error messages
snehar-nd Dec 8, 2025
e8b2429
Merge pull request #224 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
76c27d9
fix: added missing env
5Amogh Dec 9, 2025
fb2597d
feat: amm-1959 added missing url in ci script for env
5Amogh Dec 9, 2025
bf49b8b
Merge pull request #226 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
3148aed
feat: amm-1959 cii template fix
5Amogh Dec 9, 2025
6a148d8
Merge pull request #227 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
21fa316
feat: amm-1959 ci template fix
5Amogh Dec 9, 2025
5b4a193
Merge pull request #228 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
cb5e417
feat: amm-1959 ci template fix
5Amogh Dec 9, 2025
2797b73
Merge pull request #229 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
297129a
feat: amm-1959 lang issue fix
5Amogh Dec 9, 2025
931457d
feat: amm-1959 style issue fix
5Amogh Dec 9, 2025
3088f89
Merge pull request #230 from PSMRI/AMM-1959
5Amogh Dec 9, 2025
e464f3e
Merge pull request #225 from PSMRI/sn/dev/3.5.0
snehar-nd Dec 9, 2025
46038e4
Merge branch 'release-3.6.0' of github.com:PSMRI/HWC-UI into release-…
5Amogh Dec 10, 2025
b5474a9
fix: amm-2001 close btn addition
5Amogh Dec 10, 2025
ec4d690
Merge pull request #231 from PSMRI/amm-2001
snehar-nd Dec 10, 2025
73fddbf
fix: amm-1931 handled error messages
snehar-nd Dec 11, 2025
44c5d9c
fix: amm-1931 handled empty error messgaes
snehar-nd Dec 11, 2025
bc2878a
fix: amm-1931 clearing the session
snehar-nd Dec 11, 2025
ae58732
fix: amm-1931 navigating to login page on expiry
snehar-nd Dec 12, 2025
bf728d1
Merge pull request #232 from PSMRI/sn/1931
snehar-nd Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common-UI
Submodule Common-UI updated 34 files
+307 −0 matomo-documentation.md
+220 −0 matomo-local-setup.md
+ src/assets/images/tracking-high-level-diagram.png
+37 −0 src/feedback/feedback-routing.module.ts
+48 −0 src/feedback/feedback.module.ts
+72 −0 src/feedback/pages/feedback-public-page/feedback-public-page-component.ts
+63 −0 src/feedback/services/feedback.service.ts
+135 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.html
+72 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.scss
+185 −0 src/feedback/shared/feedback-dialog/feedback-dialog.component.ts
+1 −0 src/public-api.ts
+1 −1 ...egistrar/abha-components/abha-generation-success-component/abha-generation-success-component.component.html
+1 −1 src/registrar/abha-components/abha-verify-success-component/abha-verify-success-component.component.html
+1 −1 src/registrar/abha-components/download-search-abha/download-search-abha.component.html
+1 −1 src/registrar/abha-components/download-search-abha/download-search-abha.component.ts
+1 −1 src/registrar/abha-components/generate-abha-component/generate-abha-component.component.ts
+2 −2 src/registrar/abha-components/health-id-display-modal/health-id-display-modal.component.html
+4 −3 src/registrar/registration/abha-information/abha-information.component.html
+10 −2 src/registrar/registration/abha-information/abha-information.component.ts
+21 −18 src/registrar/registration/location-information/location-information.component.html
+44 −17 src/registrar/registration/location-information/location-information.component.ts
+6 −1 src/registrar/registration/personal-information/personal-information.component.html
+12 −20 src/registrar/registration/personal-information/personal-information.component.ts
+3 −2 src/registrar/registration/registration.component.ts
+94 −120 src/registrar/search-dialog/search-dialog.component.html
+154 −33 src/registrar/search-dialog/search-dialog.component.ts
+2 −2 src/registrar/search/search.component.ts
+6 −0 src/tracking/index.ts
+110 −0 src/tracking/lib/amrit-tracking.service.ts
+192 −0 src/tracking/lib/ga-tracking.service.ts
+150 −0 src/tracking/lib/matomo-tracking.service.ts
+11 −0 src/tracking/lib/tracking-provider.ts
+36 −0 src/tracking/lib/tracking.module.ts
+25 −0 src/tracking/lib/tracking.tokens.ts
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.aam-ui</groupId>
<artifactId>aam-ui</artifactId>
<version>3.1.0</version>
<version>3.6.0</version>
<name>AAM-UI</name>
<description>Piramal - AAM: Module ui</description>
<packaging>war</packaging>
Expand Down
6 changes: 6 additions & 0 deletions scripts/ci-prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ const defaultEnvValues = {
SITE_KEY: '',
CAPTCHA_CHALLENGE_URL: '',
ENABLE_CAPTCHA: false,
SITE_ID: '1',
TRACKER_URL: 'https://matomo.piramalswasthya.org/',
TRACKING_PLATFORM: 'matomo',
TRACKING_ENABLED: 'true',
ENABLE_CHO_REPORT_BUTTON: true,
DHIS_URL:'',
};

// Generate output data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<footer class="footer container-fluid">
<div class="row">
<div class="col-4 text-left">
<div class="col-3 text-left">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Initial exploration: check repo structure and locate key files

# List the repository structure
echo "=== Repository structure ==="
git ls-files | head -30

echo -e "\n=== Looking for routing files ==="
fd -e ts -e js | grep -i route | head -20

echo -e "\n=== Looking for translation files ==="
fd -e json | grep -i "lang\|i18n\|translation" | head -20

Repository: PSMRI/HWC-UI

Length of output: 1011


🏁 Script executed:

#!/bin/bash
# Description: Verify feedback route exists and language key is defined

echo "=== Checking for feedback route in routing modules ==="
rg -n "path.*['\"]feedback['\"]" --type=ts

echo -e "\n=== Checking for platform_feedback language key ==="
rg -n "platform_feedback" --type=json -g "*.json"

Repository: PSMRI/HWC-UI

Length of output: 381


🏁 Script executed:

#!/bin/bash
# Check the footer component to see the actual changes
echo "=== Content of app-footer.component.html ==="
cat -n "src/app/app-modules/core/components/app-footer/app-footer.component.html"

Repository: PSMRI/HWC-UI

Length of output: 2827


🏁 Script executed:

#!/bin/bash
# Find all language JSON files and check for platform_feedback key

echo "=== All language JSON files ==="
fd -e json | grep -i "lang\|\.json$" | sort

echo -e "\n=== Checking all JSON files for platform_feedback ==="
for file in src/assets/*.json; do
  if [ -f "$file" ]; then
    count=$(grep -c "platform_feedback" "$file" 2>/dev/null || echo "0")
    echo "$file: platform_feedback found = $count"
  fi
done

echo -e "\n=== Sample structure from English.json ==="
rg -A 3 '"platform_feedback"' "src/assets/English.json"

Repository: PSMRI/HWC-UI

Length of output: 1010


🏁 Script executed:

#!/bin/bash
# Verify the routing module contains the feedback route configuration

echo "=== Feedback route configuration in routing module ==="
rg -B 2 -A 5 'path.*feedback' src/app/app-routing.module.ts

Repository: PSMRI/HWC-UI

Length of output: 273


Add missing platform_feedback translation to Kannada.json.

The footer feedback link has been successfully configured with the correct route, query parameter, and language keys—except that src/assets/Kannada.json is missing the platform_feedback object entirely. English, Hindi, and Assamese translation files all contain it, but Kannada users will fall back to the hardcoded "Feedback" string. Add the missing translation key to Kannada.json to maintain consistency across all supported languages.

🤖 Prompt for AI Agents
In @src/app/app-modules/core/components/app-footer/app-footer.component.html at
line 3, Add the missing "platform_feedback" translation object into Kannada.json
so the footer feedback link uses localized text; replicate the same keys used in
other locale files (e.g., "title" and any subkeys used for the feedback link)
under the "platform_feedback" key in Kannada.json with appropriate Kannada
strings so it matches English/Hindi/Assamese structure.

<span
class="footer-text"
*ngIf="currentLanguageSet === null || currentLanguageSet === undefined"
Expand All @@ -12,7 +12,7 @@
>{{ currentLanguageSet?.coreComponents?.poweredByWipro }}</span
>
</div>
<div class="col-4 text-center">
<div class="col-3 text-center">
<p
class="footer-text"
*ngIf="currentLanguageSet === null || currentLanguageSet === undefined"
Expand All @@ -28,7 +28,21 @@
{{version }}
</p>
</div>
<div class="col-4 text-end">
<div
class="col-3 text-end"
style="cursor: pointer"
[routerLink]="['/feedback']"
[queryParams]="{ sl: 'AAM' }"
role="link"
>
<mat-icon style="vertical-align: top; font-size: medium; margin-right: 2%"
>mail</mat-icon
>
<span class="footer-text"
>{{ currentLanguageSet?.platform_feedback?.feedback ?? "Feedback" }}
</span>
</div>
<div class="col-3 text-end">
<p class="footer-text">
<span
class="footer-text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
[routerLink]="[item.work[1].link]"
routerLinkActive="active"
[ngClass]="{ active: updateCSSToShowActiveRegistrar }"
(click)="trackFieldInteraction('Role_Registrar')"
>
{{ item.work[1].label }}
</button>
Expand All @@ -195,12 +196,18 @@
mat-button
[routerLink]="[item.link]"
routerLinkActive="active"
(click)="trackFieldInteraction('Role_' + item.role)"
>
{{ item.label }}
</button>
</li>
<li class="nav-item" *ngIf="item.role === 'TC Specialist'">
<button class="nav-btn" mat-button [matMenuTriggerFor]="TCitems">
<button
class="nav-btn"
mat-button
[matMenuTriggerFor]="TCitems"
(click)="trackFieldInteraction('Role_TC Specialist')"
>
{{ item.label }}
<span class="caret"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { IotService } from '../../services/iot.service';
import { MatDialog } from '@angular/material/dialog';
import { environment } from 'src/environments/environment';
import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service';
import { AmritTrackingService } from 'Common-UI/src/tracking';

@Component({
selector: 'app-header',
Expand Down Expand Up @@ -74,6 +75,7 @@ export class AppHeaderComponent implements OnInit, AfterContentChecked {
private dialog: MatDialog,
public service: IotService,
readonly sessionstorage: SessionStorageService,
private trackingService: AmritTrackingService,
) {}

ngOnInit() {
Expand Down Expand Up @@ -260,13 +262,15 @@ export class AppHeaderComponent implements OnInit, AfterContentChecked {

logout() {
this.auth.logout().subscribe((res) => {
this.router.navigate(['/login']).then((result) => {
if (result) {
this.changeLanguage('English');
this.sessionstorage.clear();
sessionStorage.clear();
}
});
this.router
.navigate(['/feedback'], { queryParams: { sl: 'HWC' } })
.then((result) => {
if (result) {
this.changeLanguage('English');
this.sessionstorage.clear();
sessionStorage.clear();
}
});
});
}
getSwymedLogout() {
Expand Down Expand Up @@ -330,4 +334,8 @@ export class AppHeaderComponent implements OnInit, AfterContentChecked {
width: '600px',
});
}

trackFieldInteraction(fieldName: string) {
this.trackingService.trackFieldInteraction(fieldName, 'Roles');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,36 @@
<tr style="color: #595959; font-size: 14px">
<td>{{ beneficiary?.benName }}</td>
</tr>
<ng-container *ngIf="beneficiary?.fatherName">
<tr style="font-size: 14px; color: #000000">
<th id="fatherName">
{{ current_language_set?.bendetails?.fatherName }}:
</th>
</tr>
<tr style="color: #595959; font-size: 14px">
<td>{{ beneficiary?.fatherName }}</td>
</tr>
</ng-container>
<ng-container *ngIf="beneficiary?.lastName">
<tr style="font-size: 14px; color: #000000">
<th id="lastName">
{{ current_language_set?.bendetails?.lastName }}:
</th>
</tr>
<tr style="color: #595959; font-size: 14px">
<td>{{ beneficiary?.lastName }}</td>
</tr>
</ng-container>
<ng-container *ngIf="beneficiary?.preferredPhoneNum">
<tr style="font-size: 14px; color: #000000">
<th id="phoneNo">
{{ current_language_set?.bendetails?.phoneNo }}:
</th>
</tr>
<tr style="color: #595959; font-size: 14px">
<td>{{ beneficiary?.preferredPhoneNum }}</td>
</tr>
</ng-container>
Comment on lines +23 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inconsistent field display between flow status blocks.

These three new fields (fatherName, lastName, preferredPhoneNum) are only displayed when benFlowStatus is true (lines 23-52), but are missing from the second table block when benFlowStatus is false (lines 131-231). This creates an inconsistent user experience where different information is shown based on the flow status.

🔎 Verify and align the second block

Add the same three conditional sections to the second table block (after line 151) to ensure consistent display of beneficiary information regardless of flow status:

       <tr style="color: #595959; font-size: 14px">
         <td>{{ beneficiaryName | titlecase }}</td>
       </tr>
+      <ng-container *ngIf="beneficiary?.fatherName">
+        <tr style="font-size: 14px; color: #000000">
+          <th id="fatherName">
+            {{ current_language_set?.bendetails?.fatherName }}:
+          </th>
+        </tr>
+        <tr style="color: #595959; font-size: 14px">
+          <td>{{ beneficiary?.fatherName }}</td>
+        </tr>
+      </ng-container>
+      <ng-container *ngIf="beneficiary?.lastName">
+        <tr style="font-size: 14px; color: #000000">
+          <th id="lastName">
+            {{ current_language_set?.bendetails?.lastName }}:
+          </th>
+        </tr>
+        <tr style="color: #595959; font-size: 14px">
+          <td>{{ beneficiary?.lastName }}</td>
+        </tr>
+      </ng-container>
+      <ng-container *ngIf="beneficiary?.preferredPhoneNum">
+        <tr style="font-size: 14px; color: #000000">
+          <th id="phoneNo">
+            {{ current_language_set?.bendetails?.phoneNo }}:
+          </th>
+        </tr>
+        <tr style="color: #595959; font-size: 14px">
+          <td>{{ beneficiary?.preferredPhoneNum }}</td>
+        </tr>
+      </ng-container>

       <tr style="font-size: 14px; color: #000000">
         <th id="beneficiaryName">{{ current_language_set?.familyId }}:</th>
       </tr>

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
@src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html
around lines 23 - 52, The three conditional display sections for
beneficiary?.fatherName, beneficiary?.lastName and
beneficiary?.preferredPhoneNum that use current_language_set?.bendetails labels
are only present in the benFlowStatus=true table; add the same three
<ng-container *ngIf="..."> blocks (using the same ids: fatherName, lastName,
phoneNo and the same label lookups current_language_set?.bendetails?.fatherName
/ ?.lastName / ?.phoneNo) into the alternate table block that renders when
benFlowStatus is false so both flow branches show the same fields consistently.

<tr style="font-size: 14px; color: #000000">
<th id="gender">
{{ current_language_set?.bendetails?.gender }} /
Expand Down
61 changes: 49 additions & 12 deletions src/app/app-modules/core/services/http-interceptor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,27 @@ export class HttpInterceptorService implements HttpInterceptor {
this.assignSelectedLanguage();
const key: any = sessionStorage.getItem('key');
let modifiedReq = null;
if (key !== undefined && key !== null) {
modifiedReq = req.clone({
headers: req.headers
.set('Authorization', key)
.set('Content-Type', 'application/json'),
});

const isPlatformFeedback =
req.url && req.url.toLowerCase().includes('/platform-feedback');

if (isPlatformFeedback) {
const headers = req.headers
.delete('Authorization')
.set('Content-Type', 'application/json');
modifiedReq = req.clone({ headers });
} else {
modifiedReq = req.clone({
headers: req.headers.set('Authorization', ''),
});
if (key !== undefined && key !== null) {
modifiedReq = req.clone({
headers: req.headers
.set('Authorization', key)
.set('Content-Type', 'application/json'),
});
} else {
modifiedReq = req.clone({
headers: req.headers.set('Authorization', ''),
});
}
}
return next.handle(modifiedReq).pipe(
tap((event: HttpEvent<any>) => {
Expand All @@ -76,6 +87,29 @@ export class HttpInterceptorService implements HttpInterceptor {
catchError((error: HttpErrorResponse) => {
console.error(error);
this.spinnerService.setLoading(false);
if (error.status === 401) {
this.handleSessionExpiry(
this.currentLanguageSet.sessionExpiredPleaseLogin ||
'Session has expired, please login again.',
);
} else if (error.status === 403) {
this.handleSessionExpiry(
this.currentLanguageSet.accessDenied ||
'Access Denied. You do not have permission to access this resource.',
);
} else if (error.status === 500) {
this.handleSessionExpiry(
this.currentLanguageSet.internaleServerError,
);
} else {
this.handleSessionExpiry(
error.message ||
this.currentLanguageSet.somethingWentWrong ||
'Something went wrong. Please try again later.',
);
}
sessionStorage.clear();
this.sessionstorage.clear();
return throwError(error.error);
Comment on lines +90 to 113
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Session clearing on all HTTP errors is overly aggressive.

The current implementation clears session storage on any HTTP error (lines 111-112), including transient errors like 404 or 503. This could unexpectedly log users out due to temporary network issues or non-critical API failures.

Additionally, line 102 uses this.currentLanguageSet.internaleServerError without a fallback, unlike other error handlers. Note the potential typo in internaleServerError (missing 'n' in "internal").

🔎 Suggested fix
       } else if (error.status === 500) {
         this.handleSessionExpiry(
-          this.currentLanguageSet.internaleServerError,
+          this.currentLanguageSet.internalServerError ||
+            'Internal server error. Please try again later.',
         );
       } else {
-        this.handleSessionExpiry(
-          error.message ||
-            this.currentLanguageSet.somethingWentWrong ||
-            'Something went wrong. Please try again later.',
-        );
+        // Only clear session for auth-related errors (401, 403)
+        // For other errors, show message without session termination
+        this.confirmationService.alert(
+          error.message ||
+            this.currentLanguageSet.somethingWentWrong ||
+            'Something went wrong. Please try again later.',
+          'error',
+        );
+        return throwError(error.error);
       }
       sessionStorage.clear();
       this.sessionstorage.clear();

Consider moving session clearing inside the specific 401/403 handlers rather than applying it universally.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @src/app/app-modules/core/services/http-interceptor.service.ts around lines
90 - 113, The code currently clears sessionStorage on every HTTP error; instead,
remove the unconditional sessionStorage.clear() and this.sessionstorage.clear()
calls and call them only inside the 401 and 403 branches where you invoke
handleSessionExpiry (i.e., after the handleSessionExpiry call in the blocks
handling error.status === 401 and error.status === 403) so users aren’t logged
out on transient errors; also change usage of
this.currentLanguageSet.internaleServerError to a correct key (fix the typo to
internalServerError) and provide a fallback string like
this.currentLanguageSet.internalServerError || 'Internal server error. Please
try again later.' so the 500 branch behaves like the others.

}),
);
Expand All @@ -98,7 +132,8 @@ export class HttpInterceptorService implements HttpInterceptor {
'Unable to fetch session object from Redis server'
) {
this.handleSessionExpiry(
this.currentLanguageSet.sessionExpiredPleaseLogin,
this.currentLanguageSet.sessionExpiredPleaseLogin ||
'Session has expired, please login again.',
);
} else {
this.startTimer();
Expand Down Expand Up @@ -140,7 +175,8 @@ export class HttpInterceptorService implements HttpInterceptor {
sessionStorage.clear();
this.sessionstorage.clear();
this.confirmationService.alert(
this.currentLanguageSet.sessionExpired,
this.currentLanguageSet.sessionExpired ||
'Session has expired, please login again.',
'error',
);
this.router.navigate(['/login']);
Expand All @@ -150,7 +186,8 @@ export class HttpInterceptorService implements HttpInterceptor {
sessionStorage.clear();
this.sessionstorage.clear();
this.confirmationService.alert(
this.currentLanguageSet.sessionExpired,
this.currentLanguageSet.sessionExpired ||
'Session has expired, please login again.',
'error',
);
this.router.navigate(['/login']);
Expand Down
12 changes: 8 additions & 4 deletions src/app/app-modules/core/services/http-service.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export class HttpServiceService {
constructor(
private _http: HttpClient,
private http: HttpClient,
) {}
) {
const storedLang = localStorage.getItem('appLanguage');
this.language = storedLang ? JSON.parse(storedLang) : null;

this.appCurrentLanguge = new BehaviorSubject(this.language);
this.currentLangugae$ = this.appCurrentLanguge.asObservable();
}

fetchLanguageSet() {
console.log('Here i come');
Expand All @@ -34,10 +40,8 @@ export class HttpServiceService {
}

getCurrentLanguage(response: any) {
console.log('here at one', response);
this.language = response;
console.log('teste', this.language);
localStorage.setItem('appLanguage', JSON.stringify(response));
this.appCurrentLanguge.next(response);
console.log('here at two', this.appCurrentLanguge.value);
}
}
3 changes: 3 additions & 0 deletions src/app/app-modules/lab/worklist/worklist.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export class WorklistComponent implements OnInit, OnDestroy, DoCheck {
}
},
(err) => {
if (err?.handled) {
return;
}
this.confirmationService.alert(err, 'error');
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,36 @@
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
[visitCat]="visitCategory"
(click)="trackFieldInteraction('General OPD Diagnosis Component')"
></app-general-opd-diagnosis>
<app-anc-diagnosis
*ngIf="visitCategory === 'ANC'"
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
(click)="trackFieldInteraction('ANC Diagnosis Component')"
></app-anc-diagnosis>
<app-pnc-diagnosis
*ngIf="visitCategory === 'PNC'"
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
(click)="trackFieldInteraction('PNC Diagnosis Component')"
></app-pnc-diagnosis>
<app-ncd-care-diagnosis
*ngIf="visitCategory === 'NCD care'"
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
(click)="trackFieldInteraction('NCD Care Diagnosis Component')"
></app-ncd-care-diagnosis>
<app-covid-diagnosis
*ngIf="visitCategory === 'COVID-19 Screening'"
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
(click)="trackFieldInteraction('COVID Diagnosis Component')"
></app-covid-diagnosis>
<app-ncd-screening-diagnosis
*ngIf="visitCategory === 'NCD screening'"
[caseRecordMode]="caseRecordMode"
[generalDiagnosisForm]="generalDiagnosisForm"
(click)="trackFieldInteraction('NCD Screening Diagnosis Component')"
></app-ncd-screening-diagnosis>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Component, OnInit, Input, DoCheck } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { HttpServiceService } from 'src/app/app-modules/core/services/http-service.service';
import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component';
import { AmritTrackingService } from 'Common-UI/src/tracking';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the import path is properly configured

# Check tsconfig.json for path mappings
if [ -f tsconfig.json ]; then
  echo "=== tsconfig.json path mappings ==="
  cat tsconfig.json | jq '.compilerOptions.paths' 2>/dev/null || cat tsconfig.json | grep -A 20 '"paths"'
fi

# Check if the source file exists
echo -e "\n=== Searching for tracking module ==="
fd -t f "tracking\.(ts|js)$" 2>/dev/null | head -20

# Check package.json for Common-UI dependency
if [ -f package.json ]; then
  echo -e "\n=== Checking package.json for Common-UI ==="
  cat package.json | jq '.dependencies["Common-UI"], .devDependencies["Common-UI"]' 2>/dev/null || grep -i "common-ui" package.json
fi

# Also check for Common-UI directory
echo -e "\n=== Searching for Common-UI directory ==="
fd -t d "Common-UI" 2>/dev/null | head -10

Repository: PSMRI/HWC-UI

Length of output: 239


🏁 Script executed:

#!/bin/bash

# Check the structure of Common-UI
echo "=== Common-UI directory structure ==="
ls -la Common-UI/ 2>/dev/null | head -20

# Look for tracking module in Common-UI
echo -e "\n=== Searching for tracking in Common-UI ==="
find Common-UI -name "*tracking*" -type f 2>/dev/null | head -20

# Read tsconfig.json directly
echo -e "\n=== Full tsconfig.json content ==="
cat tsconfig.json | head -80

# Check for any typescript configuration files
echo -e "\n=== Looking for tsconfig variations ==="
find . -maxdepth 2 -name "tsconfig*.json" -type f 2>/dev/null

Repository: PSMRI/HWC-UI

Length of output: 1365


🏁 Script executed:

#!/bin/bash

# Check tsconfig.app.json
echo "=== tsconfig.app.json content ==="
cat tsconfig.app.json

# Check for webpack or other build configs
echo -e "\n=== Build configuration files ==="
ls -la | grep -E "(webpack|angular\.json|build)"

# Check angular.json for path configurations
if [ -f angular.json ]; then
  echo -e "\n=== angular.json (first 100 lines) ==="
  cat angular.json | head -100
fi

Repository: PSMRI/HWC-UI

Length of output: 3655


🏁 Script executed:

#!/bin/bash

# Search for other imports from Common-UI
echo "=== All imports from Common-UI ==="
rg "from ['\"]Common-UI" --type ts --type tsx -A 0 -B 0 | head -50

# Count how many files use Common-UI imports
echo -e "\n=== Count of files with Common-UI imports ==="
rg "from ['\"]Common-UI" --type ts --type tsx -l | wc -l

# Check if there's a package.json in Common-UI
echo -e "\n=== Check Common-UI for package.json or index files ==="
ls -la Common-UI/ || echo "Empty directory confirmed"
find . -path "./Common-UI*" -type f 2>/dev/null | head -20

Repository: PSMRI/HWC-UI

Length of output: 380


Fix the broken import path for AmritTrackingService.

The import 'Common-UI/src/tracking' cannot be resolved. The Common-UI directory is empty, no path alias is configured in TypeScript, and this is the only import from Common-UI in the codebase. Either correct the import path to reference an existing module, or ensure the Common-UI module is properly set up with the tracking module.

🤖 Prompt for AI Agents
In
@src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/diagnosis.component.ts
at line 26, The import for AmritTrackingService is unresolved; update the import
in the DiagnosisComponent (where AmritTrackingService is referenced) to point to
the actual module that exports it (replace 'Common-UI/src/tracking' with the
correct package/path that contains AmritTrackingService), or if Common-UI should
be a dependency, add/restore the Common-UI package and its tracking export and
update tsconfig paths accordingly; ensure the symbol AmritTrackingService is
exported from the target module and update any usages in the component to match
the corrected import.


@Component({
selector: 'app-diagnosis',
Expand All @@ -40,7 +41,10 @@ export class DiagnosisComponent implements OnInit, DoCheck {
caseRecordMode!: string;
current_language_set: any;

constructor(public httpServiceService: HttpServiceService) {}
constructor(
public httpServiceService: HttpServiceService,
private trackingService: AmritTrackingService,
) {}

ngOnInit() {
this.assignSelectedLanguage();
Expand All @@ -54,4 +58,8 @@ export class DiagnosisComponent implements OnInit, DoCheck {
getLanguageJson.setLanguage();
this.current_language_set = getLanguageJson.currentLanguageObject;
}

trackFieldInteraction(fieldName: string) {
this.trackingService.trackFieldInteraction(fieldName, 'Diagnosis');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@
(keyup)="onDiagnosisInputKeyup(diagnosisInput.value, i)" />
</mat-form-field>

<mat-autocomplete #autoDiagnosis="matAutocomplete" autoActiveFirstOption [displayWith]="displayDiagnosis"
(optionSelected)="onDiagnosisSelected($event.option.value, i)">
<mat-autocomplete #autoDiagnosis="matAutocomplete" appAutocompleteScroller [threshold]="0.6"
(nearEnd)="onAutoNearEnd(i)" (panelReady)="onPanelReady(i, $event)" autoActiveFirstOption
[displayWith]="displayDiagnosis" (optionSelected)="onDiagnosisSelected($event.option.value, i)">
<mat-option *ngFor="let diag of suggestedDiagnosisList[i]" [value]="diag">
{{ diag.term }}
</mat-option>
<mat-option *ngIf="loadingMore[i]" disabled>Loading…</mat-option>
<mat-option *ngIf="noMore[i]" disabled>End of results</mat-option>
</mat-autocomplete>

</div>

<!-- Action Buttons (Add & Remove) -->
Expand Down
Loading
Loading