Api referenceApiOperationsSlimThresholdSlim/Threshold/Patient

Update patient threshold

  • Sandbox: available
  • Staging: available
  • Production: unknown
PUT
/v1/slim/threshold/patient/{patientId}

Saves one resident's own thresholds.

Deprecated. Use PUT /v2/slim/threshold/patient/{patientId}. This v1 route stays available, unchanged, until every client has moved.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Goal:update (an admin or super admin who holds no access policy skips this check). Scope: The resident must be in the caller's project (from the token) or one of its sub-projects.

Behaviour

  • Each metric's mode decides what is stored:
    • patient: your absolute / relative limits.
    • organization: the home's limits. Sending enabled: false for a metric the home has enabled switches it to patient mode, disabled.
  • patient-auto is no longer accepted: a body that uses it is refused with 422.
  • patientId in the body is required but ignored; the path decides the resident.
  • average and averageRange are set by the server; values you send are ignored.
  • Enabling a relative heart-rate or respiratory-rate band for a resident with no baseline average answers 424, because the band would have nothing to be relative to.
  • Every limit is evaluated by Signals, so every save writes the resident's settings to Signals before it answers, all or nothing: Signals holds the saved limits once it answers, or it answers 502 with saved: false and nothing is changed (a 500 says putting the previous limits back failed too). Send the save again.
  • Change-history entries are written for each changed metric.
  • The response is the saved threshold.

Example

curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/c3499c27-2973-0a7f-807e-fb8676a92dcb' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{    "patientId": "c3499c27-2973-0a7f-807e-fb8676a92dcb",    "status": "active",    "settings": {      "heartRate": { "mode": "patient", "enabled": true, "absolute": { "enabled": true, "min": 45, "max": 110 } }    }  }'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

patientId*string

Request Body

application/json
  1. body
id?string
patientId*string
projectId?string
status*string
Value in"active""revoked"
date?string
Formatdate-time
settings*

Response Body

Patient threshold updated successfully.

application/json
  1. response
id?string
patientId*string
projectId?string
status*string
Value in"active""revoked"
date?string
Formatdate-time
period?
settings*
Example Request
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/string' \  -H 'Content-Type: application/json' \  -d '{  "patientId": "string",  "status": "active",  "settings": {}}'
Example Response
{  "id": "string",  "patientId": "string",  "projectId": "string",  "status": "active",  "date": "2019-08-24T14:15:22Z",  "period": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z"  },  "settings": {    "heartRate": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 1000      }    },    "meanHeartRate": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "relative": {        "enabled": true,        "min": 0,        "max": 1000      }    },    "respiratoryRate": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 1000      }    },    "meanRespiratoryRate": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "relative": {        "enabled": true,        "min": 0,        "max": 1000      }    },    "durationOfOutOfBed": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "max": 1000000      },      "relative": {        "enabled": true,        "max": 100      }    },    "sleepDuration": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 1000      }    },    "numberOfTimesGettingOutOfBed": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "max": 1000      }    },    "oxygenSaturation": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 0      }    },    "pulseRate": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 0      }    },    "perfusionIndex": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 0      }    },    "bodyTemperature": {      "period": {        "start": "19:00:00",        "end": "09:00:00"      },      "average": 0,      "averageRange": {        "min": 0,        "max": 0      },      "mode": "organization",      "enabled": true,      "absolute": {        "enabled": true,        "min": 0,        "max": 0      }    }  }}