Migration API
Migrate to the new api
This article is about migrating from the old api to the new one. First of all we recommend to read the description of the new api. We will list here most differences between the old and the new api.
HealthRecords data model
Some fields are not available on the new health record:
- home_phone
- mobile_phone
- caption
- place_of_birth
- department_of_birth
- sharing_status
Before
This health record
{
"created_at": "2014-06-18T14:33:57+02:00",
"updated_at": "2014-06-18T14:37:57+02:00",
"uuid": "be5101b6-9e8e-11e1-9683-7273e9365401",
"birth_date": "1988-12-18",
"gender": "male",
"email": "jdkoeck@mesvaccins.net",
"home_phone": "0512345678",
"mobile_phone": "0666666666",
"last_name": "Koeck",
"first_name": "Jean-Denis",
"birth_name": "",
"caption": "Homme de 23 ans",
"place_of_birth": "Pau",
"department_of_birth": 64,
"zip_code": "33000",
"ins_c": "15489609345890393434 76",
"sharing_status": "private_record",
"vaccinations": "...",
"health_profile": "..."
}
=>
Now
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"first_name": "Koeck",
"last_name": "Jean-Denis",
"customary_name": "string",
"gender": "m",
"birth_date": "1988-12-18",
"external_id": "string",
"owner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"zip_code": "33000",
"sharing_requests": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from_account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from_account_type": "CITIZEN",
"processed_by_account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"to_pro_external_account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"to_pro_identity": {
"first_name": "string",
"last_name": "string"
},
"processed_at": "2022-11-03T13:41:17.071Z",
"status": "PENDING",
"health_record": "string"
}
],
"profile": {},
"validator_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"vaccination_acts": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"performed_on": "2022-11-03",
"certified_on": "2022-11-03",
"certification_method": "execution",
"certificator_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"health_record_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"vaccine_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"batch_number": "string",
"serial_number": "string",
"injection_method": "intramuscular",
"injection_location": "left_deltoid",
"country_code": "string",
"booster": true,
"expiration_date": "2022-11-03"
}
],
"created_at": "2022-11-03T13:41:17.071Z",
"updated_at": "2022-11-03T13:41:17.071Z"
}
Gender
female
becomef
male
becomem
Health record creation
Like before 4 fields are mendatory:
- first_name
- last_name
- birth_date
- gender
The only change is on the path and obviously the fiels describe in HealthRecords data model
Health record sharing
Pro
Health professionals can share the health record with other health professionals. To do so use this endpoint. The external_id is the rpps number of the health professional.
Citizen
When a citizen share his health record to a professional the professional must accept or refuse the sharing.