Skip to content

Commit 3dbffe6

Browse files
authored
Merge branch 'develop' into feature/prime-2735_ha_care_type_vendor_page
2 parents 0ada333 + 90268ec commit 3dbffe6

File tree

15 files changed

+20481
-72
lines changed

15 files changed

+20481
-72
lines changed

prime-angular-frontend/src/app/modules/enrolment/pages/regulatory/regulatory.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
[index]="i"
126126
[total]="formState.certifications.controls.length"
127127
[selectedColleges]="selectedCollegeCodes"
128+
[selectedLicenses]="selectedLicenseCodes"
128129
(remove)="removeCertification($event)">
129130
</app-college-certification-form>
130131

prime-angular-frontend/src/app/modules/enrolment/pages/regulatory/regulatory.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ export class RegulatoryComponent extends BaseEnrolmentProfilePage implements OnI
7878
.map((certification: CollegeCertification) => +certification.collegeCode);
7979
}
8080

81+
public get selectedLicenseCodes(): number[] {
82+
return this.formState.certifications.value
83+
.map((certification: CollegeCertification) => +certification.licenseCode);
84+
}
85+
8186
public addEmptyCollegeCertification() {
8287
this.formState.addCollegeCertification();
8388
}

prime-angular-frontend/src/app/modules/site-registration/pages/care-setting-page/care-setting-page.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
class="radio-button"
5959
[value]="vendor.code">
6060
{{ vendor.name }}
61-
<span *ngIf="vendor.name === 'CareConnect'" class="warning-text">*Do not select CareConnect as the vendor without first contacting CareConnect at [email protected]</span>
6261
</mat-radio-button>
6362
</mat-radio-group>
6463

prime-angular-frontend/src/app/modules/site-registration/pages/care-setting-page/care-setting-page.component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@
77
.radio-button {
88
margin: .25rem 0;
99
}
10-
11-
.warning-text {
12-
color: red;
13-
}

prime-angular-frontend/src/app/modules/site-registration/pages/care-setting-page/care-setting-page.component.ts

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from '@angular/router';
33
import { MatDialog } from '@angular/material/dialog';
44

55
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
6-
import { EMPTY } from 'rxjs';
76

87
import { noop, of } from 'rxjs';
98
import { exhaustMap, map, pairwise, startWith, tap } from 'rxjs/operators';
@@ -24,8 +23,6 @@ import { SiteFormStateService } from '@registration/shared/services/site-form-st
2423
import { CareSettingPageFormState } from './care-setting-page-form-state.class';
2524
import { NoContent } from '@core/resources/abstract-resource';
2625
import { IStep } from '@shared/components/progress-indicator/progress-indicator.component';
27-
import { DialogOptions } from '@shared/components/dialogs/dialog-options.model';
28-
import { ConfirmDialogComponent } from '@shared/components/dialogs/confirm-dialog/confirm-dialog.component';
2926

3027
@UntilDestroy()
3128
@Component({
@@ -173,42 +170,15 @@ export class CareSettingPageComponent extends AbstractCommunitySiteRegistrationP
173170
}
174171

175172
protected submissionRequest(): NoContent {
176-
177-
const sitePayload = this.siteFormStateService.json;
178-
const request$ = this.siteResource.updateSite(sitePayload);
179-
180-
181-
if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE
182-
&& this.vendorConfig.find(v => v.code === this.formState.vendorCode.value).name === 'CareConnect'
183-
) {
184-
const data: DialogOptions = {
185-
title: 'Confirmation',
186-
message: `I confirm I have contacted CareConnect.`,
187-
actionText: 'Yes, I\'ve contacted CareConnect',
188-
actionType: 'warn'
189-
};
190-
191-
return this.dialog.open(ConfirmDialogComponent, { data })
192-
.afterClosed()
193-
.pipe(
194-
exhaustMap((confirmation: boolean) => {
195-
if (confirmation) {
196-
this.siteFormStateService.businessLicenceFormState.resetSiteId();
197-
return request$;
198-
}
199-
return EMPTY;
200-
})
201-
);
202-
} else {
203-
if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE) {
204-
this.siteFormStateService.businessLicenceFormState.resetSiteId();
205-
}
206-
if (this.formState.json.careSettingCode !== CareSettingEnum.DEVICE_PROVIDER) {
207-
this.siteFormStateService.deviceProviderFormState.clearIndividualDeviceProviders();
208-
}
173+
if (this.formState.json.careSettingCode !== CareSettingEnum.DEVICE_PROVIDER) {
174+
this.siteFormStateService.deviceProviderFormState.clearIndividualDeviceProviders();
175+
}
176+
if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE) {
177+
this.siteFormStateService.businessLicenceFormState.resetSiteId();
209178
}
210179

211-
return request$;
180+
const payload = this.siteFormStateService.json;
181+
return this.siteResource.updateSite(payload);
212182
}
213183

