Skip to content

Commit 73af2f6

Browse files
vishwab15Amoghsnehar-nd
authored
Move code from 3.4.0 to main (#81)
* Update version in pom.xml to 3.4.0 * Update pom.xml * fix: amm-1655 (#71) * fix: amm-1668 beneficiary details addition * fix: amm-1755 * fix: changed build version to 3.4.0 (#77) * Sn/release3.4 (#78) * fix: changed build version to 3.4.0 * fix: common ui cahanges * fix: inventory-ui url fix (#79) --------- Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com>
1 parent 78ecaa3 commit 73af2f6

15 files changed

Lines changed: 256 additions & 149 deletions

File tree

Common-UI

Submodule Common-UI updated 30 files

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.iemr.tm-ui</groupId>
77
<artifactId>tm-ui</artifactId>
8-
<version>3.0.0</version>
8+
<version>3.4.0</version>
99
<name>TM-UI</name>
1010
<description>Piramal - tm: Module ui</description>
1111
<packaging>war</packaging>
@@ -94,7 +94,7 @@
9494
<plugin>
9595
<groupId>org.codehaus.mojo</groupId>
9696
<artifactId>exec-maven-plugin</artifactId>
97-
<version>3.1.0</version>
97+
<version>3.4.0</version>
9898
<executions>
9999
<execution>
100100
<id>npm-install</id>

src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@
1919
<tr style="color: #595959; font-size: 14px">
2020
<td>{{ beneficiary?.beneficiaryName }}</td>
2121
</tr>
22+
<ng-container *ngIf="beneficiary?.fatherName">
23+
<tr style="font-size: 14px; color: #000000">
24+
<th id="fatherName">
25+
{{ current_language_set?.bendetails?.fatherName }}:
26+
</th>
27+
</tr>
28+
<tr style="color: #595959; font-size: 14px">
29+
<td>{{ beneficiary?.fatherName }}</td>
30+
</tr>
31+
</ng-container>
32+
<ng-container *ngIf="beneficiary?.lastName">
33+
<tr style="font-size: 14px; color: #000000">
34+
<th id="lastName">
35+
{{ current_language_set?.bendetails?.lastName }}:
36+
</th>
37+
</tr>
38+
<tr style="color: #595959; font-size: 14px">
39+
<td>{{ beneficiary?.lastName }}</td>
40+
</tr>
41+
</ng-container>
42+
<ng-container *ngIf="beneficiary?.preferredPhoneNum">
43+
<tr style="font-size: 14px; color: #000000">
44+
<th id="phoneNo">{{ current_language_set?.bendetails?.phoneNo }}:</th>
45+
</tr>
46+
<tr style="color: #595959; font-size: 14px">
47+
<td>{{ beneficiary?.preferredPhoneNum }}</td>
48+
</tr>
49+
</ng-container>
2250
<tr style="font-size: 14px; color: #000000">
2351
<th id="gender">
2452
{{ current_language_set?.bendetails?.gender }} /

src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.html

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,28 @@ <h4>{{ current_language_set?.casesheet?.provisionalDiag }}*</h4>
88
<div
99
class="col-12 row"
1010
*ngFor="
11-
let diagnosis of getProvisionalDiagnosisList();
11+
let diagnosis of provisionalDiagnosisControls;
1212
let i = index;
1313
let isLast = last
1414
"
1515
>
1616
<ng-container [formGroupName]="i">
17-
<div class="col-9">
18-
<mat-form-field class="input-full-width">
19-
<input
20-
matInput
21-
allowText="inputFieldValidator"
22-
appDiagnosisSearch
23-
[diagnosisListForm]="diagnosis"
24-
required
25-
name="viewDiagnosisProvided"
26-
formControlName="viewProvisionalDiagnosisProvided"
27-
maxlength="100"
28-
minlength="3"
29-
required
30-
[previousSelected]="
31-
generalDiagnosisForm.value.provisionalDiagnosisList
32-
"
33-
/>
34-
<mat-icon
35-
class="search-btn cursorPointer"
36-
matSuffix
37-
appDiagnosisSearch
38-
[diagnosisListForm]="diagnosis"
39-
[previousSelected]="
40-
generalDiagnosisForm.value.provisionalDiagnosisList
41-
"
42-
>search</mat-icon
43-
>
17+
<div class="col-xs-12 col-sm-8 col-md-9">
18+
<mat-form-field class="input-full-width" appearance="fill">
19+
<mat-label>{{ current_language_set?.casesheet?.provisionalDiag }}</mat-label>
20+
<input matInput type="text" autocomplete="off" name="viewProvisionalDiagnosisProvided"
21+
formControlName="viewProvisionalDiagnosisProvided" minlength="3" maxlength="100" required #diagnosisInput
22+
[matAutocomplete]="autoDiagnosis" (keyup)="onDiagnosisInputKeyup(diagnosisInput.value, i)" />
4423
</mat-form-field>
24+
25+
<mat-autocomplete #autoDiagnosis="matAutocomplete" autoActiveFirstOption [displayWith]="displayDiagnosis"
26+
(optionSelected)="onDiagnosisSelected($event.option.value, i)">
27+
<mat-option *ngFor="let diag of suggestedDiagnosisList[i]" [value]="diag">
28+
{{ diag.term }}
29+
</mat-option>
30+
</mat-autocomplete>
4531
</div>
32+
4633
<div class="col-xs-12 col-sm-3 m-t-10">
4734
<button
4835
mat-mini-fab

src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.ts

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class GeneralOpdDiagnosisComponent
4747
implements OnInit, OnChanges, DoCheck
4848
{
4949
utils = new GeneralUtils(this.fb, this.sessionstorage);
50+
suggestedDiagnosisList: any = [];
5051

5152
@Input()
5253
generalDiagnosisForm!: FormGroup;
@@ -56,12 +57,14 @@ export class GeneralOpdDiagnosisComponent
5657
current_language_set: any;
5758
designation: any;
5859
specialist!: boolean;
60+
5961
constructor(
6062
private fb: FormBuilder,
6163
public httpServiceService: HttpServiceService,
6264
private doctorService: DoctorService,
6365
private confirmationService: ConfirmationService,
6466
readonly sessionstorage: SessionStorageService,
67+
private masterdataService: MasterdataService
6568
) {}
6669

6770
ngOnInit() {
@@ -186,8 +189,7 @@ export class GeneralOpdDiagnosisComponent
186189
(<FormGroup>diagnosisArrayList.at(i)).controls[
187190
'viewProvisionalDiagnosisProvided'
188191
].disable();
189-
if (diagnosisArrayList.length < savedDiagnosisData.length)
190-
this.addDiagnosis();
192+
this.addDiagnosis();
191193
}
192194
}
193195
}
@@ -204,13 +206,11 @@ export class GeneralOpdDiagnosisComponent
204206
);
205207
}
206208
}
207-
getProvisionalDiagnosisList(): AbstractControl[] | null {
208-
const provisionalDiagnosisListControl = this.generalDiagnosisForm.get(
209-
'provisionalDiagnosisList',
209+
get provisionalDiagnosisControls(): AbstractControl[] {
210+
return (
211+
(this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray)
212+
?.controls || []
210213
);
211-
return provisionalDiagnosisListControl instanceof FormArray
212-
? provisionalDiagnosisListControl.controls
213-
: null;
214214
}
215215

216216
removeDiagnosisFromList(
@@ -252,4 +252,35 @@ export class GeneralOpdDiagnosisComponent
252252
return true;
253253
}
254254
}
255+
256+
onDiagnosisInputKeyup(value: string, index: number) {
257+
if (value.length >= 3) {
258+
this.masterdataService
259+
.searchDiagnosisBasedOnPageNo(value, index)
260+
.subscribe((results: any) => {
261+
this.suggestedDiagnosisList[index] = results?.data?.sctMaster;
262+
});
263+
} else {
264+
this.suggestedDiagnosisList[index] = [];
265+
}
266+
}
267+
268+
displayDiagnosis(diagnosis: any): string {
269+
return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || '';
270+
}
271+
272+
onDiagnosisSelected(selected: any, index: number) {
273+
// this.patientQuickConsultForm.get(['provisionalDiagnosisList', index])?.setValue(selected);
274+
const diagnosisFormArray = this.generalDiagnosisForm.get(
275+
'provisionalDiagnosisList'
276+
) as FormArray;
277+
const diagnosisFormGroup = diagnosisFormArray.at(index) as FormGroup;
278+
279+
// Set the nested and top-level fields
280+
diagnosisFormGroup.patchValue({
281+
viewProvisionalDiagnosisProvided: selected,
282+
conceptID: selected?.conceptID || null,
283+
term: selected?.term || null,
284+
});
285+
}
255286
}

