Update Document
curl --request PATCH \
--url https://api.eka.care/mr/api/v1/docs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Pt-Id: <x-pt-id>' \
--data '
{
"dt": "lr",
"ndhm": true,
"oid": "161847797963700",
"dd_e": 1614556800,
"tg": [
"covid"
],
"cases": [
"<string>"
],
"metadata": "<string>"
}
'import requests
url = "https://api.eka.care/mr/api/v1/docs/{id}"
payload = {
"dt": "lr",
"ndhm": True,
"oid": "161847797963700",
"dd_e": 1614556800,
"tg": ["covid"],
"cases": ["<string>"],
"metadata": "<string>"
}
headers = {
"X-Pt-Id": "<x-pt-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Pt-Id': '<x-pt-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dt: 'lr',
ndhm: true,
oid: '161847797963700',
dd_e: 1614556800,
tg: ['covid'],
cases: ['<string>'],
metadata: '<string>'
})
};
fetch('https://api.eka.care/mr/api/v1/docs/{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/mr/api/v1/docs/{id}")
.header("X-Pt-Id", "<x-pt-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/mr/api/v1/docs/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Pt-Id", "<x-pt-id>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/mr/api/v1/docs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Pt-Id"] = '<x-pt-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMedical Records
Update Document
This API is used to update the document.
PATCH
/
mr
/
api
/
v1
/
docs
/
{id}
Update Document
curl --request PATCH \
--url https://api.eka.care/mr/api/v1/docs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Pt-Id: <x-pt-id>' \
--data '
{
"dt": "lr",
"ndhm": true,
"oid": "161847797963700",
"dd_e": 1614556800,
"tg": [
"covid"
],
"cases": [
"<string>"
],
"metadata": "<string>"
}
'import requests
url = "https://api.eka.care/mr/api/v1/docs/{id}"
payload = {
"dt": "lr",
"ndhm": True,
"oid": "161847797963700",
"dd_e": 1614556800,
"tg": ["covid"],
"cases": ["<string>"],
"metadata": "<string>"
}
headers = {
"X-Pt-Id": "<x-pt-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Pt-Id': '<x-pt-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dt: 'lr',
ndhm: true,
oid: '161847797963700',
dd_e: 1614556800,
tg: ['covid'],
cases: ['<string>'],
metadata: '<string>'
})
};
fetch('https://api.eka.care/mr/api/v1/docs/{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/mr/api/v1/docs/{id}")
.header("X-Pt-Id", "<x-pt-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/mr/api/v1/docs/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Pt-Id", "<x-pt-id>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/mr/api/v1/docs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Pt-Id"] = '<x-pt-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dt\": \"lr\",\n \"ndhm\": true,\n \"oid\": \"161847797963700\",\n \"dd_e\": 1614556800,\n \"tg\": [\n \"covid\"\n ],\n \"cases\": [\n \"<string>\"\n ],\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
eka user id (OID)
Path Parameters
Document ID to update the document details.
Example:
"2df9e795-d368-4ceb-be9d-b44281703827"
Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Example:
"lr"
If true, the record will be linked.
Example:
true
OID associated with the document.
Example:
"161847797963700"
Format should be in epoch seconds.
Example:
1614556800
Tags associated with the uploaded documents. The rules for tags are the same as the upload API.
Example:
["covid"]
List of cases linked with Medical Record.
Metadata associated with document (FHIR Bundle Format).
Response
Document linked successfully.
Was this page helpful?

