Patient records
Show an authorized consultation detail
Returns an authorized visit with its recorded organization and branch, including inactive branches. The branch includes its current address and contact details when available. Use appointment.starts_at for the scheduled time and starts_at for the clinical start time. Send include=encounter to receive the nullable encounter_id.
GET
/
api
/
v1
/
patient_portal
/
consultations
/
{id}
Show an authorized consultation detail
curl --request GET \
--url https://api.example.test/api/v1/patient_portal/consultations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.test/api/v1/patient_portal/consultations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.test/api/v1/patient_portal/consultations/{id}', 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.example.test/api/v1/patient_portal/consultations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.example.test/api/v1/patient_portal/consultations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.test/api/v1/patient_portal/consultations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/api/v1/patient_portal/consultations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"consultation": {
"appointment": {
"id": 123,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"time_zone": "<string>",
"schedule_type": "<string>"
},
"id": 123,
"cause": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"doctor_name": "<string>",
"organization_name": "<string>",
"organization": {
"id": 101,
"name": "Example Clinic"
},
"location": {
"id": 202,
"name": "Central Branch",
"active": true,
"address": "123 Example Avenue",
"city": "Example City",
"postal_code": "01000",
"telephone": "",
"state": {
"id": 301,
"name": "Example State"
},
"country": {
"id": 401,
"name_es": "Mexico",
"name_en": "Mexico",
"code": "MX"
}
},
"notes": [
{
"id": 123,
"person_id": 123,
"consultation_id": 123,
"comment": "<string>",
"note_type": "<string>",
"account_id": 123,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"voice_note_file_name": "<string>",
"voice_note_content_type": "<string>",
"voice_note_file_size": 123,
"voice_note_updated_at": "2023-11-07T05:31:56Z",
"operating_room_request_id": 123,
"editable": true,
"transcription_status": "<string>",
"voice_note_duration": 123,
"metadata": {}
}
],
"lab_tests": [
{
"id": 123,
"consultation_id": 123,
"description": "<string>",
"lab_test_id": 123,
"custom_name": "<string>",
"metadata": {},
"diagnosis1": "<string>",
"diagnosis1_code": "<string>",
"account_id": 123
}
],
"instructions": "<string>",
"treatment": "<string>",
"vital_signs_set": {
"id": 123,
"consultation_id": 123,
"person_id": 123,
"account_id": 123,
"elements": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"set_type": "<string>",
"metadata": {}
},
"medical_history_attachments": [
{
"id": 123,
"attachment_file_name": "<string>",
"attachment_content_type": "<string>",
"attachment_file_size": 123,
"attachment_updated_at": "2023-11-07T05:31:56Z",
"medical_history_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attachment_file_name_alias": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"updater_id": 123,
"consultation_id": 123,
"metadata": {}
}
],
"lab_test_results": {
"id": 123,
"consultation_id": 123,
"elements": {},
"created_at": "2023-11-07T05:31:56Z"
},
"prescriptions": [
{
"doctor": "<string>",
"date": "2023-11-07T05:31:56Z",
"instrucctions": "<string>",
"drugs": [
{
"name": "<string>",
"dose": "<string>",
"frequency": "<string>",
"duration": "<string>"
}
]
}
],
"encounter_id": 123
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Authorizations
Query Parameters
⌘I
Show an authorized consultation detail
curl --request GET \
--url https://api.example.test/api/v1/patient_portal/consultations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.test/api/v1/patient_portal/consultations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.test/api/v1/patient_portal/consultations/{id}', 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.example.test/api/v1/patient_portal/consultations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.example.test/api/v1/patient_portal/consultations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.test/api/v1/patient_portal/consultations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/api/v1/patient_portal/consultations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"consultation": {
"appointment": {
"id": 123,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"time_zone": "<string>",
"schedule_type": "<string>"
},
"id": 123,
"cause": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"doctor_name": "<string>",
"organization_name": "<string>",
"organization": {
"id": 101,
"name": "Example Clinic"
},
"location": {
"id": 202,
"name": "Central Branch",
"active": true,
"address": "123 Example Avenue",
"city": "Example City",
"postal_code": "01000",
"telephone": "",
"state": {
"id": 301,
"name": "Example State"
},
"country": {
"id": 401,
"name_es": "Mexico",
"name_en": "Mexico",
"code": "MX"
}
},
"notes": [
{
"id": 123,
"person_id": 123,
"consultation_id": 123,
"comment": "<string>",
"note_type": "<string>",
"account_id": 123,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"voice_note_file_name": "<string>",
"voice_note_content_type": "<string>",
"voice_note_file_size": 123,
"voice_note_updated_at": "2023-11-07T05:31:56Z",
"operating_room_request_id": 123,
"editable": true,
"transcription_status": "<string>",
"voice_note_duration": 123,
"metadata": {}
}
],
"lab_tests": [
{
"id": 123,
"consultation_id": 123,
"description": "<string>",
"lab_test_id": 123,
"custom_name": "<string>",
"metadata": {},
"diagnosis1": "<string>",
"diagnosis1_code": "<string>",
"account_id": 123
}
],
"instructions": "<string>",
"treatment": "<string>",
"vital_signs_set": {
"id": 123,
"consultation_id": 123,
"person_id": 123,
"account_id": 123,
"elements": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"set_type": "<string>",
"metadata": {}
},
"medical_history_attachments": [
{
"id": 123,
"attachment_file_name": "<string>",
"attachment_content_type": "<string>",
"attachment_file_size": 123,
"attachment_updated_at": "2023-11-07T05:31:56Z",
"medical_history_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attachment_file_name_alias": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"updater_id": 123,
"consultation_id": 123,
"metadata": {}
}
],
"lab_test_results": {
"id": 123,
"consultation_id": 123,
"elements": {},
"created_at": "2023-11-07T05:31:56Z"
},
"prescriptions": [
{
"doctor": "<string>",
"date": "2023-11-07T05:31:56Z",
"instrucctions": "<string>",
"drugs": [
{
"name": "<string>",
"dose": "<string>",
"frequency": "<string>",
"duration": "<string>"
}
]
}
],
"encounter_id": 123
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}