Update Patient Details
curl --request PATCH \
--url https://api.eka.care/dr/v1/patient/{patient_id} \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"dob": "1987-01-06",
"designation": "Mr.",
"first_name": "Test",
"middle_name": "",
"last_name": "Patient",
"gender": "M",
"address": {
"city": "Bangalore",
"line1": "ABC",
"line2": "XYZ",
"pincode": 560049,
"state": "Karnataka",
"country": "India"
},
"partner_meta": {
"key1": "value1"
}
}
'import requests
url = "https://api.eka.care/dr/v1/patient/{patient_id}"
payload = {
"dob": "1987-01-06",
"designation": "Mr.",
"first_name": "Test",
"middle_name": "",
"last_name": "Patient",
"gender": "M",
"address": {
"city": "Bangalore",
"line1": "ABC",
"line2": "XYZ",
"pincode": 560049,
"state": "Karnataka",
"country": "India"
},
"partner_meta": { "key1": "value1" }
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dob: '1987-01-06',
designation: 'Mr.',
first_name: 'Test',
middle_name: '',
last_name: 'Patient',
gender: 'M',
address: {
city: 'Bangalore',
line1: 'ABC',
line2: 'XYZ',
pincode: 560049,
state: 'Karnataka',
country: 'India'
},
partner_meta: {key1: 'value1'}
})
};
fetch('https://api.eka.care/dr/v1/patient/{patient_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/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/patient/{patient_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\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/dr/v1/patient/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patient_id": "123456789"
}{
"error": {
"code": "NOT_ALLOWED",
"message": "You are not allowed to add resource"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
}Patient Directory APIs
Update Patient Details
Thi API provides functionality to update patient details for the registered patients.
PATCH
/
dr
/
v1
/
patient
/
{patient_id}
Update Patient Details
curl --request PATCH \
--url https://api.eka.care/dr/v1/patient/{patient_id} \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"dob": "1987-01-06",
"designation": "Mr.",
"first_name": "Test",
"middle_name": "",
"last_name": "Patient",
"gender": "M",
"address": {
"city": "Bangalore",
"line1": "ABC",
"line2": "XYZ",
"pincode": 560049,
"state": "Karnataka",
"country": "India"
},
"partner_meta": {
"key1": "value1"
}
}
'import requests
url = "https://api.eka.care/dr/v1/patient/{patient_id}"
payload = {
"dob": "1987-01-06",
"designation": "Mr.",
"first_name": "Test",
"middle_name": "",
"last_name": "Patient",
"gender": "M",
"address": {
"city": "Bangalore",
"line1": "ABC",
"line2": "XYZ",
"pincode": 560049,
"state": "Karnataka",
"country": "India"
},
"partner_meta": { "key1": "value1" }
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dob: '1987-01-06',
designation: 'Mr.',
first_name: 'Test',
middle_name: '',
last_name: 'Patient',
gender: 'M',
address: {
city: 'Bangalore',
line1: 'ABC',
line2: 'XYZ',
pincode: 560049,
state: 'Karnataka',
country: 'India'
},
partner_meta: {key1: 'value1'}
})
};
fetch('https://api.eka.care/dr/v1/patient/{patient_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/dr/v1/patient/{patient_id}")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/dr/v1/patient/{patient_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\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/dr/v1/patient/{patient_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dob\": \"1987-01-06\",\n \"designation\": \"Mr.\",\n \"first_name\": \"Test\",\n \"middle_name\": \"\",\n \"last_name\": \"Patient\",\n \"gender\": \"M\",\n \"address\": {\n \"city\": \"Bangalore\",\n \"line1\": \"ABC\",\n \"line2\": \"XYZ\",\n \"pincode\": 560049,\n \"state\": \"Karnataka\",\n \"country\": \"India\"\n },\n \"partner_meta\": {\n \"key1\": \"value1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"patient_id": "123456789"
}{
"error": {
"code": "NOT_ALLOWED",
"message": "You are not allowed to add resource"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
}Headers
Query Parameters
Body
application/json
Request body for updating a patient to the directory
- DOB
- AGE
Was this page helpful?

