MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Consultant Leave

APIs for managing consultant leave groups.

POST api/v1/consultant-leave

Example request:
curl --request POST \
    "http://10.10.8.203:8000/api/v1/consultant-leave" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/consultant-leave"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/consultant-leave

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Consultant Leave

Retrieves consultant leave records based on the provided consultant ID.

Example request:
curl --request GET \
    --get "http://10.10.8.203:8000/api/v1/consultant-leave/consultant/199" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/consultant-leave/consultant/199"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (400):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "Error",
    "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consultant_id' in 'where clause' (Connection: mysql, SQL: select * from `consultant_leaves` where `consultant_id` = 199)",
    "data": []
}
 

Request      

GET api/v1/consultant-leave/consultant/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the consultant. Example: 199

Consultant Schedule

APIs for managing consultant schedules.

POST api/v1/consultant-schedule

Example request:
curl --request POST \
    "http://10.10.8.203:8000/api/v1/consultant-schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/consultant-schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/consultant-schedule

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Consultant Schedule

Retrieves consultant schedules based on the provided consultant ID.

Example request:
curl --request GET \
    --get "http://10.10.8.203:8000/api/v1/consultant-schedule/consultant/199" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/consultant-schedule/consultant/199"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (400):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "Error",
    "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consultant_id' in 'where clause' (Connection: mysql, SQL: select * from `consultant_schedules` where `consultant_id` = 199)",
    "data": []
}
 

Request      

GET api/v1/consultant-schedule/consultant/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the consultant. Example: 199

Lookup

APIs for retrieving lookup data.

Specialities

Retrieves a list of all specialities from the database.

Example request:
curl --request GET \
    --get "http://10.10.8.203:8000/api/v1/lookup/specialities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/lookup/specialities"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "Success",
    "message": null,
    "data": [
        {
            "id": 1,
            "fhims_speciality_id": 1,
            "name": "Psychiatrists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "fhims_speciality_id": 2,
            "name": "Nephrologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 3,
            "fhims_speciality_id": 3,
            "name": "Skin Specialist",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 4,
            "fhims_speciality_id": 4,
            "name": "ENT Specialist",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 5,
            "fhims_speciality_id": 5,
            "name": "Consultant  Physicians",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 6,
            "fhims_speciality_id": 6,
            "name": "Chest Specialists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 7,
            "fhims_speciality_id": 7,
            "name": "Adult  Cardiologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 8,
            "fhims_speciality_id": 8,
            "name": "Paediatric  Cardiologist",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 9,
            "fhims_speciality_id": 9,
            "name": "Child  Specialists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 10,
            "fhims_speciality_id": 10,
            "name": "Paediatric Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 11,
            "fhims_speciality_id": 11,
            "name": "Family  Physicians",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 12,
            "fhims_speciality_id": 12,
            "name": "Gynaecologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 13,
            "fhims_speciality_id": 13,
            "name": "General  Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 14,
            "fhims_speciality_id": 14,
            "name": "Orthopaedic  Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 15,
            "fhims_speciality_id": 15,
            "name": "Endocrinologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 16,
            "fhims_speciality_id": 16,
            "name": "Gastroenterologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 17,
            "fhims_speciality_id": 17,
            "name": "Nutritionist",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 18,
            "fhims_speciality_id": 19,
            "name": "Neuro Physician",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 19,
            "fhims_speciality_id": 20,
            "name": "Neuro  Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 20,
            "fhims_speciality_id": 21,
            "name": "Oncologist",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 21,
            "fhims_speciality_id": 22,
            "name": "Eye  Specialists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 22,
            "fhims_speciality_id": 23,
            "name": "Filter Eye Clinic",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 23,
            "fhims_speciality_id": 24,
            "name": "Urologists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 24,
            "fhims_speciality_id": 25,
            "name": "Plastic Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 25,
            "fhims_speciality_id": 26,
            "name": "Dentists",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 26,
            "fhims_speciality_id": 27,
            "name": "Facio-Maxillary  Surgeons",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 27,
            "fhims_speciality_id": 28,
            "name": "Anaesthesia Clinic",
            "active": 1,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 28,
            "fhims_speciality_id": 30,
            "name": "Vascular Surgeon",
            "active": 1,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/lookup/specialities

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Consultants

Retrieves a list of all consultants from the database.

Example request:
curl --request GET \
    --get "http://10.10.8.203:8000/api/v1/lookup/consultants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://10.10.8.203:8000/api/v1/lookup/consultants"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (400):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "status": "Error",
    "message": "Attempt to read property \"name\" on null",
    "data": []
}
 

Request      

GET api/v1/lookup/consultants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json