Generate IPID
curl --request POST \
--url https://api.eka.care/ipd/v1/service/admissions/generate-ipid \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/admissions/generate-ipid"
headers = {"auth": "<auth>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/admissions/generate-ipid', 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/ipd/v1/service/admissions/generate-ipid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$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/ipd/v1/service/admissions/generate-ipid"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/v1/service/admissions/generate-ipid")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/admissions/generate-ipid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"ipid": "IPD1043"
}
}{
"success": true,
"error": "<string>"
}{
"message": "<string>"
}Admissions
Generate IPID
Overview
This API generates the next IPD case number (IPID) for your workspace, as prefix followed by a running number.
Each call uses up a number: the running number is increased by one and the new value is returned, so calling it twice returns two different IPIDs. The prefix and running number are set with Update IPID Config. For a workspace that has never set it, the first IPID is IPD1.
GET on the same path behaves exactly the same, including using up a number.
POST
/
ipd
/
v1
/
service
/
admissions
/
generate-ipid
Generate IPID
curl --request POST \
--url https://api.eka.care/ipd/v1/service/admissions/generate-ipid \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/ipd/v1/service/admissions/generate-ipid"
headers = {"auth": "<auth>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/ipd/v1/service/admissions/generate-ipid', 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/ipd/v1/service/admissions/generate-ipid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"auth: <auth>"
],
]);
$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/ipd/v1/service/admissions/generate-ipid"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("auth", "<auth>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eka.care/ipd/v1/service/admissions/generate-ipid")
.header("auth", "<auth>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eka.care/ipd/v1/service/admissions/generate-ipid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"ipid": "IPD1043"
}
}{
"success": true,
"error": "<string>"
}{
"message": "<string>"
}Was this page helpful?

