Institution Program Restrictions: Suspension (UI - add and display restriction)
As a Ministry User I want to be able to add and resolve Suspension Restrictions to Institution Program So That I can temporarily suspend a program. Use case: PTIB suspends a program but not a Location or an Institution. In this case Ministry does not want to allow any new offerings. No new applications will be allowed. Already existing applications will require Ministry review. If money were disbursed, no action.
Scope of this ticket:
UI to add the restriction, UI for displaying restriction in Restrictions table
Things to consider:
We will be building
- [program+location] restrictions known as "Program restriction" AND
- restrictions that should be applied to location known as "Location restriction". Make sure we can accommodate both scenarios in the near future.
Acceptance Criteria
UI to apply [ program + location] restriction:
-
[ ] Create provincial [program+location] restriction SUS that Can be applied to a specific program within One Location or to the specific program across ALL Locations
-
[ ] When Ministry clicks "Add restriction" Button on Institution Restrictions Page, display the pop-up screen. This form will be dynamic in the future based on Reason, allowing to restrict Location and Institution.
Reason: SUS - program suspended Program - allow to search for a program within selected location. Allow to choose one program. Only display Active Programs. Location - drop-down list with all locations within an Institution. Allow to choose one to all locations.
Notes
- [ ] All fields are mandatory fields. If User clicks "Add restriction" and the data in one of the mandatory fields is missing, display a standard warning message.
- [ ] Once user clicks "Add restriction", display green Toast message Restriction was successfully added
- [ ] Save Notes into Notes section
- [ ] Keycloak: institution-add-restriction should be available to ServiceDelivery-Limited and ServiceDelivery-Full groups (i believe, group already exists, not DEV task)
Display restriction on Ministry portal
- [ ] Display data about added restriction in the Restriction Table. Add Location and Program Columns, remove Category. Add View Button. Allow to sort on Location and Program
- [ ] Reason: If SUS - display "Suspension"
- [ ] Display the restricted program in Restrictions table
- [ ] If restriction was applied to specific program for multiple locations, display each line separately

