Skip to content
APIsAPI ReferenceContext callConciliation Médicamenteuse

Introduction

This API allows initializing a Medication conciliation for a patient via a contextual call.

The logic is as follows:

  • Create the patient if they do not exist
  • Create the medication review if it does not exist, with the provided list of treatments as a parameter

If the review already exists, it is not modified, even if the provided treatments differ.

Entry Point

Contextual Call URL

⚠️

The base URL is https://partner-connect.{env}.posos.co where {env} corresponds to: preprod for validation, production for live.


post/api/partners/conciliation

HTTP Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Request Body

NameTypeDescription
first_namestringUser’s first name
Required
last_namestringUser’s last name
Required
rppsstringUser’s RPPS or a technical identifier within the facility
Required
facilitySlugstringFacility identifier provided at the beginning of the integration
Required
ehrNamestringName of the original EHR system, displayed as the medication source
Required
conciliationobjectObject describing conciliation business parameters. See Conciliation
Required

Good to know: The “RPPS” is not necessarily the RPPS but can be a technical identifier of the user within the facility. On the preprod environment, you can test with the user abcde1234, which is configured.

Conciliation

AttributeTypeDescription
patientobjectPatient description. See Patient
Required
encounterobjectEncounter description. See Encounter
Required

Patient

AttributeTypeDescription
ippstringPermanent Patient Identifier
insstringPatient’s social security number
Required
firstNamestringPatient’s first name
lastNamestringPatient’s last name
birthDatestringPatient’s birth date in YYYY-MM-DD format
birthPlacestringPatient’s birth city
telephonestringPatient’s phone number
emailstringPatient’s email
genderstringPatient’s gender (‘male’ or ‘female’)
addressobjectPatient’s address details. See Address

Address

AttributeTypeDescription
linestringStreet, street number, and additional address details
citystringCity
Required
postalCodestringPostal code
Required
countrystringCountry

Encounter

AttributeTypeDescription
startDatedateStart date of the encounter in YYYY-MM-DD format
Required
drugsobjectMedications to include in the review. See Drugs

Drugs

AttributeTypeDescription
ucdsarray<string>Array of UCD 7 or UCD 13 codes
{
  "conciliation": {
    "patient": {
      "ins": "1880593059061",
      "firstName": "Robert",
      "lastName": "De Niro"
    },
    "encounter": {
      "startDate": "2024-05-25",
      "drugs": {
        "ucds": ["3400891771251", "3400893604960"]
      }
    }
  },
  "rpps": "abcde1234",
  "last_name": "Doe",
  "first_name": "John",
  "facilitySlug": "hopital-demo",
  "ehrName": "FakeDPI"
}

Example

Request

POST
/api/partners/patient/scan-token
curl --request POST \
  --url https://partner-connect.preprod.posos.co/api/partners/conciliation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
	"conciliation": {
		"patient": {
			"ins": "1880593059061",
			"firstName": "Robert",
			"lastName": "De Niro"
		},
		"encounter": {
			"startDate": "2024-05-25",
			"drugs": {
				"ucds": ["3400891771251","3400893604960"]
			}
		}
	},
		"rpps": "abcde1234",
		"last_name": "Doe",
		"first_name": "John",
		"facilitySlug": "hopital-demo",
		"ehrName": "FakeDPI"
}'

Output

{
  "location": "https://partner-connect.preprod.posos.co/partners/proxy/logout?payload=0c1e1c7e86b96f3088605e2121a7c19e%7Cc8fdb1763354aa04c250008001fe52d5b203fbeed6770e5cf01035a9fe31b4a97dcd3738303e6e5ec815d83d2b5030f91a3689a8122a7beb798b6f38ee495a1f53264b08aacdb512448264079850d0509f16ab2004a80f8ca4ba7cae33395d48f5ca276fb1e5d9845d6fefedea70fc7634bd885e1275c8b6bad73ca8e49243e50cc8b89c3aaefa"
}

Response Format

The response is a JSON object with the following structure:

Output

{
  "location": "https://partner-connect.preprod.posos.co/partners/proxy/logout?payload=0c1e1c7e86b96f3088605e2121a7c19e%7Cc8fdb1763354aa04c250008001fe52d5b203fbeed6770e5cf01035a9fe31b4a97dcd3738303e6e5ec815d83d2b5030f91a3689a8122a7beb798b6f38ee495a1f53264b08aacdb512448264079850d0509f16ab2004a80f8ca4ba7cae33395d48f5ca276fb1e5d9845d6fefedea70fc7634bd885e1275c8b6bad73ca8e49243e50cc8b89c3aaefa"
}

The location field contains the URL to redirect the user.

Response codes

CodeDescription
200
400One of the request parameters is invalid