Update Patient Vitals and Link to ABHA
curl --request PATCH \
--url https://api.eka.care/trackers/api/v1/vitals/{txn_id} \
--header 'Content-Type: application/json' \
--header 'auth: <api-key>' \
--data '
{
"vitals": [
{
"display_name": "Pulse rate",
"identifiers": {
"unique_id": "354bks353",
"eka_code": "lb-1201285132",
"loinc": "17616716"
},
"vital_value": {
"value_type": "NUM",
"value": 75
},
"vital_unit": {
"display_unit": "{Counts}/min",
"ucum_code": "/min"
},
"measured_at": {
"measurement_type": "INSTANT",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": null
}
},
{
"display_name": "Blood Glucose",
"identifiers": {
"unique_id": "354bks354",
"eka_code": "lb-1201285133",
"loinc": "15074-8"
},
"vital_value": {
"value_type": "NUM",
"value": 90
},
"vital_unit": {
"display_unit": "mg/dL",
"ucum_code": "mg/dL"
},
"measured_at": {
"measurement_type": "DURATION",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": "2025-01-30T06:29:23.583000+00:00"
}
}
]
}
'import requests
url = "https://api.eka.care/trackers/api/v1/vitals/{txn_id}"
payload = { "vitals": [
{
"display_name": "Pulse rate",
"identifiers": {
"unique_id": "354bks353",
"eka_code": "lb-1201285132",
"loinc": "17616716"
},
"vital_value": {
"value_type": "NUM",
"value": 75
},
"vital_unit": {
"display_unit": "{Counts}/min",
"ucum_code": "/min"
},
"measured_at": {
"measurement_type": "INSTANT",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": None
}
},
{
"display_name": "Blood Glucose",
"identifiers": {
"unique_id": "354bks354",
"eka_code": "lb-1201285133",
"loinc": "15074-8"
},
"vital_value": {
"value_type": "NUM",
"value": 90
},
"vital_unit": {
"display_unit": "mg/dL",
"ucum_code": "mg/dL"
},
"measured_at": {
"measurement_type": "DURATION",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": "2025-01-30T06:29:23.583000+00:00"
}
}
] }
headers = {
"auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vitals: [
{
display_name: 'Pulse rate',
identifiers: {unique_id: '354bks353', eka_code: 'lb-1201285132', loinc: '17616716'},
vital_value: {value_type: 'NUM', value: 75},
vital_unit: {display_unit: '{Counts}/min', ucum_code: '/min'},
measured_at: {
measurement_type: 'INSTANT',
start: '2025-01-30T06:19:23.583000+00:00',
end: null
}
},
{
display_name: 'Blood Glucose',
identifiers: {unique_id: '354bks354', eka_code: 'lb-1201285133', loinc: '15074-8'},
vital_value: {value_type: 'NUM', value: 90},
vital_unit: {display_unit: 'mg/dL', ucum_code: 'mg/dL'},
measured_at: {
measurement_type: 'DURATION',
start: '2025-01-30T06:19:23.583000+00:00',
end: '2025-01-30T06:29:23.583000+00:00'
}
}
]
})
};
fetch('https://api.eka.care/trackers/api/v1/vitals/{txn_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.eka.care/trackers/api/v1/vitals/{txn_id}")
.header("auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/trackers/api/v1/vitals/{txn_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<api-key>");
request.AddJsonBody("{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/trackers/api/v1/vitals/{txn_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "All vitals data saved and successfully linked to ABHA for care context ID: ekap_durgesh-stage-002",
"data": {
"abha_linking": "success",
"abha_message": "ABHA linking successful",
"processing_status": {
"processed": [
{
"resource_type": "vitals",
"fhir_id": "e5d0b6c6-c932-5e0d-8a90-dc8e2729875c",
"identifier": "ekap_0832043542354bks353"
}
],
"failed": []
}
}
}{
"message": "Vitals data partially saved and successfully linked to ABHA for care context ID: ekap_durgesh-stage-002",
"data": {
"abha_linking": "success",
"abha_message": "ABHA linking successful",
"processing_status": {
"processed": [
{
"resource_type": "vitals",
"fhir_id": "e5d0b6c6-c932-5e0d-8a90-dc8e2729875c",
"identifier": "ekap_0832043542354bks353"
}
],
"failed": [
{
"resource_type": "vitals",
"identifier": "c932-5e0d-8a90-dc8e27",
"error": {
"code": "parsing_error",
"message": "unable to parse the observation due to empty doc id"
}
}
]
}
}
}{
"error": {
"error_code": "VALIDATION_ERROR",
"display_message": "Please check your input data and try again.",
"message": "non_field_errors: Either 'w-id' or 'b-id' is required"
}
}{
"error": {
"error_code": "INTERNAL_ERROR",
"display_message": "An error occurred while processing your request.",
"message": "Database connection timeout occurred while processing the request"
}
}{
"error": {
"error_code": "INTERNAL_ERROR",
"display_message": "An error occurred while processing your request.",
"message": "Database connection timeout occurred while processing the request"
}
}User App
Update Patient Vitals and Link to ABHA
Update the vitals data for a specific patient using the transaction ID. It processes the data and links it to the ABHA (Ayushman Bharat Health Account) if requested. Request body must include valid list of vitals.
Refer to the Table for proper eka_code, LOINC code and UCUM code mappings for different vital signs.
PATCH
/
trackers
/
api
/
v1
/
vitals
/
{txn_id}
Update Patient Vitals and Link to ABHA
curl --request PATCH \
--url https://api.eka.care/trackers/api/v1/vitals/{txn_id} \
--header 'Content-Type: application/json' \
--header 'auth: <api-key>' \
--data '
{
"vitals": [
{
"display_name": "Pulse rate",
"identifiers": {
"unique_id": "354bks353",
"eka_code": "lb-1201285132",
"loinc": "17616716"
},
"vital_value": {
"value_type": "NUM",
"value": 75
},
"vital_unit": {
"display_unit": "{Counts}/min",
"ucum_code": "/min"
},
"measured_at": {
"measurement_type": "INSTANT",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": null
}
},
{
"display_name": "Blood Glucose",
"identifiers": {
"unique_id": "354bks354",
"eka_code": "lb-1201285133",
"loinc": "15074-8"
},
"vital_value": {
"value_type": "NUM",
"value": 90
},
"vital_unit": {
"display_unit": "mg/dL",
"ucum_code": "mg/dL"
},
"measured_at": {
"measurement_type": "DURATION",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": "2025-01-30T06:29:23.583000+00:00"
}
}
]
}
'import requests
url = "https://api.eka.care/trackers/api/v1/vitals/{txn_id}"
payload = { "vitals": [
{
"display_name": "Pulse rate",
"identifiers": {
"unique_id": "354bks353",
"eka_code": "lb-1201285132",
"loinc": "17616716"
},
"vital_value": {
"value_type": "NUM",
"value": 75
},
"vital_unit": {
"display_unit": "{Counts}/min",
"ucum_code": "/min"
},
"measured_at": {
"measurement_type": "INSTANT",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": None
}
},
{
"display_name": "Blood Glucose",
"identifiers": {
"unique_id": "354bks354",
"eka_code": "lb-1201285133",
"loinc": "15074-8"
},
"vital_value": {
"value_type": "NUM",
"value": 90
},
"vital_unit": {
"display_unit": "mg/dL",
"ucum_code": "mg/dL"
},
"measured_at": {
"measurement_type": "DURATION",
"start": "2025-01-30T06:19:23.583000+00:00",
"end": "2025-01-30T06:29:23.583000+00:00"
}
}
] }
headers = {
"auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vitals: [
{
display_name: 'Pulse rate',
identifiers: {unique_id: '354bks353', eka_code: 'lb-1201285132', loinc: '17616716'},
vital_value: {value_type: 'NUM', value: 75},
vital_unit: {display_unit: '{Counts}/min', ucum_code: '/min'},
measured_at: {
measurement_type: 'INSTANT',
start: '2025-01-30T06:19:23.583000+00:00',
end: null
}
},
{
display_name: 'Blood Glucose',
identifiers: {unique_id: '354bks354', eka_code: 'lb-1201285133', loinc: '15074-8'},
vital_value: {value_type: 'NUM', value: 90},
vital_unit: {display_unit: 'mg/dL', ucum_code: 'mg/dL'},
measured_at: {
measurement_type: 'DURATION',
start: '2025-01-30T06:19:23.583000+00:00',
end: '2025-01-30T06:29:23.583000+00:00'
}
}
]
})
};
fetch('https://api.eka.care/trackers/api/v1/vitals/{txn_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://api.eka.care/trackers/api/v1/vitals/{txn_id}")
.header("auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/trackers/api/v1/vitals/{txn_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<api-key>");
request.AddJsonBody("{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/trackers/api/v1/vitals/{txn_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vitals\": [\n {\n \"display_name\": \"Pulse rate\",\n \"identifiers\": {\n \"unique_id\": \"354bks353\",\n \"eka_code\": \"lb-1201285132\",\n \"loinc\": \"17616716\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 75\n },\n \"vital_unit\": {\n \"display_unit\": \"{Counts}/min\",\n \"ucum_code\": \"/min\"\n },\n \"measured_at\": {\n \"measurement_type\": \"INSTANT\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": null\n }\n },\n {\n \"display_name\": \"Blood Glucose\",\n \"identifiers\": {\n \"unique_id\": \"354bks354\",\n \"eka_code\": \"lb-1201285133\",\n \"loinc\": \"15074-8\"\n },\n \"vital_value\": {\n \"value_type\": \"NUM\",\n \"value\": 90\n },\n \"vital_unit\": {\n \"display_unit\": \"mg/dL\",\n \"ucum_code\": \"mg/dL\"\n },\n \"measured_at\": {\n \"measurement_type\": \"DURATION\",\n \"start\": \"2025-01-30T06:19:23.583000+00:00\",\n \"end\": \"2025-01-30T06:29:23.583000+00:00\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "All vitals data saved and successfully linked to ABHA for care context ID: ekap_durgesh-stage-002",
"data": {
"abha_linking": "success",
"abha_message": "ABHA linking successful",
"processing_status": {
"processed": [
{
"resource_type": "vitals",
"fhir_id": "e5d0b6c6-c932-5e0d-8a90-dc8e2729875c",
"identifier": "ekap_0832043542354bks353"
}
],
"failed": []
}
}
}{
"message": "Vitals data partially saved and successfully linked to ABHA for care context ID: ekap_durgesh-stage-002",
"data": {
"abha_linking": "success",
"abha_message": "ABHA linking successful",
"processing_status": {
"processed": [
{
"resource_type": "vitals",
"fhir_id": "e5d0b6c6-c932-5e0d-8a90-dc8e2729875c",
"identifier": "ekap_0832043542354bks353"
}
],
"failed": [
{
"resource_type": "vitals",
"identifier": "c932-5e0d-8a90-dc8e27",
"error": {
"code": "parsing_error",
"message": "unable to parse the observation due to empty doc id"
}
}
]
}
}
}{
"error": {
"error_code": "VALIDATION_ERROR",
"display_message": "Please check your input data and try again.",
"message": "non_field_errors: Either 'w-id' or 'b-id' is required"
}
}{
"error": {
"error_code": "INTERNAL_ERROR",
"display_message": "An error occurred while processing your request.",
"message": "Database connection timeout occurred while processing the request"
}
}{
"error": {
"error_code": "INTERNAL_ERROR",
"display_message": "An error occurred while processing your request.",
"message": "Database connection timeout occurred while processing the request"
}
}Authorizations
Was this page helpful?

