Skip to content

Commit

Permalink
Merge branch 'develop' into feature/prime-2750_ha_site_list_enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
bergomi02 authored Jun 28, 2024
2 parents 918340c + 0c1f2f5 commit 14e8875
Show file tree
Hide file tree
Showing 14 changed files with 26,146 additions and 2,526 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ <h6 class="mb-0">
<ng-container #alertContent
class="alert-content">
Your enrolment contains an error that will need to be updated before submission.
<ul class="mt-3 mb-1"
*ngIf="requireLicenceUpdate()">
<li>
College licence information requires update
</li>
</ul>
</ng-container>
</app-alert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export class OverviewComponent extends BaseEnrolmentPage implements OnInit {
return (this.enrolmentErrors) ? Object.values(this.enrolmentErrors).some(value => value) : false;
}

public requireLicenceUpdate(): boolean {
return (this.enrolmentErrors) ? this.enrolmentErrors.requiresLicenceUpdate : false;
}

public ngOnInit(): void {
this.isMatchingPaperEnrollee = this.enrolmentService.isMatchingPaperEnrollee;
this.authService.getUser$()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@
</app-enrollee-property>

<app-enrollee-property [hasError]="enrolmentErrors?.requiresLicenceUpdate"
errorMessage="Licence class requires update."
errorMessage="College licence information requires update."
title="Licence Class">
{{ getLicenceClassCategory(certification) }}
{{ certification.licenseCode | configCode: 'licenses' | default }}
</app-enrollee-property>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { RemoteAccessLocation } from '@enrolment/shared/models/remote-access-loc
import { EnrolmentService } from '@enrolment/shared/services/enrolment.service';
import { UnlistedCertification } from '@paper-enrolment/shared/models/unlisted-certification.model';
import { EnrolleeDeviceProvider } from '@shared/models/enrollee-device-provider.model';
import { ConfigService } from '@config/config.service';

@Component({
selector: 'app-enrollee-review',
Expand All @@ -38,7 +39,8 @@ export class EnrolleeReviewComponent {

constructor(
private authService: AuthService,
private enrolmentService: EnrolmentService
private enrolmentService: EnrolmentService,
private configService: ConfigService,
) {
this.showEditRedirect = false;
this.admin = false;
Expand Down Expand Up @@ -118,6 +120,16 @@ export class EnrolleeReviewComponent {
return (healthAuthorities?.length) ? healthAuthorities : [];
}

public getLicenceClassCategory(certification: CollegeCertification): string {
let grouping = this.configService.licenses.find(l => l.code === certification.licenseCode).collegeLicenses.map(cl => cl.collegeLicenseGroupingCode);

if (grouping && grouping.length > 0 && grouping[0]) {
return `${this.configService.collegeLicenseGroupings.find(g => g.code === grouping[0]).name} - `;
} else {
return '';
}
}

public get isRequestingRemoteAccess(): boolean {
return (this.enrolment && !!this.enrolment.enrolleeRemoteUsers?.length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CollegeLicenceClassEnum } from '@shared/enums/college-licence-class.enu
import { PrescriberIdTypeEnum } from '@shared/enums/prescriber-id-type.enum';
import { CollegeCertification } from '@enrolment/shared/models/college-certification.model';
import { EnrolmentService } from '@enrolment/shared/services/enrolment.service';
import { NurseGrouping } from '@shared/enums/college-licence-grouping.enum';

@Component({
selector: 'app-college-certification-form',
Expand Down Expand Up @@ -60,6 +61,8 @@ export class CollegeCertificationFormComponent implements OnInit {
public CollegeLicenceClassEnum = CollegeLicenceClassEnum;
public PrescriberIdTypeEnum = PrescriberIdTypeEnum;

public nurseGrouping = NurseGrouping;

constructor(
private configService: ConfigService,
private viewportService: ViewportService,
Expand Down Expand Up @@ -172,7 +175,7 @@ export class CollegeCertificationFormComponent implements OnInit {
}

public showLicenceClass(): boolean {
return this.filteredLicenses.some(l => l.name !== 'Not Displayed');
return this.filteredLicenses && this.filteredLicenses.some(l => l.name !== 'Not Displayed');
}

/**
Expand Down Expand Up @@ -232,7 +235,9 @@ export class CollegeCertificationFormComponent implements OnInit {
)
)
.subscribe((collegeLicenseGroupingCode: number) => {
this.setNursingCategoryValidators();
if (this.nurseGrouping.some(g => g === collegeLicenseGroupingCode)) {
this.setNursingCategoryValidators();
}
this.loadLicensesByCategory(collegeLicenseGroupingCode);
});
} else {
Expand All @@ -253,6 +258,7 @@ export class CollegeCertificationFormComponent implements OnInit {
}
}


private setCollegeCertification(collegeCode: number): void {
if (!collegeCode) {
this.removeValidations();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export enum CollegeLicenceGroupingEnum {
LPN = 1,
RN = 2,
RPN = 3,
NP = 4,
MW = 5,
}

export const NurseGrouping: number[] = [
CollegeLicenceGroupingEnum.LPN,
CollegeLicenceGroupingEnum.RN,
CollegeLicenceGroupingEnum.RPN,
CollegeLicenceGroupingEnum.NP,
CollegeLicenceGroupingEnum.MW
]


Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,28 @@ public override IEnumerable<College> SeedData
new College { Code = 17, Name = "College of Speech and Hearing Health Professionals of BC", Weight = 160 },
new College { Code = 18, Name = "College of Traditional Chinese Medicine Practitioners and Acupuncturists of BC", Weight = 170 },
new College { Code = 19, Name = "BC College of Social Workers", Weight = 180 },
new College { Code = 20, Name = "BC College of Oral Health Professionals", Weight = 40 }
new College { Code = 20, Name = "BC College of Oral Health Professionals", Weight = 40 },

/*
College of Health and Care Professionals of BC is replacing the following colleges:
College of Dietitians of BC
College of Occupational Therapists of BC
College of Optometrists of BC
College of Opticians of BC
College of Physical Therapists of BC
College of Psychologists of BC
College of Speech and Hearing Health Professionals of BC
*/
new College { Code = 21, Name = "College of Health and Care Professionals of BC", Weight = 70 },

/*
College of Complementary Health Professionals of British Columbia is replacing the following colleges:
College of Chiropractors of BC
College of Massage Therapists of BC
College of Naturopathic Physicians of BC
College of Traditional Chinese Medicine Practitioners and Acupuncturists of BC
*/
new College { Code = 22, Name = "College of Complementary Health Professionals of BC", Weight = 50 }
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,31 @@ public override IEnumerable<CollegeLicense> SeedData
new CollegeLicense { CollegeCode = 7, LicenseCode = 77, Discontinued = true },

// College of Naturopathic Physicians of BC
new CollegeLicense { CollegeCode = 11, LicenseCode = 78 },
new CollegeLicense { CollegeCode = 11, LicenseCode = 79 },
new CollegeLicense { CollegeCode = 11, LicenseCode = 80 },
new CollegeLicense { CollegeCode = 11, LicenseCode = 81 },
new CollegeLicense { CollegeCode = 11, LicenseCode = 78, Discontinued = true },
new CollegeLicense { CollegeCode = 11, LicenseCode = 79, Discontinued = true },
new CollegeLicense { CollegeCode = 11, LicenseCode = 80, Discontinued = true },
new CollegeLicense { CollegeCode = 11, LicenseCode = 81, Discontinued = true },

// College of Optometrists of BC
new CollegeLicense { CollegeCode = 14, LicenseCode = 71 },
new CollegeLicense { CollegeCode = 14, LicenseCode = 72 },
new CollegeLicense { CollegeCode = 14, LicenseCode = 73 },
new CollegeLicense { CollegeCode = 14, LicenseCode = 74 },
new CollegeLicense { CollegeCode = 14, LicenseCode = 71, Discontinued = true },
new CollegeLicense { CollegeCode = 14, LicenseCode = 72, Discontinued = true },
new CollegeLicense { CollegeCode = 14, LicenseCode = 73, Discontinued = true },
new CollegeLicense { CollegeCode = 14, LicenseCode = 74, Discontinued = true },

// All other colleges are assigned the "Not Displayed" Licence
new CollegeLicense { CollegeCode = 4, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 4, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 5, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 6, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 8, LicenseCode = 64, Discontinued = true },

new CollegeLicense { CollegeCode = 9, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 10, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 12, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 13, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 15, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 16, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 17, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 18, LicenseCode = 64 },
new CollegeLicense { CollegeCode = 9, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 10, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 12, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 13, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 15, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 16, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 17, LicenseCode = 64, Discontinued = true },
new CollegeLicense { CollegeCode = 18, LicenseCode = 64, Discontinued = true },

//BC College of Social Workers
new CollegeLicense { CollegeCode = 19, LicenseCode = 82 },
Expand Down Expand Up @@ -160,6 +160,80 @@ public override IEnumerable<CollegeLicense> SeedData
new CollegeLicense { CollegeCode = 20, LicenseCode = 117, CollegeLicenseGroupingCode = 11 },
new CollegeLicense { CollegeCode = 20, LicenseCode = 118, CollegeLicenseGroupingCode = 11 },
new CollegeLicense { CollegeCode = 20, LicenseCode = 119, CollegeLicenseGroupingCode = 11 },


//College of Health and Care Professionals of BC
//Dietetics
new CollegeLicense { CollegeCode = 21, LicenseCode = 120, CollegeLicenseGroupingCode = 12},
new CollegeLicense { CollegeCode = 21, LicenseCode = 121, CollegeLicenseGroupingCode = 12},
new CollegeLicense { CollegeCode = 21, LicenseCode = 122, CollegeLicenseGroupingCode = 12},
new CollegeLicense { CollegeCode = 21, LicenseCode = 123, CollegeLicenseGroupingCode = 12},
//Occupational Therapy
new CollegeLicense { CollegeCode = 21, LicenseCode = 124, CollegeLicenseGroupingCode = 13},
new CollegeLicense { CollegeCode = 21, LicenseCode = 125, CollegeLicenseGroupingCode = 13},
new CollegeLicense { CollegeCode = 21, LicenseCode = 126, CollegeLicenseGroupingCode = 13},
new CollegeLicense { CollegeCode = 21, LicenseCode = 127, CollegeLicenseGroupingCode = 13},
//Opticianry
new CollegeLicense { CollegeCode = 21, LicenseCode = 128, CollegeLicenseGroupingCode = 14},
new CollegeLicense { CollegeCode = 21, LicenseCode = 129, CollegeLicenseGroupingCode = 14},
new CollegeLicense { CollegeCode = 21, LicenseCode = 130, CollegeLicenseGroupingCode = 14},
new CollegeLicense { CollegeCode = 21, LicenseCode = 131, CollegeLicenseGroupingCode = 14},
//Optometry
new CollegeLicense { CollegeCode = 21, LicenseCode = 132, CollegeLicenseGroupingCode = 15},
new CollegeLicense { CollegeCode = 21, LicenseCode = 133, CollegeLicenseGroupingCode = 15},
new CollegeLicense { CollegeCode = 21, LicenseCode = 134, CollegeLicenseGroupingCode = 15},
new CollegeLicense { CollegeCode = 21, LicenseCode = 135, CollegeLicenseGroupingCode = 15},
new CollegeLicense { CollegeCode = 21, LicenseCode = 136, CollegeLicenseGroupingCode = 15},
//Physical Therapy
new CollegeLicense { CollegeCode = 21, LicenseCode = 137, CollegeLicenseGroupingCode = 16},
new CollegeLicense { CollegeCode = 21, LicenseCode = 138, CollegeLicenseGroupingCode = 16},
new CollegeLicense { CollegeCode = 21, LicenseCode = 139, CollegeLicenseGroupingCode = 16},
//Psychology
new CollegeLicense { CollegeCode = 21, LicenseCode = 140, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 141, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 142, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 143, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 144, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 145, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 146, CollegeLicenseGroupingCode = 17},
new CollegeLicense { CollegeCode = 21, LicenseCode = 147, CollegeLicenseGroupingCode = 17},
//Audiology
new CollegeLicense { CollegeCode = 21, LicenseCode = 148, CollegeLicenseGroupingCode = 18},
new CollegeLicense { CollegeCode = 21, LicenseCode = 149, CollegeLicenseGroupingCode = 18},
new CollegeLicense { CollegeCode = 21, LicenseCode = 150, CollegeLicenseGroupingCode = 18},
new CollegeLicense { CollegeCode = 21, LicenseCode = 151, CollegeLicenseGroupingCode = 18},
//Hearing Instrument Dispensing
new CollegeLicense { CollegeCode = 21, LicenseCode = 152, CollegeLicenseGroupingCode = 19},
new CollegeLicense { CollegeCode = 21, LicenseCode = 153, CollegeLicenseGroupingCode = 19},
new CollegeLicense { CollegeCode = 21, LicenseCode = 154, CollegeLicenseGroupingCode = 19},
new CollegeLicense { CollegeCode = 21, LicenseCode = 155, CollegeLicenseGroupingCode = 19},
//Speech-Language Pathology
new CollegeLicense { CollegeCode = 21, LicenseCode = 156, CollegeLicenseGroupingCode = 20},
new CollegeLicense { CollegeCode = 21, LicenseCode = 157, CollegeLicenseGroupingCode = 20},
new CollegeLicense { CollegeCode = 21, LicenseCode = 158, CollegeLicenseGroupingCode = 20},
new CollegeLicense { CollegeCode = 21, LicenseCode = 159, CollegeLicenseGroupingCode = 20},

//College of Complementary Health Professionals of BC
//Chiropractic
new CollegeLicense { CollegeCode = 22, LicenseCode = 160, CollegeLicenseGroupingCode = 21},
new CollegeLicense { CollegeCode = 22, LicenseCode = 161, CollegeLicenseGroupingCode = 21},
new CollegeLicense { CollegeCode = 22, LicenseCode = 162, CollegeLicenseGroupingCode = 21},
new CollegeLicense { CollegeCode = 22, LicenseCode = 163, CollegeLicenseGroupingCode = 21},
//Massage Therapy
new CollegeLicense { CollegeCode = 22, LicenseCode = 164, CollegeLicenseGroupingCode = 22},
new CollegeLicense { CollegeCode = 22, LicenseCode = 165, CollegeLicenseGroupingCode = 22},
//Naturopathic Medicine
new CollegeLicense { CollegeCode = 22, LicenseCode = 166, CollegeLicenseGroupingCode = 23},
new CollegeLicense { CollegeCode = 22, LicenseCode = 167, CollegeLicenseGroupingCode = 23},
new CollegeLicense { CollegeCode = 22, LicenseCode = 168, CollegeLicenseGroupingCode = 23},
new CollegeLicense { CollegeCode = 22, LicenseCode = 169, CollegeLicenseGroupingCode = 23},
//Traditional Chinese Medicine and Acupuncture
new CollegeLicense { CollegeCode = 22, LicenseCode = 170, CollegeLicenseGroupingCode = 24},
new CollegeLicense { CollegeCode = 22, LicenseCode = 171, CollegeLicenseGroupingCode = 24},
new CollegeLicense { CollegeCode = 22, LicenseCode = 172, CollegeLicenseGroupingCode = 24},
new CollegeLicense { CollegeCode = 22, LicenseCode = 173, CollegeLicenseGroupingCode = 24},
new CollegeLicense { CollegeCode = 22, LicenseCode = 174, CollegeLicenseGroupingCode = 24},

};
}
}
Expand Down
Loading

0 comments on commit 14e8875

Please sign in to comment.