Skip to content
English
  • There are no suggestions because the search field is empty.

Prediction App 2024.6 - API updates

API changes (v4)

This describes the changes in API, in which a v4 was introduced. All previous API versions (v1->v3) should still work as expected.

Additional units

For the endpoint: f

in POST, the following units were added:

  • µg

  • ampoule

  • pen

These units are now accepted on all versions: v1, v2, v3 and v4.

Result endpoints

The result endpoints had an important refactoring on this version. Going from v2 to v3, data cubes in the outputs were removed, making for lighter rawer data. This version v4 continues in that direction, making it more coherent and adding necessary information to build aggregations and data cubes that were available in v2.

The first important point to note is that a few objects are defined before the actual results. These objects are later referred by an id. For example, a demand is linked to a product, previously the product object was repeated, instead now a demand references the id of a product defined earlier:

 
 
{ products: [{"id": 1, "code": "active"...}...], demands: [{"productId": 1...}...] ... }

/projectScenarios/{scenarioId}/results

GET

Change in the response body

 
 

Property

 

 

 

demands

PROPERTY REMOVED

This property has been removed but most of the corresponding data is now present in the output, in particular in output.demands. Some information such as allocationRatio should now be computed using allocations property of the output.

lots

PROPERTY REMOVED

This property has been removed but all the corresponding data is now present in the output, in particular in output.lots. Some information such as allocationToTechnicalDemands should now be computed using allocations property of the output.

allocations

PROPERTY REMOVED

This property has been removed but all the corresponding data is now present in the output. It has been split among allocationToNeeds and allocationToDemands.

computationTime

NEW

Field to know the computation time the system took to compute the scenario result. It is destined to be used by N-SIDE for monitoring/debugging purposes.

output

NEW

Contains all the actual data from the result.

 

/trialScenarios/{scenarioId}/results

GET

Change in the response body

 
 

Property

 

 

 

demands

PROPERTY REMOVED

This property has been removed but all of the corresponding data is now present in the output, in particular in output.demands. Some information such as ratio should now be computed using allocations property of the output.

lots

PROPERTY REMOVED

This property has been removed but all the corresponding data is now present in the output, in particular in output.lots. Some information such as allocationToPatient should now be computed using multiple parts of the output such as allocations and demands.dispensing.

needs

PROPERTY REMOVED

This property has been removed but all the corresponding data is now present in the output.

allocations

PROPERTY REMOVED

This property has been removed but all the corresponding data is now present in the output.

computationTime

NEW

Field to know the computation time the system took to compute the scenario result. It is destined to be used by N-SIDE for monitoring/debugging purposes.

output

NEW

Contains all the actual data from the result.

output.depotShipments

NEW

This property adds information with respect to the previous versions about depot shipments.

output.siteShipments

NEW

This property adds information with respect to the previous versions about site shipments.

 

projects/{projectId}/scenarios

POST

Change in the request body

 
 

Property

 

 

 

guidelines.shpLeadTime

NEW - optional

guidelines.riskStrategy

NEW MANDATORY

guidelines.sequenceStrategy

NEW MANDATORY

guidelines.isWaitRls

PROPERTY REMOVED

The granularity of this concept was increased and is now handled by riskStrategy. You can refer to the open-api documentation on this parameter. You can consider the following to be equivalent:

  • isWaitRls = true → riskStrategy = always

  • isWaitRls = false → riskStrategy = possibly