-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2001 - Changes to handle PD PPD Part 1 #2115
Conversation
ALTER TABLE | ||
sims.students | ||
ADD | ||
COLUMN IF NOT EXISTS pd_status sims.permanent_disability_status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope that it will not open a can of worms about naming possibilities 😉
I believe that the acronyms for PD/PPD mean
- PPD: Persistent or Prolonged Disability
- PD: Permanent Disability
With the above in mind I believe that instead ofpermanent_disability_status
it should be onlydisability_status
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per discussion with the dev team, we decided to use disability status instead of permanent disability status and try to change the existing code as much as possible.
@@ -122,3 +122,8 @@ export const DUPLICATE_SABC_CODE = "DUPLICATE_SABC_CODE"; | |||
* Institution location not valid. | |||
*/ | |||
export const INSTITUTION_LOCATION_NOT_VALID = "INSTITUTION_LOCATION_NOT_VALID"; | |||
|
|||
/** | |||
* Request for permanent disability not allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requests are no longer specifically for permanent disability.
) { | ||
throw new UnprocessableEntityException( | ||
"Either the client does not have a validated SIN or the request was already sent to ATBC.", | ||
new ApiProcessError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
) { | ||
throw new UnprocessableEntityException( | ||
"Either the client does not have a validated SIN or the request was already sent to ATBC.", | ||
new ApiProcessError( | ||
"Either SIN validation is not complete or requested for PD already.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we can have it adjusted to PD/PPD for now.
@@ -0,0 +1,10 @@ | |||
/** | |||
* Permanent disability status of student. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is SIMS used to be named using PD as permanent disability which is no longer true with the inclusion of PPD.
I would say that we need to reinforce it for the new things and try to adjust the current ones as possible.
As a suggestion, I would remove the "Permanent" from the comment and name the below enum as DisabilityStatus
.
snackBar.error( | ||
"An error happened during the apply PD process. Please try after sometime.", | ||
"Unexpected error while applying for PD. Please try after sometime.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change PD to PD/PPD?
sources/packages/backend/apps/api/src/route-controllers/atbc/atbc.students.controller.ts
Outdated
Show resolved
Hide resolved
@@ -306,7 +306,7 @@ describe("ApplicationOfferingChangeRequestInstitutionsController(e2e)-getComplet | |||
|
|||
const searchKeyword = "TestStudent"; | |||
const endpoint = `/institutions/location/${collegeFLocation.id}/application-offering-change-request/completed?page=0&pageLimit=10&searchCriteria=${searchKeyword}`; | |||
console.log(endpoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -62,7 +62,7 @@ describe("StudentInstitutionsController(e2e)-getStudentProfile", () => { | |||
}, | |||
phone: student.contactInfo.phone, | |||
}, | |||
pdStatus: determinePDStatus(student), | |||
pdStatus: student.pdStatus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
// studentPDVerified is true if PD confirmed by ATBC or is true from sfas_individual table. | ||
// studentPDVerified is false if PD denied by ATBC. | ||
// To apply for a PD, SIN validation must be completed for the student and | ||
// not applied for PD already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dheepak-aot , can you confirm this? In our grooming, I remember saying that the student can apply for PD multiple times, especially for the PPD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bring this up.
I had a quick chat with @JasonCTang on the same and got to know that, as per the current understanding, student requests disability status only once in our application. In case they want to apply again because of something happened to them later after losing their status, they update ATBC directly and ATBC will be updating the student disability status which we read on daily basis through their response API.
I will update this information to the ticket.
Let me know if it is still not clear. We can talk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dheepak-aot for the details. Ya, adding it to the ticket will make it easier for future development. Keeping it open for other devs
sources/packages/backend/apps/api/src/route-controllers/atbc/atbc.students.controller.ts
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/services/student/student.service.ts
Show resolved
Hide resolved
sources/packages/backend/apps/api/src/services/student/student.service.ts
Outdated
Show resolved
Hide resolved
...ges/backend/apps/db-migrations/src/migrations/1689350242512-AddStudentDisabilityStatusCol.ts
Outdated
Show resolved
Hide resolved
sources/packages/backend/libs/sims-db/src/entities/student.model.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments
AND pd_date_sent IS NOT NULL THEN 'Requested' | ||
WHEN pd_verified = true THEN 'PD' | ||
WHEN pd_verified = false THEN 'Declined' | ||
ELSE 'Not requested' :: sims.disability_status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this update is written for the existing data in Test, but is there a chance that any PDs can be PPDs? are we considering any update in the existing data update from ATBC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no PPD in our system so far so we cannot do anything in the query about it.
If a student is PPD, ATBC response will be read and updated in our system.
auditUser: User, | ||
): Promise<UpdateResult> { | ||
const now = new Date(); | ||
return this.repo.update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @dheepak-aot 👍
@@ -15,6 +15,8 @@ export class CreateStudentAPIInDTO extends AddressDetailsFormAPIDTO { | |||
sinNumber: string; | |||
@Expose() | |||
gender: string; | |||
@Expose() | |||
sinConsent: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @dheepak-aot. thanks for doing the changes, wava fix as well as the label changes 👍
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Nice work @dheepak-aot
System changes to handle PD PPD
permanent_disability_status
and add columnpd_status
to student table. Updated the entity model and created enum PDStatus.Student Profile:
Student Application:
The existing
pd_verified
column is kept as is to avoid workflow changes as per the story.Student profile form definition updated to check for value
Not requested
instead ofNot Requested
to display theApply for PD Status
buttonWhen "apply to PD status" is not allowed due to SIN validation is not complete or already applied for PD status, code changes are made to display the appropriate error message to the toast.
To be done in upcoming PR