Introduction
This API allows you to retrieve a URL to a complete prescription import and validation interface. Two routes are available:
- classic path: the contextual call returns the URL of an interface enabling a prescription to be sent and validated
- pathway with pre-imported files: the context call is made by attaching files to be transcribed, and returns the url of a prescription validation interface.
Entry point
Contextual call URLs
The base url is https://partner-connect.{env}.posos.co where {env} is the
following environment: preprod for validation, production for live.
post/api/partners/patient/scan-token
HTTP headers
| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Request body
| Name | type | Description |
| :------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| first_name | string | User first name
last_name | string | User name rpps | string | RPPS of the user, or a technical identifier of the user within the establishment facilitySlug | string | Establishment identifier sent to you at the start of integration. patientId | string | The key allowing, when retrieving the prescription, to join with your software and assign the prescription to the correct file. This can be an IPP, a stay identifier, a unique identifier for a transcription session or other images | array | Array of objects containing images. See section Image | |
| exportParameters | object | Export settings of the validated prescription towards a third-party system. See section Export parameters | |
Good to know: the
imagesfield is only present for the route with pre-imported files.
Good to know: The “RPPS” is not necessarily the RPPS but can be a technical identifier of the user within the establishment. On the
preprodenvironment you can test with theabcde1234user which is configured.
Good to know: The
exportParametersfield is optional. When it is provided, the validated prescription is exported to the system you specify. The values to use are given to you at the start of integration.
Image
| Attribut | Type | Description |
|---|---|---|
image | string | Base64-encoded image or PDF Requis |
isPdf | boolean | Indicates whether the image is a PDF. Defaults to false |
Export parameters
These attributes are required as soon as the exportParameters object is provided, except for authMode.
| Attribut | Type | Description |
|---|---|---|
system | string | Identifier of the system the prescription is exported to, given to you by Posos Required |
destinationUrl | string | URL the validated prescription is exported to Required |
authKey | string | Authentication key used for the export call Required |
authMode | string | Authentication mode of the export call: basic or url. Optional, defaults to basic. |
finess | string | FINESS number of the establishment Required |
{
"first_name": "John",
"last_name": "Carter",
"rpps": "abcde1234",
"facilitySlug": "hospital-demo",
"patientId": "123456"
}Example
Request
curl --request POST \
--url https://partner-connect.preprod.posos.co/api/partners/patient/scan-token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"first_name": "John",
"last_name": "Carter",
"rpps": "abcde1234",
"facilitySlug": "hospital-demo",
"patientId": "123456"
}'Output
{
"token": "5358af7fc61098c6535b2f23f8b0bb2a%7C92b3fee3955e7e72cdcd8b7d3a29b0a43c0bd49eb4ea8160ebcd0a88297789217fcfa4584ab5d759",
"url": "https://scan-complete.preprod.posos.co?token=5358af7fc61098c6535b2f23f8b0bb2a%7C92b3fee3955e7e72cdcd8b7d3a29b0a43c0bd49eb4ea8160ebcd0a88297789217fcfa4 584ab5d759"
}Response format
The result obtained is JSON of the following form:
Output
{
"token": "5358af7fc61098c6535b2f23f8b0bb2a%7C92b3fee3955e7e72cdcd8b7d3a29b0a43c0bd49eb4ea8160ebcd0a88297789217fcfa4584ab5d759",
"url": "https://scan-complete.preprod.posos.co?token=5358af7fc61098c6535b2f23f8b0bb2a%7C92b3fee3955e7e72cdcd8b7d3a29b0a43c0bd49eb4ea8160ebcd0a88297789217fcfa4 584ab5d759"
}The url field is the one containing the URL to redirect the user to.
Response codes
| Code | Description |
|---|---|
200 | |
400 | One of the parameters passed in the request is invalid |