Test Data for TakeCare

This test data can be used to try out integration with TakeCare in Leyr Sandbox.
It is applicable when using Leyr credentials, as described in the EHR configuration guide.

If you'd like to use your own credentials or are going live, please refer to our TakeCare EHR setup guide.

Environment Overview

We have a fully integrated Sandbox for testing with TakeCare. All core workflows are functional and reflect real-world behavior, though some document features are still in development. The system follows Swedish healthcare data requirements with specific SSN validation.

Common Workflows

With TakeCare's comprehensive integration, you have access to full patient management, appointment booking, and medical notes workflows! Note the Swedish-specific requirements for patient creation. Check our supported services matrix to see what's available for TakeCare.

Care Units Discovery

This is the typical entry point to the Leyr API. The care unit ID returned here is required for all subsequent API calls.

Call GET /care-units to discover available care units in your TakeCare system. Use any id from the response in the path parameter for other endpoints.

Recommended Starting Point: Care unit ID 10 has extensive test data available and works well with the provided test combinations.

Patient Management

Create and retrieve patient information following Swedish healthcare data requirements.

Create Patient: Use POST /patients to create new patients. TakeCare requires a valid Swedish SSN as external_id. You can use any test ID from Swedish test data, though we recommend using birth dates from the 70s or 80s as younger SSNs may fail validation. Example: 197110021834.

Get Patient: Use GET /patients/{patient_id} with any of the test patient IDs below or any patient ID from your system:

patient_id
191212121212
197110021834
194010126672
195003042222
194912062306
195008121856
198702072391

Availability

Discover available resources, services, and time slots for appointment booking.

Get Services: Call GET /healthcare-services to retrieve all available healthcare services configured in your TakeCare system.

Get Resources: Call GET /resources to get available practitioners and resources.

Get Time Slots: Use GET /timeslots with resource_id and/or healthcare_service_id from previous calls to find available appointment times.

Recommended Test Combination: This combination has extensive data available and is ideal for comprehensive testing:

care_unit_idresource_idpatient_id
1010-991890000019 (Läkare Ehn (läk))197110021834

Appointment Booking

Complete appointment lifecycle management using data from previous workflows.

Book Appointment: Use POST /appointments with a patient ID (from Patient Management) and time slot details (from Availability) to create appointments.

Get Appointments: Call GET /appointments to retrieve existing appointments. You can filter by patient, date range, or leave parameters empty to see all appointments.

Update Appointment: Use PATCH /appointments/{appointment_id} to modify existing appointments.

Cancel Appointment: Use PATCH /appointments/{appointment_id} to cancel appointments.

Medical Notes

Manage clinical notes associated with patients.

Get Medical Notes: Use GET /medical-notes with a patient ID to retrieve existing clinical notes.

Create Medical Note: Use POST /medical-notes to add new clinical notes for a patient.

Documents

Documents functionality is in progress for TakeCare.

Happy coding! 🙂

In case of any questions or if you feel stuck - please feel free to reach out at contact@leyr.io.