Skip to content

Commit

Permalink
POC-571 (AMPATH#1686)
Browse files Browse the repository at this point in the history
* 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
4 people authored and henrykorir committed Jan 17, 2024
1 parent b9e6a3d commit c71859a
Show file tree
Hide file tree
Showing 32 changed files with 1,676 additions and 103 deletions.
61 changes: 61 additions & 0 deletions src/app/etl-api/cohort-otz-module-resource.service.ts
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)
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h4 class="text">Group Summary</h4>
<strong>Leader: </strong>
<ng-container *ngIf="currentLeader">
<span *ngIf="currentLeader.person">
{{ currentLeader.person.display }} ({{ leadershipType }}),
{{ currentLeader.person.display }},
</span>
<span>since {{ currentLeader.startDate | date: 'medium' }}</span>
</ng-container>
Expand Down Expand Up @@ -108,6 +108,12 @@ <h4 class="text">Group Summary</h4>
</ng-container>
</td>
</tr>
<tr>
<td>
<strong>Group Activity: </strong>
<span *ngIf="landmark">{{ groupActivity?.value }}</span>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -195,10 +201,23 @@ <h4 class="modal-title pull-left">Edit Leadership</h4>
>
<div class="col-xs-10">
<mat-radio-group formControlName="leadershipType">
<mat-radio-button value="peer" color="primary"
<mat-radio-button
*ngIf="validOTZProgram"
value="peer"
[checked]="defaultLeadershipType == 'peer'"
color="primary"
>OTZ Champion</mat-radio-button
>
<mat-radio-button
*ngIf="!validOTZProgram"
value="peer"
color="primary"
>Peer Leadership</mat-radio-button
>
<mat-radio-button value="staff" color="primary"
<mat-radio-button
*ngIf="!validOTZProgram"
value="staff"
color="primary"
>Community Staff Leadership</mat-radio-button
>
</mat-radio-group>
Expand Down Expand Up @@ -349,12 +368,21 @@ <h4 class="modal-title pull-left">Add Leader</h4>
<div class="col-xs-10">
<mat-radio-group (change)="onDefaultLeadershipTypeChanged($event)">
<mat-radio-button
*ngIf="validOTZProgram"
value="peer"
[checked]="defaultLeadershipType == 'peer'"
color="primary"
>OTZ Champion</mat-radio-button
>
<mat-radio-button
*ngIf="!validOTZProgram"
value="peer"
[checked]="defaultLeadershipType == 'peer'"
color="primary"
>Peer Leadership</mat-radio-button
>
<mat-radio-button
*ngIf="!validOTZProgram"
value="staff"
[checked]="defaultLeadershipType !== 'peer'"
color="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
public group: Group;
public groupNumber: any;
public landmark: any;
public groupActivity: any;
public provider: any;
public program: any;
public currentLeader: any;
Expand All @@ -76,6 +77,7 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
public currentMonth = Moment().month() + 1;
public providerSuggest: Subject<any> = new Subject();
public editLeaderForm: FormGroup;
public validOTZProgram = false;
public endDate = {
date: {
month: this.currentMonth,
Expand Down Expand Up @@ -104,6 +106,10 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
'landmark',
this.group.attributes
);
this.groupActivity = this.communityGroupService.getGroupAttribute(
'groupActivity',
this.group.attributes
);
this.currentLeader = this.getCurrentLeader(
group.cohortLeaders,
group.cohortMembers
Expand Down Expand Up @@ -347,6 +353,10 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
'landmark',
this.group.attributes
);
this.groupActivity = this.communityGroupService.getGroupAttribute(
'groupActivity',
this.group.attributes
);
this.currentLeader = this.getCurrentLeader(
group.cohortLeaders,
group.cohortMembers
Expand Down Expand Up @@ -561,6 +571,7 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
groupProgram: { label: program['name'], value: program['uuid'] },
provider: { label: provider.person.display, value: provider.person.uuid },
address: this.landmark.value,
groupActivity: this.groupActivity.value,
groupUuid: this.group.uuid,
actionButtonText: 'Save Changes'
};
Expand Down Expand Up @@ -716,6 +727,9 @@ export class GroupDetailSummaryComponent implements OnInit, OnDestroy {
const sub = this.programService.getProgramByUuid(program.value).subscribe(
(prog) => {
this.program = prog;
if (this.program.name === 'OTZ PROGRAM') {
this.validOTZProgram = true;
}
},
(error) => {
console.log(error);
Expand Down
18 changes: 16 additions & 2 deletions src/app/group-manager/group-detail/group-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ <h4 class="modal-title pull-left">Add Membership</h4>
<div class="alert alert-danger" *ngIf="enrollmentErrorMessage">
{{ enrollmentErrorMessage }}
</div>
<div class="alert alert-info" *ngIf="showEnrollmentButton">
<div
class="alert alert-info"
*ngIf="showEnrollmentButton && showOTZEnrollmentMsg"
>
<button
class="btn btn-xs btn-primary pull-right"
(click)="enrollPatienttoProgram()"
Expand All @@ -249,6 +252,13 @@ <h4 class="modal-title pull-left">Add Membership</h4>
</button>
The patient is not enrolled in this program.
</div>
<div
class="alert alert-info"
*ngIf="showEnrollmentButton && !showOTZEnrollmentMsg"
>
Patient is not eligible for OTZ enrollment
</div>

<busy
*ngIf="validatingEnrollment"
[message]="'Validating Enrollment...'"
Expand Down Expand Up @@ -366,7 +376,11 @@ <h4 class="modal-title pull-left">Start Group Meeting</h4>
>
<ng-container *ngFor="let item of visitTypes">
<option
*ngIf="item.display.toLowerCase().includes('community')"
*ngIf="
isOtzProgram
? item.display.toLowerCase().includes('otz')
: item.display.toLowerCase().includes('community')
"
[value]="item.uuid"
>
{{ item.display }}
Expand Down
Loading

0 comments on commit c71859a

Please sign in to comment.