Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix:E-claim toggle list button #507 #528

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ export class EClaimHomeComponent implements OnInit {
this.loadedData = false;
this.visitService.getAllVisits(null, null, true).subscribe(
(visits) => {
console.log('Fetched Active Visits:', visits);
Copy link
Author

Choose a reason for hiding this comment

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

Added a line for console.log to check for fetched active visits status

this.dataSource = new MatTableDataSource(visits);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
this.loadingData = false;
this.loadedData = true;
},
(error) => {
console.error('Error fetching active visits:', error);
this.loadingData = false;
this.loadedData = true;
this.loadingDataError = error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ <h3 class="text-muted">
<!-- Tabular list -->
<div
class="tabular-patient-list"
*ngIf="
*ngIf="params?.visits && params?.visits.length > 0"
<!--`*ngIf="
isTabularList &&
params?.visits &&
params?.visits.length > 0 &&
((paymentTypeSelected &&
visit?.visit?.paymentType === paymentTypeSelected) ||
((paymentTypeSelected && visit?.visit?.paymentType === paymentTypeSelected) ||
!paymentTypeSelected)
"
"` -->
>
<app-patients-tabular-list
[shouldShowParentLocation]="shouldShowParentLocation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export class PatientListComponent implements OnInit, OnChanges {
private googleAnalyticsService: GoogleAnalyticsService
) {}

ngOnChanges() {}
ngOnChanges() {
console.log('Change detected in component!');
}

ngOnInit() {
if (this.isDischarge === undefined) {
Expand All @@ -93,6 +95,7 @@ export class PatientListComponent implements OnInit, OnChanges {
.pipe(
tap((response: any) => {
this.loadingPatients = false;
console.log('Patient Data:', response);
if (response?.error) {
this.errors = [...this.errors, response?.error];
}
Expand All @@ -110,6 +113,7 @@ export class PatientListComponent implements OnInit, OnChanges {


private getVisits(visits: Visit[]) {
console.log('Response:', Response);
this.loadingPatients = true;
// this.service = "LABS";

Expand Down Expand Up @@ -273,9 +277,12 @@ export class PatientListComponent implements OnInit, OnChanges {
const currentUrl = this.router.url.split("?")[0];
const params = this.router.url.split("?")[1];
this.isTabularList = type === "tabular" ? true : false;
console.log('Toggling Patient List to:', type);
console.log('Updated isTabularList:', this.isTabularList);
this.store.dispatch(
go({ path: [currentUrl], query: { queryParams: { list: type } } })
);
console.log('Updated URL after dispatch:', this.router.url);
}

getPaymentTypeSelected(event: any) {
Expand Down
7 changes: 4 additions & 3 deletions ui/src/app/shared/resources/visits/services/visits.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ export class VisitsService {
includeInactive?: boolean,
onlyInsurance?: boolean,
queryParam?: string,
startIndex?: number,
limit?: number,
startIndex: number=0,
limit: number=10,
orderType?: string,
orderStatus?: string,
orderStatusCode?: string,
Expand Down Expand Up @@ -355,6 +355,7 @@ export class VisitsService {
if (includeInactive && includeInactive === true) {
parametersString += `&includeInactive=true`;
}
console.log('Constructed Query Parameters:', parametersString);
//
return (
locationUuids?.length > 0
Expand Down Expand Up @@ -1091,4 +1092,4 @@ export class VisitsService {
})
);
}
}
}