Get Care Plan Logs
curl --request GET \
--url https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"carePlanId": "<string>",
"action": "CREATED",
"source": "USER",
"createdDate": "2023-11-07T05:31:56Z",
"stepId": "<string>",
"fieldName": "NAME",
"oldValue": "<string>",
"oldValueId": "<string>",
"newValue": "<string>",
"newValueId": "<string>",
"batchId": "<string>",
"createdById": "<string>",
"cycleId": "<string>",
"cyclePass": 123
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Care Plans
Get Care Plan Logs
Get the audit trail for a care plan.
GET
/
user
/
patient
/
care-plans
/
{care_plan_id}
/
logs
Get Care Plan Logs
curl --request GET \
--url https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/user/patient/care-plans/{care_plan_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"carePlanId": "<string>",
"action": "CREATED",
"source": "USER",
"createdDate": "2023-11-07T05:31:56Z",
"stepId": "<string>",
"fieldName": "NAME",
"oldValue": "<string>",
"oldValueId": "<string>",
"newValue": "<string>",
"newValueId": "<string>",
"batchId": "<string>",
"createdById": "<string>",
"cycleId": "<string>",
"cyclePass": 123
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Response
Successful Response
What kind of change was made to a care plan or one of its steps.
Available options:
CREATED, REMOVED, FIELD_CHANGED, STATUS_CHANGED, CYCLE_CREATED, CYCLE_UPDATED, CYCLE_REMOVED How a care plan change was triggered.
Available options:
USER, PATIENT_SELF_SCHEDULE, EVENT_SYNC, TASK_SYNC, BRANCH_SELECTION, CYCLE_EDIT_THIS, CYCLE_EDIT_FUTURE, CYCLE_EDIT_ALL, CYCLE_PROPAGATION, CYCLE_MATERIALIZATION Identifies which field was modified in a FIELD_CHANGED or STATUS_CHANGED log entry.
Available options:
NAME, DESCRIPTION, START_DATE, TAG_IDS, LOCATION_ID, ASSIGNED_BY_ID, STEP_NUMBER, STEP_TYPE, STEP_DESCRIPTION, MESSAGE_TYPE, MINUTES_AFTER_PREVIOUS, PARENT_STEP_ID, SOURCE_SERVICE_ID, SCHEDULED_DATE, STATUS, EVENT_ID, TASK_ID, TASK_TITLE, TASK_PRIORITY, TASK_ASSIGNEE_ID, TASK_TEAM_ID, TASK_DESCRIPTION, TASK_DUE_DATE, TASK_START_DATE, TASK_STATUS, SERVICE_IDS, MEDICATION_IDS, MEASUREMENTS, SMS_BODY, BRANCH_SELECTED, BRANCH_ID, BRANCH_NAME, BRANCH_POSITION, BRANCH_TAG_IDS, CYCLE_PASS_COUNT, CYCLE_GAP_MINUTES 
