|
| 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 |
0 commit comments