Skip to main content

Anamnesis

An anamnesis is a completed questionnaire submission. It is often collected before you know which customer it belongs to — for example when a patient fills in a form before an order exists. This endpoint attaches one to a patient.

Connect an Anamnesis to a Patient

Requires an API key with the anamnesis:connect_patient permission.
Response (200 OK):

Identifying the patient

shop_identifier and shop_customer_id are always required. Together they name the customer in your shop, the same pair used by the wallet pass and patient endpoints. The shop must belong to your organisation.

Identifying the anamnesis

Supply exactly one of the three addressing modes below. The last one is a pair: both halves are required together, and supplying only one is an error rather than a third way of asking. Both external modes convert the submission into an internal anamnesis first, then attach the patient to it. Converting is repeatable: calling again reuses the anamnesis created the first time rather than making a second one.
Connecting the same patient again returns 200 and changes nothing, so it is safe to retry a request whose response you did not receive.
An anamnesis can only be connected once. Connecting a different patient to an anamnesis that is already attached returns 409 and leaves the original connection untouched.

Error Responses

A 400 reports the offending fields:
Anything belonging to another organisation returns 404, exactly like something that does not exist, so the response never confirms whether a record is real.

After connecting

Once connected, the questionnaire answers are used to fill the patient’s profile fields. The anamnesis also appears on the patient in the RxScale interface.