forked from AMPATH/ng2-amrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix type annotation * Work on OTZ program snapshot * work on group manager * wip * Work on requested changes * wip * for unsuccessful contact attempts, added maroon filter (AMPATH#1682) * for unsuccessfulcontact attempts, added pink filter (AMPATH#1683) * POC-558 (AMPATH#1678) * Change the Male/Female gender disaagregation to start with Female then Male * Change the Male/Female gender disaagregation to start with Female then Male --------- Co-authored-by: kantush <sainingo> Co-authored-by: Drizzentic <[email protected]> * POC-492: Modified pre-appointment to display failed phone attempts (AMPATH#1681) * POC-570:remove program snapshot tag after patient has made clinical visit (AMPATH#1687) * remove program snapshot tag after patient has made clinical visit * fixed pre-appoinment-reminder tag on program snapshot * POC-570:fixed pre-appoinment-reminder tag on program snapshot * Update src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts --------- Co-authored-by: Drizzentic <[email protected]> * POC-495 (AMPATH#1685) * customised toastr for pre-appointment rescheduled appointments * added pre-appointment banner for patients who rescheduled appointments * added customised toastr for predicted patients who rescheduled appointments * POC-495: added customised toastr for predicted patients with rescheduled appointments added customised toastr for predicted patients who rescheduled appointments POC-495: added customised toastr for predicted patients with rescheduled appointments --------- Co-authored-by: Drizzentic <[email protected]> * wip * Add cohort viral load suppression rate * Rename variables * Refactoring * POC-599:Add Jua Mtoto Wako to program snapshot (AMPATH#1691) * POC-599:Add Jua Mtoto Wako to program snapshot * POC-599: Add JMW to program snapshot * POC-599: Add Jua Mtoto Wako to program snapshot --------- Co-authored-by: Rugut Kibet Enock <[email protected]> * POC-605:Remove CovidAlert from program snapshot (AMPATH#1690) Co-authored-by: Rugut Kibet Enock <[email protected]> * Modify encounter uuid --------- Co-authored-by: kantush <sainingo> Co-authored-by: Angie-540 <[email protected]> Co-authored-by: Drizzentic <[email protected]> Co-authored-by: Rugut Kibet Enock <[email protected]>
- Loading branch information
1 parent
b9e6a3d
commit c71859a
Showing
32 changed files
with
1,676 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { AppSettingsService } from '../app-settings/app-settings.service'; | ||
import { Observable } from 'rxjs'; | ||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | ||
|
||
@Injectable() | ||
export class CohortOtzModuleResourceService { | ||
constructor( | ||
private http: HttpClient, | ||
private appSettingsService: AppSettingsService | ||
) {} | ||
public getUrl(): string { | ||
return ( | ||
this.appSettingsService.getEtlRestbaseurl().trim() + 'cohort-modules' | ||
); | ||
} | ||
|
||
public getSummaryUrl(): string { | ||
return ( | ||
this.appSettingsService.getEtlRestbaseurl().trim() + | ||
'hiv-latest-summaries' | ||
); | ||
} | ||
|
||
public getCohortSuppressionsUrl(): string { | ||
return ( | ||
this.appSettingsService.getEtlRestbaseurl().trim() + | ||
'viral-load-suppression-rate' | ||
); | ||
} | ||
|
||
public getCohortOtzModule(cohortUuid: string): Observable<any> { | ||
return this.http.get(this.getUrl() + '/' + cohortUuid); | ||
} | ||
public getUrlRequestParams(patientUuids: string[]): HttpParams { | ||
let urlParams: HttpParams = new HttpParams(); | ||
|
||
if (patientUuids && patientUuids.length > 0) { | ||
urlParams = urlParams.set('uuid', patientUuids.join(',')); | ||
} | ||
return urlParams; | ||
} | ||
|
||
public getPatientsLatestHivSummaries(payload: string[]) { | ||
if (!payload || payload.length === 0) { | ||
return null; | ||
} | ||
return this.http.get(this.getSummaryUrl(), { | ||
params: this.getUrlRequestParams(payload) | ||
}); | ||
} | ||
|
||
public getCohortSuppressionStatus(payload: string[]) { | ||
if (!payload || payload.length === 0) { | ||
return null; | ||
} | ||
return this.http.get(this.getCohortSuppressionsUrl(), { | ||
params: this.getUrlRequestParams(payload) | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.