Skip to content

Commit

Permalink
Merge branch 'POC-534' into POC-534
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqedme authored Mar 18, 2024
2 parents 18e822c + 854c0cf commit 0adde05
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ <h4 class="modal-title pull-left">Add Membership</h4>
>
Enroll
</button>
The patient is not enrolled in this program.
The patient is not enrolled in this Model.
</div>
<div
class="alert alert-info"
Expand Down
2 changes: 1 addition & 1 deletion src/app/patient-creation/patient-creation.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ <h3 style="color: #76b5c5">Current Residence</h3>
class="btn btn-primary"
(click)="loadProgramManager(createdPatient)"
>
Enroll into Program
Enroll into Model
</button>
<button
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ export class FormentryComponent implements OnInit, OnDestroy {
.subscribe(() => {});
}
}

public assignModel(modelConceptUuid: any) {
let programToEnroll = '';
switch (modelConceptUuid) {
Expand Down Expand Up @@ -771,11 +772,15 @@ export class FormentryComponent implements OnInit, OnDestroy {
let modelSelected = [];
modelSelected = this.form.searchNodeByQuestionId('dsdModel');
if (modelSelected.length === 0) {
modelSelected = this.form.searchNodeByQuestionId('moreIntense'); // moreIntense
// adultreturn form
modelSelected =
this.form.searchNodeByQuestionId('moreIntense') || // moreIntense
this.form.searchNodeByQuestionId('communityModel') || // community
this.form.searchNodeByQuestionId('facilityModel'); // facility
}

const modelUuid = modelSelected[0].initialValue.value.uuid;
programToEnroll = this.assignModel(modelUuid);
programToEnroll = this.assignModel(modelUuid);

console.log('Response:', programToEnroll);
const enrollpayload = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[message]="'Loading patient care programs...'"
></busy>
<div class="programs" *ngIf="enrolledProgrames.length > 0 && !hasError">
<h4 class="component-title">Patient Care Program Snapshots</h4>
<h4 class="component-title">Patient Care Model Snapshots</h4>

<!--<div
style="margin: 4px 0px; padding: 4px"
Expand Down Expand Up @@ -116,9 +116,9 @@ <h2 class="program-header">
</div>
<div *ngIf="!programsBusy && enrolledProgrames.length === 0 && !hasError">
<p class="alert alert-info">
The patient is not enrolled in any program.
The patient is not enrolled in any Model.
<button class="btn btn-primary pull-right" (click)="loadProgramManager()">
Enroll into Program
Enroll into Model
</button>
</p>
</div>
Expand All @@ -130,11 +130,11 @@ <h2 class="program-header">
!hasError
"
>
<h4 class="component-title">Previous Enrolled Programs</h4>
<h4 class="component-title">Previous Enrolled Models</h4>
<table class="table table-stripped">
<thead>
<tr>
<th>Program Name</th>
<th>Model Name</th>
<th>Location</th>
<th>Started</th>
<th>Stopped</th>
Expand Down
14 changes: 7 additions & 7 deletions src/app/program-manager/new-program/new-program.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2><i class="fa fa-arrow-right"></i> Select Department</h2>
class="btn btn-primary pull-right"
(click)="goToProgram()"
>
Continue To Program
Continue To Model
</button>
<span class="clear">&nbsp;</span>
</div>
Expand Down Expand Up @@ -114,7 +114,7 @@ <h2><i class="fa fa-arrow-right"></i>Check Patient Status</h2>
<div class="wizard-body component">
<div class="step" *ngIf="availableDepartmentPrograms">
<div class="step-name">
<h2><i class="fa fa-arrow-right"></i> Select Program</h2>
<h2><i class="fa fa-arrow-right"></i> Select Model</h2>
</div>
<div class="step-details">
<mat-radio-group
Expand Down Expand Up @@ -300,7 +300,7 @@ <h2><i class="fa fa-arrow-right"></i> Enroll to Group</h2>
</div>
</div>
</program-wizard-step>
<program-wizard-step [name]="'Program Enrollment Success'">
<program-wizard-step [name]="'Model Enrollment Success'">
<div class="wizard-body component">
<div class="step">
<div
Expand Down Expand Up @@ -374,7 +374,7 @@ <h2><i class="fa fa-arrow-right"></i> Enroll to Group</h2>
<ng-container
*ngIf="unenrolledProgrames && unenrolledProgrames.length > 0"
>
<h2 class="component-title">Programs Sucessfully Stopped</h2>
<h2 class="component-title">Model Sucessfully Stopped</h2>
<div
class="alert alert-danger"
*ngFor="let program of unenrolledProgrames"
Expand All @@ -400,7 +400,7 @@ <h2 class="component-title">Programs Sucessfully Stopped</h2>
class="btn btn-danger pull-left"
(click)="editProgram(newlyEnrolledProgram)"
>
Edit Program
Edit Model
</button>
<button
class="btn btn-primary pull-right"
Expand All @@ -413,7 +413,7 @@ <h2 class="component-title">Programs Sucessfully Stopped</h2>
class="btn btn-primary pull-right"
(click)="goToProgramSummary()"
>
<span>GO TO PROGRAM SUMMARY</span>
<span>GO TO MODEL SUMMARY</span>
</button>
<span class="clear">&nbsp;</span>
</div>
Expand All @@ -423,7 +423,7 @@ <h2 class="component-title">Programs Sucessfully Stopped</h2>
</program-wizard>
<busy *ngIf="!loaded" [message]="'Loading...'"></busy>
<p class="alert alert-danger" *ngIf="hasError">
Error loading patient program config. Please make sure that your network is
Error loading patient model config. Please make sure that your network is
working fine.
</p>
<ng-template #dcGroupAutoUnEnrollmentWarning>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

{
"f0faccb7-657e-413c-abad-54f13409d106": {
"name": "STANDARD CARE MODEL",
Expand Down

0 comments on commit 0adde05

Please sign in to comment.