Skip to content

Commit 00c19b9

Browse files
committed
Add documentation on managing teams
This adds some information on how to manage teams, specifically explaining the use of the new command line tools that have been built to support flu. Jira-Issue: MAV-1293
1 parent b66fb90 commit 00c19b9

3 files changed

Lines changed: 93 additions & 52 deletions

File tree

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Gets locations held by the service.
3535

3636
### Body
3737

38-
See [onboarding documentation](onboarding.md).
38+
See [onboarding documentation](managing-teams.md).
3939

4040
## `DELETE /organisations/:ods_code`
4141

docs/managing-teams.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Managing teams
2+
3+
Each SAIS team in Mavis will have their own set of schools, programmes they administer, and in some cases which schools they administer the programmes to and in which year groups.
4+
5+
## Onboarding for the first time
6+
7+
When first onboarding a new SAIS team, there’s a lot of information to include about it. The process involves creating a YAML file containing all the information about the organisation and using the `onboard` Rake task to add everything in to the service.
8+
9+
### Configuration file structure
10+
11+
```yaml
12+
organisation:
13+
name: # Unique name of the organisation
14+
email: # Contact email address
15+
phone: # Contact phone number
16+
ods_code: # Unique ODS code
17+
careplus_venue_code: # Venue code used in CarePlus exports
18+
privacy_notice_url: # URL of a privacy notice shown to parents
19+
privacy_policy_url: # URL of a privacy policy shown to parents
20+
reply_to_id: # Optional GOV.UK Notify Reply-To UUID
21+
22+
programmes: [] # A list of programmes (flu, hpv, menacwy, td_ipv)
23+
24+
teams:
25+
team1: # Identifier to link team with school and links below, not used in app
26+
name: # Name of the team
27+
email: # Contact email address
28+
phone: # Contact phone number
29+
reply_to_id: # Optional GOV.UK Notify Reply-To UUID
30+
31+
schools:
32+
team1: [] # URNs managed by a particular team
33+
34+
clinics:
35+
team1:
36+
- name: # Name of the clinic
37+
address_line_1: # First line of the address
38+
address_town: # Town of the address
39+
address_postcode: # Postcode of the address
40+
ods_code: # Unique ODS code
41+
```
42+
43+
[Example configuration files can be found in the repo][config-onboarding].
44+
45+
[config-onboarding]: /config/onboarding
46+
47+
### Rake task
48+
49+
Once the file has been written you can use the `onboard` Rake task to set everything up in the service.
50+
51+
```sh
52+
$ bundle exec rails onboard[path/to/configuration.yaml]
53+
```
54+
55+
If any validation errors are detected in the file they will be output and nothing will be processed, only if the file is completely valid will anything be processed.
56+
57+
## After onboarding
58+
59+
Once a team has been onboarding, the YAML configuration file can be deleted as it won’t be used again. Instead, a number of command line tools are provided for managing the team.
60+
61+
### Adding new schools to an organisation
62+
63+
The command `schools add-to-organisation` is provided to add new schools to an existing organisation.
64+
65+
```sh
66+
$ bin/mavis schools add-to-organisation ODS_CODE TEAM URNS
67+
```
68+
69+
- `ODS_CODE` refers to the ODS code of the organisation
70+
- `TEAM` refers to the name of the team in the organisation
71+
- `URNS` are the URNs of the schools to add
72+
73+
Optionally, it's also possible to customise which programmes are administered at a particular school:
74+
75+
```sh
76+
$ bin/mavis schools add-to-organisation ODS_CODE TEAM URNS --programmes VALUE1,VALUE2,...
77+
```
78+
79+
### Changing administered year groups of a school
80+
81+
Some SAIS teams will administer certain programmes to certain schools outside the normal year groups. For example, flu is often given at special education needs schools in years 12 and 13.
82+
83+
To modify the year groups per programme per school, the follow two commands are provided:
84+
85+
```sh
86+
$ bin/mavis schools add-programme-year-group URN PROGRAMME_TYPE YEAR_GROUPS
87+
$ bin/mavis schools remove-programme-year-group URN PROGRAMME_TYPE YEAR_GROUPS
88+
```
89+
90+
- `URN` refers to the URN of the school to edit
91+
- `PROGRAMME_TYPE` refers to the programme being edited
92+
- `YEAR_GROUPS` are the year groups to add or remove

docs/onboarding.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)