Add a form
curl --request POST \
--url https://api.eka.care/protocol/workflow/forms \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"entity_id": "<string>",
"form_id": "<string>",
"form_name": "<string>",
"patient_id": "<string>"
}
'import requests
url = "https://api.eka.care/protocol/workflow/forms"
payload = {
"entity_id": "<string>",
"form_id": "<string>",
"form_name": "<string>",
"patient_id": "<string>"
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_id: '<string>',
form_id: '<string>',
form_name: '<string>',
patient_id: '<string>'
})
};
fetch('https://api.eka.care/protocol/workflow/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/protocol/workflow/forms")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/forms");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"bid": "<string>",
"entity_type": "ADMISSION",
"entity_id": "<string>",
"patient_id": "<string>",
"kind": "SA",
"form_id": "<string>",
"form_name": "<string>",
"status": "IN_PROGRESS",
"response_id": "<string>",
"response_url": "<string>",
"created_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"completed_at": "2023-11-07T05:31:56Z",
"signer": {
"kind": "patient"
},
"closed_note": "<string>",
"closed_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"closed_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Forms
Add a form
Starts a form on an entity; it is IN_PROGRESS.
POST
/
protocol
/
workflow
/
forms
Add a form
curl --request POST \
--url https://api.eka.care/protocol/workflow/forms \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"entity_id": "<string>",
"form_id": "<string>",
"form_name": "<string>",
"patient_id": "<string>"
}
'import requests
url = "https://api.eka.care/protocol/workflow/forms"
payload = {
"entity_id": "<string>",
"form_id": "<string>",
"form_name": "<string>",
"patient_id": "<string>"
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity_id: '<string>',
form_id: '<string>',
form_name: '<string>',
patient_id: '<string>'
})
};
fetch('https://api.eka.care/protocol/workflow/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/protocol/workflow/forms")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/forms");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_id\": \"<string>\",\n \"form_id\": \"<string>\",\n \"form_name\": \"<string>\",\n \"patient_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "<string>",
"bid": "<string>",
"entity_type": "ADMISSION",
"entity_id": "<string>",
"patient_id": "<string>",
"kind": "SA",
"form_id": "<string>",
"form_name": "<string>",
"status": "IN_PROGRESS",
"response_id": "<string>",
"response_url": "<string>",
"created_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"completed_at": "2023-11-07T05:31:56Z",
"signer": {
"kind": "patient"
},
"closed_note": "<string>",
"closed_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"closed_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Headers
The access token. The gateway verifies it and passes the user and the business on.
Body
application/json
Available options:
ADMISSION, APPOINTMENT, PATIENT, PRESCRIPTION Required string length:
1 - 200Available options:
SA, CONSENT, MCERT Required string length:
1 - 200Required string length:
1 - 200Required string length:
1 - 200Was this page helpful?

