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 › Importing data

Importing data

Bringing people, staff and teams in from other systems, safely and repeatably.

Care Core can bring in people, staff, teams and everything attached to them from other systems: the older Staff, People and Team services, a spreadsheet you have turned into JSON, or any system that can produce a file in the Care Core import format. You always see exactly what would happen before anything changes.

Moving from the three older apps? Go straight to the migration guide.

How it works

  1. Produce import files. One JSON file per source, in the import format. The exporters make them from the older systems.
  2. Check. Upload them under Admin › Import data (or run scripts/import.php without --commit). Care Core does all the work inside a transaction and then throws it away. The report is what a real import would do.
  3. Read the report. Counts per kind of record, warnings (a value was left out or adjusted) and errors (a record cannot be imported).
  4. Import. When you are happy, choose Import for real. By default it is all or nothing: if any record cannot be imported, nothing is. Or tick “import the records that are fine” to leave the bad ones out.

What is imported

KindBecomes
TeamsTeams, with their hierarchy, kind and staff-only setting. A team marked inactive is closed after its history is in.
PeoplePeople: names, date of birth, email, phone, notes.
ProfileAddress, emergency contact, National Insurance and bank details (encrypted), for staff or people we support.
EmploymentsEmployments with start and end dates, contract, hours, employee reference and line manager; their terms (TUPE, working time, apprenticeship, visa, leave, job terms); and the history of role changes.
Support episodesPeriods of support with reference, NHS number and local authority reference.
Care needs, contactsThe same as in the Care module.
Registrations, supervisions, appraisals, learningThe compliance records.
Team placesTeam membership stints, current and past, with role and primary flag.
Key workersKey worker links, current and past.
Photos and signaturesOnly with the command-line importer and the old system’s uploads folder (--files-from).

What is not imported

  • Logins, passwords and roles. Passwords cannot and should not be copied. People sign in with Microsoft, or you create their logins afterwards (Logins, or Entra provisioning).
  • Tasks and checklists. Nobody needs onboarding tasks for a member of staff who started in 2019.
  • The old systems’ activity logs. The import adds its own entries (see below).
  • Documents and certificates (Care Core does not store them yet), job descriptions and job posts, salary history, leave bookings.
  • Settings: API keys, webhooks, Entra settings, organisational units.

The rules it follows

It goes through the same services as typed data

Values are checked exactly as they would be in the web interface: postcodes, National Insurance numbers, sort codes, NHS numbers, dates, team rules (staff-only teams, one primary team, no overlapping stints), key worker rules. A value that is not acceptable is left out with a warning rather than allowed to break the record. A person with no name is an error: that record is skipped.

Matching people who are already there

If a person in the file is already in Care Core, they are matched, not duplicated: first by an earlier import of the same source reference, then by email address (not case sensitive), then by first name, last name and date of birth when exactly one person fits. Matched people are filled in, never overwritten: blank fields get the imported value; existing values stay. Their employments, compliance records and so on are added unless they would overlap or duplicate what is there.

History stays history

  • Ended employments, support and team places are imported with their dates.
  • If the old system never closed a team place or key worker link for someone who has left (or whose support ended), it is ended on their last day, with a warning. Nothing outlives the people in it. After an import, the consistency check should show no high-severity findings.
  • No onboarding tasks are created, and no webhook events are sent for imported history, so a migration does not flood other systems with old news. The activity log records each imported person (as system:import), plus the entries Care Core’s services make as they go.

Running it again is safe

Every record keeps a source reference (such as staff:12). Care Core remembers which reference became which record, so importing the same files again adds nothing that is already there. New people in the source are picked up. Changes to people already imported are not copied across: after the first import, Care Core is the system of record.

On the command line

php scripts/import.php --org=your-org staff.json people.json teams.json              # check only
php scripts/import.php --org=your-org --commit staff.json people.json teams.json     # do it
OptionMeaning
--org=The organisation’s slug or id (required).
--commitReally import. Without it, everything is checked and rolled back.
--skip-errorsImport the records that are fine even if some cannot be.
--files-from=DIRThe old system’s uploads folder, to bring photos and signatures across. Files are only read from inside that folder, and must be genuine images.
--jsonPrint the report as JSON.

Use the command line for very large imports: the web upload is limited by your server’s upload size, and at most six files at a time. Exit status is 0 for success, 2 when there were errors.

Every check and import is listed on Admin › Import data.

Before you import for real

  • Back up the database (and storage/). An import cannot be undone from the interface.
  • Practise on a copy: restore a backup to a test database and import there first.
  • Read the warnings. They are the list of data quality problems in the old system.
  • Decide which system is the source of truth during the changeover, so nobody edits the old and new at once.

Next: The import format, or moving from the older Staff, People and Team services.