Find patient history by ID
curl --request GET \
--url https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId} \
--header 'api_key: <api-key>'import requests
url = "https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}', 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://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$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://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"patientId": 234796,
"name": "Subin",
"medicine": "Dolo 650",
"dosage": "650 mg",
"history": [
{
"disease1": "Viral Fever",
"disease2": "Cold",
"disease3": "Typhoid"
}
],
"visits": 2,
"lastvisit": "01/03/2024"
}Patient History
Retrieve patient history by ID
Finds history of diseases by patient ID.
GET
/
history
/
{patientId}
Find patient history by ID
curl --request GET \
--url https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId} \
--header 'api_key: <api-key>'import requests
url = "https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}', 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://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$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://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/SUBIN23K/Subin_Health/1.0.0/history/{patientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"patientId": 234796,
"name": "Subin",
"medicine": "Dolo 650",
"dosage": "650 mg",
"history": [
{
"disease1": "Viral Fever",
"disease2": "Cold",
"disease3": "Typhoid"
}
],
"visits": 2,
"lastvisit": "01/03/2024"
}Authorizations
Path Parameters
Patient's ID
Response
Successful operation
Record of a patient's medical history.
Unique identifier for the patient.
Example:
234796
Registered name of the patient.
Example:
"Subin"
Name of the prescribed medicine.
Example:
"Dolo 650"
Prescribed dosage of the medicine.
Example:
"650 mg"
List of the patient's previously diagnosed diseases.
Show child attributes
Show child attributes
Total number of visits the patient has made to the hospital.
Example:
2
Date of the patient's most recent hospital visit (DD/MM/YYYY).
Example:
"01/03/2024"
Last modified on May 2, 2024
Was this page helpful?