partner

Get a patient's Mediterranean diet score

Returns current -- the one score to display on a dashboard -- plus scores, the history behind it.

Every score covers a trailing 7-day window ending on its date. It is a single score computed from that whole week of food, not an average of daily scores.

current.score is populated only when current.status is ok; any other status means there is no reliable number to show and says why, so check it before rendering. score_percent is the safest field to display, being already normalized against max_score. The scoring version is determined by the patient's clinic configuration and is neither selectable nor exposed, so read max_score from the response rather than hard-coding it.

current is the patient's most recent usable score regardless of the requested range, falling back through up to 30 days so a short gap in logging does not blank the dashboard. It is brought up to date when you call this endpoint, while historical entries are recomputed nightly.

get/partner/patients/{patient_id}/mediterranean-diet-scores

Request

  • Base URL
    https://api.rxfoodapp.com/api
  • URL
    https://api.rxfoodapp.com/api/partner/patients/{patient_id}/mediterranean-diet-scores
  • Auth
    API key in header X-Api-Key

Path parameters

patient_idinteger required

Query parameters

date_sincestring date

Defaults to 30 days before date_until (inclusive).

date_untilstring date

Defaults to today (UTC), or 30 days after date_since when only date_since is given.

Response

Daily Mediterranean diet scores for the requested range

max_scorenumber required

Highest attainable score. Depends on the scoring version configured for the patient's clinic, which is not exposed and may change, so read it here rather than hard-coding it.

patient_idinteger required
window_daysinteger required

Length of every scoring window in days. Each score covers the window_days days ending on its date.

Changes

No recorded changes to this operation across all 19 revisions of this API.