src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.html

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -118,40 +118,29 @@ <h4>{{ current_language_set?.casesheet?.provisionalDiag }}</h4>
118118
<ng-container formArrayName="provisionalDiagnosisList">
119119
<div
120120
*ngFor="
121-
let diagnosis of getProvisionalDiagnosisList();
121+
let diagnosis of provisionalDiagnosisControls;
122122
let i = index;
123123
let isLast = last
124124
"
125125
>
126126
<ng-container [formGroupName]="i">
127127
<div class="row">
128-
<div class="col-xs-12 col-sm-9">
129-
<mat-form-field class="input-full-width">
130-
<input
131-
matInput
132-
allowText="inputFieldValidator"
133-
appDiagnosisSearch
134-
[diagnosisListForm]="diagnosis"
135-
name="viewDiagnosisProvided"
136-
formControlName="viewProvisionalDiagnosisProvided"
137-
maxlength="100"
138-
minlength="3"
139-
[previousSelected]="
140-
generalDiagnosisForm.value.provisionalDiagnosisList
141-
"
142-
/>
143-
<mat-icon
144-
class="search-btn cursorPointer"
145-
matSuffix
146-
appDiagnosisSearch
147-
[diagnosisListForm]="diagnosis"
148-
[previousSelected]="
149-
generalDiagnosisForm.value?.provisionalDiagnosisList
150-
"
151-
>search</mat-icon
152-
>
153-
</mat-form-field>
154-
</div>
128+
<div class="col-xs-12 col-sm-8 col-md-9">
129+
<mat-form-field class="input-full-width" appearance="fill">
130+
<mat-label>{{ current_language_set?.casesheet?.provisionalDiag }}</mat-label>
131+
<input matInput type="text" autocomplete="off" name="viewProvisionalDiagnosisProvided"
132+
formControlName="viewProvisionalDiagnosisProvided" minlength="3" maxlength="100" required #diagnosisInput
133+
[matAutocomplete]="autoDiagnosis" (keyup)="onDiagnosisInputKeyup(diagnosisInput.value, i)" />
134+
</mat-form-field>
135+
136+
<mat-autocomplete #autoDiagnosis="matAutocomplete" autoActiveFirstOption [displayWith]="displayDiagnosis"
137+
(optionSelected)="onDiagnosisSelected($event.option.value, i)">
138+
<mat-option *ngFor="let diag of suggestedDiagnosisList[i]" [value]="diag">
139+
{{ diag.term }}
140+
</mat-option>
141+
</mat-autocomplete>
142+
</div>
143+
155144
<div class="col-xs-12 col-sm-3 m-t-10">
156145
<button
157146
mat-mini-fab

