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 to the new api. We will list here most differences between the old and the new api.

For example to get a health record :

You can find the full documentation at…

Migrate from sadv

Questionnaire

Before

Historically in order to get a vaccine recommendation customization questionnaire you had to call the following Endpoint: POST /decision_support/health_profile_form.json

With as data:

{
  "birth_date": "2000-01-01",
  "gender": "female",
  "condition_ids": [52, 145, 146],
  "user_type": "patient"
}
=>

Now

The following Endpoint should now be called: POST /questionnaire The format of the payload has changed as follows.

{
  "patient": {
    "birthdate": "2000-01-01",
    "gender": "f",
    "conditions": [
      {
        "id": "2934c287-e36b-4adf-a5f6-e2f30dc8ed4a",
        "value": true
      },
      {
        "id": "f235d2d9-3855-44c3-9d3e-25591d7918fb",
        "value": "2022-10-10"
      }
    ],
    "area_of_residency": {
      "zipcode": "33000"
    }
  },
  "requested_by_professional": true
}

Conditions

From now on conditions that were identified by ID are replaced by UUID. Also conditions now have a type, there are 4 types of conditions:

Historically conditions were sent as Boolean only, so there were no values to specify. From now on, the value must be specified.

Sending the conditions allows you to adjust the questionnaire according to the previous answers.

Gender

The values of the gender field change:

User type

In order to get a condition label adapted to the user, the user_type field was used. It is now replaced by a boolean value with the field requested_by_professional. If the form is requested as a health professional, this field should be set to true.

Other changes

If the patient’s postal code is known, it should be sent in the area_of_residency field in order to obtain recommendations related to the area of residence.

return the data from the questionnaire for personalizing the vaccine recommendation The personalization questionnaire is presented as a tree of conditions represented by checkboxes.

Vaccine recommendation service for the general public

Before

Historiquement afin d’obtenir des recommandations vaccinales il fallait appeler les Endpoint suivant:

POST /decision_support/recommendations.json

With as data:

{
  "birth_date": "2000-01-01",
  "gender": "female",
  "condition_ids": [52, 145, 146],
  "user_type": "patient"
}

POST /decision_support/immunisation_assessment.json

With as data:

{
  "birth_date": "2000-01-01",
  "gender": "female",
  "condition_ids": [52, 145, 146],
  "vaccinations": [
    {
      "date": "2015-04-04T16:04:20+02:00",
      "vaccine_id": 549,
      "booster": false
    }
  ],
  "user_type": "patient"
}
=>

Now

Now the 2 services are combined into one, the following Endpoint should be called: POST /diagnosis_for_patient

The format of the payload has changed as follows.

{
  "patient": {
    "birthdate": "2000-01-01",
    "gender": "f",
    "conditions": [
      {
        "id": "2934c287-e36b-4adf-a5f6-e2f30dc8ed4a",
        "value": true
      },
      {
        "id": "f235d2d9-3855-44c3-9d3e-25591d7918fb",
        "value": "2022-10-10"
      }
    ],
    "prevention_acts": [
      {
        "date": "2010-01-01",
        "prevention_method_id": "a7131590-0b14-43f5-8c4d-b87cd55b99af",
        "booster": "false"
      }
    ],
    "area_of_residency": {
      "zipcode": "33000"
    }
  },
  "requested_by_professional": true
}

Most of the parameters of the health profile are detailed in the Questionnaire part. However, the payload contains one more piece of data: the vaccination history.

Vaccinations

The immunization history should be sent as follows:

"prevention_acts": [
  {
    "date": "2010-01-01",
    "prevention_method_id": "a7131590-0b14-43f5-8c4d-b87cd55b99af",
    "booster": "false"
  },
  {
    "date": "2015-01-01",
    "prevention_method_id": "a7131590-0b14-43f5-8c4d-b87cd55b99af",
    "booster": "true"
  }
]

From now on the vaccinations are renamed prevention_acts and use the vaccine identifiers from the NUVA under the key prevention_method_id.