Demo All names and records here are made up, and the data resets every night. Please do not enter real personal information. ← Back to Find Care Scotland software · All software
Care Core

Documentation › Administration › Moving from the older Staff, People and Team services

Moving from the older Staff, People and Team services

A step-by-step runbook, with what maps to what.

This is the runbook for moving everything from the older Staff Service, People Service and Team Service into Care Core. The three exporters read the old databases (read only) and write import files; Care Core then checks and imports them. Nothing in the old systems is changed.

What you need

  • Shell access to a machine that can reach the old databases and has this Care Core code (your laptop or the server).
  • Database credentials that can read each old database. A read-only database user is ideal.
  • The organisation id in each old system (the id in its organisations table).
  • The new Care Core installed, with its organisation created (php scripts/create-organisation.php), and a backup.

Step 1: export each system

php scripts/export-old-systems.php staff  --db=people_management --org=1 --user=reader --pass=… > staff.json
php scripts/export-old-systems.php people --db=people_service    --org=1 --user=reader --pass=… > people.json
php scripts/export-old-systems.php teams  --db=team_service      --org=1 --user=reader --pass=… > teams.json

Add --host= and --port= if the databases are elsewhere (or set OLD_DB_USER and OLD_DB_PASS in the environment so the password is not on the command line). Each export prints a summary and any notes (assumptions it had to make) to the screen, and the JSON to the file.

Step 2: check

php scripts/import.php --org=your-org staff.json people.json teams.json

Or upload the three files under Admin › Import data. Read the report. A typical first run shows warnings for things like postcodes that are not valid, phone numbers with words in them, and key worker links that were never closed. Those are the old data’s problems, now listed in one place. Fix what matters in the source (or in Care Core afterwards) and check again. Because a check changes nothing, repeat as often as you like.

Step 3: import

php scripts/import.php --org=your-org --commit --files-from=/path/to/old/uploads staff.json people.json teams.json

Drop --files-from if you do not need photos and signatures. Add --skip-errors to import the records that are fine when a few cannot be. Or use Import for real on the report page.

Step 4: verify

  1. Counts: People, Teams and the staff list should match the old systems (allowing for people matched or merged).
  2. Consistency checks (Admin): there should be no high-severity findings. “No key worker” reminders are normal.
  3. Spot-check a handful of people you know well: employment dates, line manager, team history, registrations, key workers.
  4. Due soon: the compliance list should look right for current staff.

Step 5: logins and sign-in

Logins are not imported. Either set up Microsoft sign-in and Entra provisioning (best: staff sign in with their work account), or create logins on Admin › Logins and hand out invitations.

Step 6: changeover and retiring the old systems

  1. Pick a cut-over time. Stop editing the old systems (set them read-only, or tell everyone).
  2. Run the exports and the import one final time. Re-running is safe: people already imported are skipped and anything new is added.
  3. Check, then point people and other systems at Care Core. Connect other systems through the API and webhooks.
  4. Keep the old systems’ databases, archived and read-only, for as long as your retention policy requires.
  5. After the cut-over, Care Core is the only system of record. Changes made in the old systems are not carried over.

What each old system contributes

Staff Service (people_management)

Old dataBecomes
people where person_type = staffA person, ref staff:<id>. Name, email, phone, date of birth. Photo from photo_path (approved photos only).
people.employee_referenceThe employment’s employee reference.
staff_profilesThe employment (job title, start and end dates, hours, contract type, line manager) and its terms, plus the personal profile (address, emergency contact, National Insurance, bank, signature).
TUPE, working time, apprenticeship, visa, leave fieldsThe matching sections of the staff record.
staff_registrations, staff_supervisions, staff_appraisals, staff_learning_recordsThe compliance records. Supervisor and appraiser point at the right person.
staff_role_historyThe employment’s history of changes (job title, hours, contract type).
people where person_type = person_we_supportNot exported (a note says how many). Import people we support from the People Service.

Assumptions the exporter makes (each is reported as a note):

  • No employment start date → the date the record was created.
  • Marked inactive but no end date → the date the record was last changed is used as the last day. Check these.

People Service (people_service)

Old dataBecomes
peopleA person, ref people:<id>, with a support episode from support_start to support_end, NHS number and local authority reference. Address goes to the personal profile.
gender, pronounsCare Core has no fields for these, so they are added to the person’s notes (a note says how many).
person_contacts, care_needsContacts and care needs.
person_keyworkersKey worker links to staff:<staff_id>: the Staff Service’s ids.

Assumptions: no support start → the creation date; inactive or archived with no end → the last-changed date.

Team Service (team_service)

Old dataBecomes
teamsTeams with their hierarchy; inactive teams are closed after their history is in.
team_typesThe team’s kind; a type marked staff-only makes its teams staff-only.
team_members (staff and people)Team places with dates, role (from team_roles) and primary flag. Members point at staff:<id> or people:<id>.
team_members of type userNot exported: logins are not people.

Not carried across

See What is not imported: logins and passwords, tasks, the old activity logs, documents and certificates, job descriptions and posts, salary and leave bookings, settings, and organisational units. If the Staff Service used organisational units instead of the Team Service for teams, build a small teams file by hand in the import format.

If something goes wrong

  • The check shows errors: read them; each names the source record. Fix it in the source or use --skip-errors.
  • You imported and want to start again: restore the backup you took, and import again. (An import cannot be undone from inside Care Core.)
  • The exporter cannot connect or says a table is missing: check --db, --host, the user’s rights, and that the old system’s database has been upgraded to its latest version.
  • A person is duplicated: the old systems held them under different emails and the same name with no date of birth. Edit one record into the other by hand, or correct the source and re-run on a fresh copy.