src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.ts

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck {
5959
visitCategory: any;
6060
attendantType: any;
6161
enableNCDCondition = false;
62+
suggestedDiagnosisList: any = [];
63+
64+
6265
constructor(
6366
private fb: FormBuilder,
6467
private masterdataService: MasterdataService,
@@ -178,8 +181,7 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck {
178181
(<FormGroup>diagnosisArrayList.at(i)).controls[
179182
'viewProvisionalDiagnosisProvided'
180183
].disable();
181-
if (diagnosisArrayList.length < savedDiagnosisData.length)
182-
this.addDiagnosis();
184+
this.addDiagnosis();
183185
}
184186
}
185187
}
@@ -197,13 +199,11 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck {
197199
}
198200
}
199201

200-
getProvisionalDiagnosisList(): AbstractControl[] | null {
201-
const provisionalDiagnosisListControl = this.generalDiagnosisForm.get(
202-
'provisionalDiagnosisList',
202+
get provisionalDiagnosisControls(): AbstractControl[] {
203+
return (
204+
(this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray)
205+
?.controls || []
203206
);
204-
return provisionalDiagnosisListControl instanceof FormArray
205-
? provisionalDiagnosisListControl.controls
206-
: null;
207207
}
208208

209209
removeDiagnosisFromList(
@@ -268,4 +268,35 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck {
268268
value,
269269
);
270270
}
271+
272+
onDiagnosisInputKeyup(value: string, index: number) {
273+
if (value.length >= 3) {
274+
this.masterdataService
275+
.searchDiagnosisBasedOnPageNo(value, index)
276+
.subscribe((results: any) => {
277+
this.suggestedDiagnosisList[index] = results?.data?.sctMaster;
278+
});
279+
} else {
280+
this.suggestedDiagnosisList[index] = [];
281+
}
282+
}
283+
284+
displayDiagnosis(diagnosis: any): string {
285+
return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || '';
286+
}
287+
288+
onDiagnosisSelected(selected: any, index: number) {
289+
// this.patientQuickConsultForm.get(['provisionalDiagnosisList', index])?.setValue(selected);
290+
const diagnosisFormArray = this.generalDiagnosisForm.get(
291+
'provisionalDiagnosisList'
292+
) as FormArray;
293+
const diagnosisFormGroup = diagnosisFormArray.at(index) as FormGroup;
294+
295+
// Set the nested and top-level fields
296+
diagnosisFormGroup.patchValue({
297+
viewProvisionalDiagnosisProvided: selected,
298+
conceptID: selected?.conceptID || null,
299+
term: selected?.term || null,
300+
});
301+
}
271302
}

src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.html

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,27 @@ <h4 *ngIf="!enableProvisionalDiag">
1212
<ng-container formArrayName="provisionalDiagnosisList">
1313
<div
1414
*ngFor="
15-
let diagnosis of getProvisionalDiagnosisList();
15+
let diagnosis of provisionalDiagnosisControls;
1616
let i = index;
1717
let isLast = last
1818
"
1919
>
2020
<ng-container [formGroupName]="i">
21-
<div class="col-9">
22-
<mat-form-field class="input-full-width">
23-
<input
24-
matInput
25-
allowText="inputFieldValidator"
26-
appDiagnosisSearch
27-
[diagnosisListForm]="diagnosis"
28-
name="viewDiagnosisProvided"
29-
formControlName="viewProvisionalDiagnosisProvided"
30-
maxlength="100"
31-
minlength="3"
32-
[previousSelected]="
33-
generalDiagnosisForm.value.provisionalDiagnosisList
34-
"
35-
/>
36-
<mat-icon
37-
class="search-btn cursorPointer"
38-
matSuffix
39-
appDiagnosisSearch
40-
[diagnosisListForm]="diagnosis"
41-
[previousSelected]="
42-
generalDiagnosisForm.value.provisionalDiagnosisList
43-
"
44-
>search</mat-icon
45-
>
46-
</mat-form-field>
47-
</div>
21+
<div class="col-xs-12 col-sm-8 col-md-9">
22+
<mat-form-field class="input-full-width" appearance="fill">
23+
<mat-label>{{ current_language_set?.casesheet?.provisionalDiag }}</mat-label>
24+
<input matInput type="text" autocomplete="off" name="viewProvisionalDiagnosisProvided"
25+
formControlName="viewProvisionalDiagnosisProvided" minlength="3" maxlength="100" required #diagnosisInput
26+
[matAutocomplete]="autoDiagnosis" (keyup)="onDiagnosisInputKeyup(diagnosisInput.value, i)" />
27+
</mat-form-field>
28+
29+
<mat-autocomplete #autoDiagnosis="matAutocomplete" autoActiveFirstOption [displayWith]="displayDiagnosis"
30+
(optionSelected)="onDiagnosisSelected($event.option.value, i)">
31+
<mat-option *ngFor="let diag of suggestedDiagnosisList[i]" [value]="diag">
32+
{{ diag.term }}
33+
</mat-option>
34+
</mat-autocomplete>
35+
</div>
4836
<div class="col-xs-12 col-sm-3 m-t-10">
4937
<button
5038
mat-mini-fab

0 commit comments

Comments
 (0)