214184
protected onSubmitFormIsValid(): void {

prime-angular-frontend/src/app/shared/components/auth/prime-enrolment-access/prime-enrolment-access.component.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,7 @@
108108
<div class="mid-content">
109109
<div class="mt1">Site registration for:</div>
110110
<div class="button_title">
111-
- Private community health practice
112-
<div class="warning-text">*Before starting a new site registration with CareConnect as the vendor, contact
113-
CareConnect at [email protected]
114-
</div>
111+
- Private community health practice<br/>
115112
- Community pharmacy<br/>
116113
- Device providers
117114
</div>

prime-angular-frontend/src/app/shared/components/auth/prime-enrolment-access/prime-enrolment-access.component.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,3 @@ a.tab-link:visited {
150150
.mat-select-value {
151151
color: #ffffff !important;
152152
}
153-
154-
.warning-text {
155-
color: orangered;
156-
font-size: 1.25rem;
157-
}

prime-angular-frontend/src/app/shared/components/forms/college-certification-form/college-certification-form.component.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export class CollegeCertificationFormComponent implements OnInit {
2828
@Input() public index: number;
2929
@Input() public total: number;
3030
@Input() public selectedColleges: number[];
31+
@Input() public selectedLicenses: number[];
3132
@Input() public collegeFilterPredicate: (collegeConfig: CollegeConfig) => boolean;
3233
@Input() public licenceFilterPredicate: (licenceConfig: LicenseConfig) => boolean;
3334
@Input() public condensed: boolean;
@@ -63,6 +64,13 @@ export class CollegeCertificationFormComponent implements OnInit {
6364

6465
public licenseGrouping = LicenseGrouping;
6566

67+
/**
68+
* 21 - College of Health and Care Professionals of BC
69+
* 22 - College of Complementary Health Professionals of BC
70+
*/
71+
public allowDupAmalgamatedColleges: number[] =
72+
[CollegeLicenceClassEnum.HealthCareProfessionals, CollegeLicenceClassEnum.ComplementaryHealthProfessionals];
73+
6674
constructor(
6775
private configService: ConfigService,
6876
private viewportService: ViewportService,
@@ -134,7 +142,11 @@ export class CollegeCertificationFormComponent implements OnInit {
134142
}
135143

136144
public getGrouping(collegeCode: string): CollegeLicenseGroupingConfig[] {
137-
let groupingCodes = this.colleges.find((c) => c.code === +collegeCode).collegeLicenses.map((l) => l.collegeLicenseGroupingCode);
145+
const college = this.colleges.find((c) => c.code === +collegeCode);
146+
const selectedGroupCodes = college.collegeLicenses
147+
.filter((l) => this.selectedLicenses.includes(l.licenseCode) && l.licenseCode !== this.licenseCode.value).map((l) => l.collegeLicenseGroupingCode);
148+
const groupingCodes = college.collegeLicenses.filter((l) => !selectedGroupCodes.includes(l.collegeLicenseGroupingCode))
149+
.map((l) => l.collegeLicenseGroupingCode);
138150
return this.licenseGroups.filter((g) => groupingCodes.some((gc) => gc === g.code));
139151
}
140152

@@ -149,7 +161,7 @@ export class CollegeCertificationFormComponent implements OnInit {
149161
public get filteredColleges(): CollegeConfig[] {
150162
return this.colleges.filter((college: CollegeConfig) =>
151163
// Allow the currently chosen value to persist
152-
this.collegeCode.value === college.code || !this.selectedColleges?.includes(college.code)
164+
this.collegeCode.value === college.code || !this.selectedColleges?.includes(college.code) || this.allowDupAmalgamatedColleges.includes(college.code)
153165
);
154166
}
155167

prime-dotnet-webapi/Configuration/Database/Seeded Tables/CollegeLicenseConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public override IEnumerable<CollegeLicense> SeedData
5656
new CollegeLicense { CollegeCode = 2, LicenseCode = 30 },
5757
new CollegeLicense { CollegeCode = 2, LicenseCode = 31 },
5858
new CollegeLicense { CollegeCode = 2, LicenseCode = 68 },
59+
new CollegeLicense { CollegeCode = 2, LicenseCode = 178 },
5960

6061
// Nurses
6162
new CollegeLicense { CollegeCode = 3, LicenseCode = 32, CollegeLicenseGroupingCode = 2 },

prime-dotnet-webapi/Configuration/Database/Seeded Tables/LicenseConfiguration.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ public override IEnumerable<License> SeedData
4747
new License { Code = 67, Weight = 34, Name = "Conditional - Podiatric Surgeon Disciplined" },
4848

4949
// Pharmacy
50-
new License { Code = 25, Weight = 1, Name = "Full Pharmacist" },
51-
new License { Code = 26, Weight = 2, Name = "Limited Pharmacist" },
52-
new License { Code = 28, Weight = 3, Name = "Student Pharmacist" },
53-
new License { Code = 27, Weight = 4, Name = "Temporary Pharmacist" },
54-
new License { Code = 30, Weight = 5, Name = "Non-Practicing Pharmacist" },
55-
new License { Code = 29, Weight = 6, Name = "Pharmacy Technician" },
56-
new License { Code = 31, Weight = 7, Name = "Non-Practicing Pharmacy Technician" },
57-
new License { Code = 68, Weight = 8, Name = "Temporary Pharmacy Technician" },
50+
new License { Code = 25, Weight = 10, Name = "Full Pharmacist" },
51+
new License { Code = 26, Weight = 20, Name = "Limited Pharmacist" },
52+
new License { Code = 28, Weight = 30, Name = "Student Pharmacist" },
53+
new License { Code = 27, Weight = 40, Name = "Temporary Pharmacist" },
54+
new License { Code = 178, Weight = 45, Name = "Temporary Limited Pharmacist" },
55+
new License { Code = 30, Weight = 50, Name = "Non-Practicing Pharmacist" },
56+
new License { Code = 29, Weight = 60, Name = "Pharmacy Technician" },
57+
new License { Code = 31, Weight = 70, Name = "Non-Practicing Pharmacy Technician" },
58+
new License { Code = 68, Weight = 80, Name = "Temporary Pharmacy Technician" },
5859

5960
// Nursing
6061
new License { Code = 47, Weight = 1, Name = "Practicing Nurse Practitioner" },

0 commit comments

Comments
 (0)