Additional considerations for business: Suspension: in some cases IPDT restricts program across all locations at once (program does not meet requirements), in other cases IPDT restricts program only in one location (for example, instructor is not qualified).
QA NOTES:
- Test different roles: Service Delivery-Limited and Service Delivery-Full group
@AnnaPBashkatova, when comparing the type of data that we have for student restrictions, would it be fair to assume the data in the columns below would not be required for institutions?
Assuming the data is not required, can we have some default values for these columns to allow reusing the same structure?
The data that we would need for the institution's restrictions would likely be the below.
- restriction_code
- description
- action_type
Analysis
Plan A (preferred)
- Reuse the existing table
sims.restrictions. - NOT NULL columns not required for institution restrictions can receive some default values meaningful for institutions, for instance,
restriction_categorycan be saved as "Institution". - Expand
restriction_types(Federal,Provincial) to includeInstitution. - Share the same
actions_types. - Adapt Ministry UI and any other UI consuming the categories.
- Drop and create the table to allow better column organization, since the table can be dropped at this moment.
Suggested changes for existing tables
sims.institution_restrictions
DROP TABLE sims.institution_restrictions;
CREATE TABLE sims.institution_restrictions(
id SERIAL PRIMARY KEY,
institution_id INT NOT NULL REFERENCES sims.institutions(id),
location_id INT NULL REFERENCES sims.institution_locations(id),
program_id INT NULL REFERENCES sims.education_programs(id),
restriction_id INT NOT NULL REFERENCES sims.restrictions(id),
restriction_note_id INT NOT NULL REFERENCES sims.notes(id),
resolution_note_id INT REFERENCES sims.notes(id),
resolved_at TIMESTAMP WITH TIME ZONE NULL,
resolved_by INT NULL DEFAULT NULL REFERENCES sims.users(id),
is_active BOOLEAN NOT NULL,
-- Audit columns
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
creator INT NOT NULL REFERENCES sims.users(id),
modifier INT NULL DEFAULT NULL REFERENCES sims.users(id)
);
Plan B
Suggested changes for existing and new tables
sims.institution_restrictions
sims.institution_restrictionstable is not used currently. It would be recreated to be adapted to the new requirement.institution_id,location_id,program_idwould allow the future restrictions to be configured at different scopes.institution_idshould be mandatory since it will always be possible to have an association.- No
deletefunctionality present in the requirement so far.
DROP TABLE sims.institution_restrictions;
CREATE TABLE sims.institution_restrictions(
id SERIAL PRIMARY KEY,
institution_id INT NOT NULL REFERENCES sims.institutions(id),
location_id INT NULL REFERENCES sims.institution_locations(id),
program_id INT NULL REFERENCES sims.education_programs_offerings(id),
restriction_reason_id INT NOT NULL REFERENCES sims.institution_restriction_reasons(id),
restriction_note_id INT NOT NULL REFERENCES sims.notes(id),
resolution_note_id INT REFERENCES sims.notes(id),
is_active BOOLEAN NOT NULL,
-- Audit columns
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
creator INT NOT NULL REFERENCES sims.users(id),
modifier INT NULL DEFAULT NULL REFERENCES sims.users(id)
);
sims.institution_restriction_reasons
- Using the same table
sims.restrictionsdoes not seem a good approach due to the differences in the data required for the institutions. - Suggestion to call it "reasons" to differentiate from the students' related table
sims.restrictions.
CREATE TABLE sims.institution_restriction_reasons(
id SERIAL PRIMARY KEY,
description VARCHAR(250) NOT NULL,
action_type sims.restriction_reason_action_types [] NOT NULL,
-- Audit columns
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
sims.restriction_reason_action_types
- New action types to be created to contain only institution-specific actions.
CREATE TYPE sims.restriction_reason_action_types AS ENUM (
'No effect',
'Stop part-time disbursement',
'Stop full-time disbursement'
);
@andrewsignori-aot Good morning, Andrew. We definitely don't need Restriction type and Restriction category, but possibly need to keep Notification type as for some restrictions (like suspension) institution will be notified about restriction: Banner, etc. And for others, like fraud, there will be no warning or indication for Institution. Not sure if the plan is to manage it via Notification type. Happy to chat further.
@AnnaPBashkatova, I did not see any requirements about allowing institution restrictions to be deleted. Can we assume they will not have the deleted capability that the students' restrictions have?
@andrewsignori-aot Hi Andrew, i think it is fare to assume we will not need to have ability to "Delete" Institution restrictions at the moment. Ministry can always resolve them, no concerns.
@AnnaPBashkatova related to the programs to be displayed in the list, which status should we display? For instance, should we consider only approved and active programs?
The possible program statuses are: Approved, Pending, and Declined.
Program - allow to search for a program within selected location. Allow to choose one program. Only display Active Programs.
@andrewsignori-aot Good morning, Andrew. Yes please, let consider only Approved programs. Thank you,
@andrewsignori-aot Good morning, Andrew. Yes please, let consider only Approved programs. Thank you,
@AnnaPBashkatova, can you please convert it to an AC? Right now, it is just below the image.
@andrewsignori-aot
Good morning, Andrew. Done.
Please let me know if it works.

Anna
@andrewsignori-aot Good morning, Andrew. Done. Please let me know if it works.
Anna
The idea was to have a listed AC. The ACs should start with something like:
- [ ] Need to do something to accomplish a goal.
@AnnaPBashkatova, I did not find a specific AC for restriction resolution. It is mentioned at the beginning of the ticket, then it is no longer mentioned in the ticket scope or the ACs (as far as I could check). Was it expected to have the restrictions resolutions working by the end of this ticket?
@andrewsignori-aot Good morning, Andrew! Resolution is not in a scope of this ticket. There is separate ticket for resolution: https://app.zenhub.com/workspaces/student-information-management-system-5fce9df5aa1b45000e937014/issues/gh/bcgov/sims/5112 Also updated AC based on the feedback.
Anna
@AnnaPBashkatova, when selecting multiple locations and creating multiple restrictions, is it correct to assume they will all be associated with the same "Institution Note"? Below is the AC about adding notes.
Save Notes into Notes section
@andrewsignori-aot Hi Andrew, that is correct. I updated AC.
@AnnaPBashkatova does the below work for multi selection?
@andrewsignori-aot Hi Andrew, looks good. Made me think that we should only show designated locations.
@andrewsignori-aot Hi Andrew, looks good. Made me think that we should only show designated locations.
As far as I remember, we do not check for designation before generating the e-cert. If the idea is to stop any funds for a program, we should ensure that everything is blocked.
@AnnaPBashkatova, if they try to select a mix of institutions that already have active restrictions, the user would get a message like the one below.
@AnnaPBashkatova, updating the message to be generic as below, which still would work for this restriction and future possible configurations. If there is any other better sentence, please share.
At least one restriction is already active for the selected items.
Please add the below one to make it clear to QA.
- [ ] While adding restrictions, the system should not allow a duplicated restriction to be added. A warning toast notification should be displayed if any of the restrictions to be added is already active, preventing all restrictions from being added.
@andrewsignori-aot
As far as I remember, we do not check for designation before generating the e-cert. If the idea is to stop any funds for a program, we should ensure that everything is blocked.
Got it, good point. I agree. Like the Toast message. Thank you!
@AnnaPBashkatova, is there a problem displaying the "Reason" as below, adding the code to it following the same from the student restrictions?
@CarlyCotton @ninosamson Now that PrimeVue will be gone, we can start taking advantage of other Vuetify features like multi-sorting. See below the example where the table would be initialized, already displaying its sorting orders and allowing it to be modified. @AnnaPBashkatova do you see any issue with having multiple sorting enabled for this one?
@andrewsignori-aot Good morning, Andrew.
is there a problem displaying the "Reason" as below, adding the code to it following the same from the student restrictions?
No problem, please follow the student restrictions logic.
Do you see any issue with having multiple sorting enabled for this one?
Go for it!
@AnnaPBashkatova, after a technical decision, the table sorting will remain as planned initially. The ability for multiple sorting may be enabled in the future across the entire application.
@AnnaPBashkatova, question from devs during PR review: should the "Location" be renamed to "Locations" or "Location(s)"?
@andrewsignori-aot Hi Andrew, yes we can rename Location into Location(s), if you think it adds clarity. Thank you. Updated AC
@AnnaPBashkatova I am ok either way. Since there was a dev question I did the follow up. I will adjust as per the AC.
@andrewsignori-aot & @AnnaPBashkatova Moving back to In Progress from discussion on #5099 around the restriction category change.
@andrewsignori-aot Hi Andrew, added AC regarding restriction category. Thank you.
