Fetch Grouped Assessments
curl --request GET \
--url https://api.eka.care/assessment/api/fetch_interviews/v2/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/assessment/api/fetch_interviews/v2/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/assessment/api/fetch_interviews/v2/', 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.eka.care/assessment/api/fetch_interviews/v2/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.eka.care/assessment/api/fetch_interviews/v2/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.eka.care/assessment/api/fetch_interviews/v2/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/assessment/api/fetch_interviews/v2/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversations": [
{
"practitioner_uuid": "161467756044223",
"patient_uuid": "02b66c91-ce53-45b7-8794-14f4a640f9g4",
"unique_identifier": "173765761279834",
"transaction_id": "txn_aBcDeFgHiJkLmNoP",
"conversations": [
{
"conversationid": "sa_123456789",
"created_at": "2023-07-15T10:30:00Z"
},
{
"conversationid": "sn_987654321",
"created_at": "2023-07-15T10:35:00Z"
}
]
}
]
}{
"error": "patient_uuid is required."
}{
"error": "An unexpected error occurred, sit tight, we are fixing.."
}Assessment APIS
Fetch Grouped Assessments
Fetch assessments from both Self-Assessment and Smartcheck modules.
GET
/
assessment
/
api
/
fetch_interviews
/
v2
/
Fetch Grouped Assessments
curl --request GET \
--url https://api.eka.care/assessment/api/fetch_interviews/v2/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.eka.care/assessment/api/fetch_interviews/v2/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.eka.care/assessment/api/fetch_interviews/v2/', 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.eka.care/assessment/api/fetch_interviews/v2/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.eka.care/assessment/api/fetch_interviews/v2/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.eka.care/assessment/api/fetch_interviews/v2/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/assessment/api/fetch_interviews/v2/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"conversations": [
{
"practitioner_uuid": "161467756044223",
"patient_uuid": "02b66c91-ce53-45b7-8794-14f4a640f9g4",
"unique_identifier": "173765761279834",
"transaction_id": "txn_aBcDeFgHiJkLmNoP",
"conversations": [
{
"conversationid": "sa_123456789",
"created_at": "2023-07-15T10:30:00Z"
},
{
"conversationid": "sn_987654321",
"created_at": "2023-07-15T10:35:00Z"
}
]
}
]
}{
"error": "patient_uuid is required."
}{
"error": "An unexpected error occurred, sit tight, we are fixing.."
}Fetch and Group Assessments
This API fetches and groups assessments. One can filter using any combination of these properties:practitioner_uuid, patient_uuid, unique_identifier, transaction_id with status (default: COMPLETED).
One can also create a New Assessment using 🔗 INIT API with any one of these properties.
Examples
Example 1: Filtering by Practitioner AND Patient
This request finds all assessment groups for a specific practitioner AND a specific patient. The unique_identifier can be different for each group.Request:
curl ".../v2/?practitioner_uuid=123-doc&patient_uuid=456-patient"
Response:
Notice how both groups in the response match the requested practitioner_uuid and patient_uuid.{
"conversations": [
{
"practitioner_uuid": "123-doc",
"patient_uuid": "456-patient",
"unique_identifier": "UID-A",
"transaction_id": "TXN-1",
"conversations": [
{ "conversationid": "sa_111", "created_at": "..." }
]
},
{
"practitioner_uuid": "123-doc",
"patient_uuid": "456-patient",
"unique_identifier": "UID-B",
"transaction_id": "TXN-2",
"conversations": [
{ "conversationid": "sa_222", "created_at": "..." },
{ "conversationid": "sn_333", "created_at": "..." }
]
}
]
}
Example 2: Filtering by a Single Identifier
This request finds all assessment groups that share the same unique_identifier, regardless of the practitioner or patient.Request:
curl ".../v2/?unique_identifier=UID-XYZ"
Response:
Notice how both groups have the same unique_identifier, but different practitioners and patients.{
"conversations": [
{
"practitioner_uuid": "doc-alpha",
"patient_uuid": "patient-one",
"unique_identifier": "UID-XYZ",
"transaction_id": "TXN-100",
"conversations": [
{ "conversationid": "sa_777", "created_at": "..." }
]
},
{
"practitioner_uuid": "doc-beta",
"patient_uuid": "patient-two",
"unique_identifier": "UID-XYZ",
"transaction_id": "TXN-200",
"conversations": [
{ "conversationid": "sn_888", "created_at": "..." }
]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The UUID of the practitioner(doctor oid) to filter assessments by.
Example:
"161467756044223"
The UUID of the patient(patient_uuid) to filter assessments by.
Example:
"02b66c91-ce53-45b7-8794-14f4a640f9c2"
A unique identifier(patient_oid) associated with the assessment.
Example:
"173765761279832"
The transaction ID for a specific assessment session.
Example:
"txn_aBcDeFgHiJkLmNoP"
Comma-separated list of workflow IDs to filter by.
Example:
"101,102"
The status of the assessments to fetch.
Available options:
NEW, IN_REVIEW, COMPLETED, PARTIAL Response
A successful response containing the grouped assessments.
A list of assessment groups.
Show child attributes
Show child attributes
Was this page helpful?

