NAV
bash javascript

Info

Welcome to EMX API reference.

general

Authorization

Getting the api key

  1. Login to EMX as a hospital administrator under your registered hospital
  2. Click api settings on the left menu
  3. Enter your login password
  4. Copy the generated key to a secure location

Headers

Use the headers as shown below:

  1. Accept: application/json
  2. Authorization: Bearer "Generated api key/token"

Register patient to emx

Example request:

curl -X POST "http://localhost/api/v1/patients/create" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/create",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "message": "Patient created successfully",
    "data": "EMX patient number: ehrfik46"
}

HTTP Request

POST api/v1/patients/create

Query Parameters

Parameter Type Required Description
first_name string Yes Patient first name
last_name string Yes Patient last name
dob date Yes Patient date of birth
address string Yes Patient address
gender integer Yes Patient gender
country integer Yes Patient country
province String Yes Patient province
phone string Yes Patient phone
emergency_contact_name string Yes Patient emergency contact name
emergency_contact_phone string Yes Patient emergency contact phone
city string No Patient city
method_of_communication string No Patient preferred method of communication
zip_code string No Patient zip code
local_government_area string No Patient local government area

Edit registered patient

Example request:

curl -X POST "http://localhost/api/v1/patients/edit" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/edit",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/patients/edit

Query Parameters

Parameter Type Required Description
first_name string Yes Patient first name
last_name string Yes Patient last name
dob date Yes Patient date of birth
address string Yes Patient address
gender integer Yes Patient gender
country integer Yes Patient country
province String Yes Patient province
phone string Yes Patient phone
emergency_contact_name string Yes Patient emergency contact name
emergency_contact_phone string Yes Patient emergency contact phone
city string No Patient city
method_of_communication string No Patient preferred method of communication
zip_code string No Patient zip code
local_government_area string No Patient local government area

Show patient details by EMX Patient Number

Example request:

curl -X GET "http://localhost/api/v1/patients/show/patient/number/{emx_patient_no}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/show/patient/number/{emx_patient_no}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": {
        "id": 14,
        "emx_patient_no": "ehrfik46",
        "user_id": 40,
        "emergency_contacts": "+254721876543",
        "emergency_contacts_name": "Minor",
        "type": 1,
        "profession": null,
        "home_phone": null,
        "method_of_communication": null,
        "employer_phone": null,
        "pharmacy_name": null,
        "pharmacy_address": null,
        "payment_method": "cash",
        "relation": null,
        "employer_name": null,
        "pharmacy_phone": null,
        "notes": null,
        "created_at": "2018-11-03 13:38:31",
        "updated_at": "2018-11-03 13:38:31",
        "first_name": "theed2",
        "last_name": "pat1",
        "email": "pat1@theed.com",
        "dob": "1992-01-25",
        "phone": "+254712345679"
    }
}

HTTP Request

GET api/v1/patients/show/patient/number/{emx_patient_no}

Query Parameters

Parameter Type Required Description
emx_patient_no string Yes Patient Emx Number

Show patient details by Patient Phone Number

Example request:

curl -X GET "http://localhost/api/v1/patients/show/patient/phone/{phone}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/show/patient/phone/{phone}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": {
        "id": 14,
        "emx_patient_no": "ehrfik46",
        "user_id": 40,
        "emergency_contacts": "+254721876543",
        "emergency_contacts_name": "Minor",
        "type": 1,
        "profession": null,
        "home_phone": null,
        "method_of_communication": null,
        "employer_phone": null,
        "pharmacy_name": null,
        "pharmacy_address": null,
        "payment_method": "cash",
        "relation": null,
        "employer_name": null,
        "pharmacy_phone": null,
        "notes": null,
        "created_at": "2018-11-03 13:38:31",
        "updated_at": "2018-11-03 13:38:31",
        "first_name": "theed2",
        "last_name": "pat1",
        "email": "pat1@theed.com",
        "dob": "1992-01-25",
        "phone": "+254712345679"
    }
}

HTTP Request

GET api/v1/patients/show/patient/phone/{phone}

Query Parameters

Parameter Type Required Description
phone string Yes Patient Phone Number

Add patient record

Required fields: note_type, record,

Example request:

curl -X POST "http://localhost/api/v1/patients/add/doctors/note" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/add/doctors/note",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/patients/add/doctors/note

Query Parameters

Parameter Type Required Description
note_type string Yes Emx Note type from note type list
record json Yes Description and notes of the note type
emx_patient_no string Yes Emx patient number
emx_doctor_no string Yes Emx doctor number

Doctor's note types

Example request:

curl -X GET "http://localhost/api/v1/patients/fetch/note/types" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/fetch/note/types",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": {
        "Chief Complaints": {
            "note_parameters": [
                {
                    "name": "Chief Complaints"
                },
                {
                    "name": "Notes"
                }
            ]
        },
        "History Of Present Illness": {
            "note_parameters": [
                {
                    "name": "HPI"
                },
                {
                    "name": "Notes"
                }
            ]
        },
        "Vitals": {
            "note_parameters": [
                {
                    "name": "Height(cm)"
                },
                {
                    "name": "Weight(kg)"
                },
                {
                    "name": "BMI"
                },
                {
                    "name": "BP"
                },
                {
                    "name": "Temperature ( °c)"
                },
                {
                    "name": "Pulse"
                },
                {
                    "name": "Respiratory Rate"
                },
                {
                    "name": "Pain level (0-10)"
                }
            ]
        },
        "Allergies": {
            "note_parameters": [
                {
                    "name": "Allergies"
                },
                {
                    "name": "Notes"
                }
            ]
        },
        "Current Medications": {
            "note_parameters": [
                {
                    "name": "Medications"
                },
                {
                    "name": "Notes"
                }
            ]
        },
        "Past Medical History": {
            "note_parameters": [
                {
                    "name": "Past Medical History"
                },
                {
                    "name": "Notes"
                }
            ]
        },
        "Family History": {
            "note_parameters": [
                {
                    "name": "Family History"
                }
            ]
        },
        "Social History": {
            "note_parameters": [
                {
                    "name": "Social History"
                }
            ]
        },
        "Previous Screenings": {
            "note_parameters": [
                {
                    "name": "Previous Screenings"
                }
            ]
        },
        "Review Of Systems": {
            "note_parameters": [
                {
                    "name": "Constitutional"
                },
                {
                    "name": "Constitutional Notes"
                },
                {
                    "name": "Eyes"
                },
                {
                    "name": "Eyes Notes"
                },
                {
                    "name": "Ears"
                },
                {
                    "name": "Ears Notes"
                },
                {
                    "name": "Nose"
                },
                {
                    "name": "Nose notes"
                },
                {
                    "name": "Mouth/Throat"
                },
                {
                    "name": "Mouth/Throat Notes"
                },
                {
                    "name": "Cardiovascular"
                },
                {
                    "name": "Cardiovascular Notes"
                },
                {
                    "name": "Respiratory"
                },
                {
                    "name": "Respiratory Notes"
                },
                {
                    "name": "Gastrointestinal"
                },
                {
                    "name": "Gastrointestinal Notes"
                },
                {
                    "name": "Genitourinary"
                },
                {
                    "name": "Genitourinary Notes"
                },
                {
                    "name": "Musculoskeletal"
                },
                {
                    "name": "Musculoskeletal Notes"
                },
                {
                    "name": "Skin"
                },
                {
                    "name": "Skin Notes"
                },
                {
                    "name": "Neurologic"
                },
                {
                    "name": "Neurologic Notes"
                },
                {
                    "name": "Psychiatric"
                },
                {
                    "name": "Psychiatric Notes"
                },
                {
                    "name": "Endocrine"
                },
                {
                    "name": "Endocrine Notes"
                },
                {
                    "name": "Hematologic/Lymphatic"
                },
                {
                    "name": "Hematologic/Lymphatic Notes"
                },
                {
                    "name": "Allergy/Immunologic"
                },
                {
                    "name": "Allergy/Immunologic Notes"
                }
            ]
        },
        "Physical Examination": {
            "note_parameters": [
                {
                    "name": "General Apperarance"
                },
                {
                    "name": "General Appearance Notes"
                },
                {
                    "name": "Level Of Distress"
                },
                {
                    "name": "Level Of Distress Notes"
                },
                {
                    "name": "Ambulation"
                },
                {
                    "name": "Ambulation Notes"
                },
                {
                    "name": "Insight"
                },
                {
                    "name": "Insight Notes"
                },
                {
                    "name": "Mental Status"
                },
                {
                    "name": "Mental Status Notes"
                },
                {
                    "name": "Orientation"
                },
                {
                    "name": "Orientation Notes"
                },
                {
                    "name": "Memory"
                },
                {
                    "name": "Memory Notes"
                },
                {
                    "name": "Head"
                },
                {
                    "name": "Head Notes"
                },
                {
                    "name": "Lids and Conjunctivae"
                },
                {
                    "name": "Lids and Conjunctivae Notes"
                },
                {
                    "name": "Pupils"
                },
                {
                    "name": "Pupils Notes"
                },
                {
                    "name": "Corneas"
                },
                {
                    "name": "Corneas"
                },
                {
                    "name": "Fundoscopic"
                },
                {
                    "name": "Fundoscopic Notes"
                },
                {
                    "name": "EOM"
                },
                {
                    "name": "EOM Notes"
                },
                {
                    "name": "Lens"
                },
                {
                    "name": "Lens Notes"
                },
                {
                    "name": "Sclerae"
                },
                {
                    "name": "Slerae Notes"
                },
                {
                    "name": "Vision"
                },
                {
                    "name": "Vision Notes"
                },
                {
                    "name": "Ears"
                },
                {
                    "name": "Ears Notes"
                },
                {
                    "name": "Hearing"
                },
                {
                    "name": "Hearing Notes"
                },
                {
                    "name": "Nose"
                },
                {
                    "name": "Nose Notes"
                },
                {
                    "name": "Lips, Teeth, and Gums"
                },
                {
                    "name": "Lips, Teeth, and Gums Notes"
                },
                {
                    "name": "Oropharynx"
                },
                {
                    "name": "Oropharynx Notes"
                },
                {
                    "name": "Neck"
                },
                {
                    "name": "Neck Notes"
                },
                {
                    "name": "Lymph Nodes"
                },
                {
                    "name": "Lymph Nodes Notes"
                },
                {
                    "name": "Thyroid"
                },
                {
                    "name": "Thyroid Notes"
                },
                {
                    "name": "Respiratory effort"
                },
                {
                    "name": "Respiratory Effort Notes"
                },
                {
                    "name": "Percussion"
                },
                {
                    "name": "Percussion Notes"
                },
                {
                    "name": "Auscultation"
                },
                {
                    "name": "Auscultation Notes"
                },
                {
                    "name": "Apical Impulse"
                },
                {
                    "name": "Apical Impulse Notes"
                },
                {
                    "name": "Heart Auscultation"
                },
                {
                    "name": "Heart Auscultation Notes"
                },
                {
                    "name": "Neck vessels"
                },
                {
                    "name": "Neck vessels Notes"
                },
                {
                    "name": "Pulses including femoral / pedal"
                },
                {
                    "name": "Pulses including femoral / pedal Notes"
                },
                {
                    "name": "Bowel Sounds"
                },
                {
                    "name": "Bowel Sounds Notes"
                },
                {
                    "name": "Inspection and Palpation"
                },
                {
                    "name": "Inspection and Palpation Notes"
                },
                {
                    "name": "Liver"
                },
                {
                    "name": "Liver Notes"
                },
                {
                    "name": "Spleen"
                },
                {
                    "name": "Spleen Notes"
                },
                {
                    "name": "Hernia"
                },
                {
                    "name": "Hernia Notes"
                },
                {
                    "name": "Penis"
                },
                {
                    "name": "Penis Notes"
                },
                {
                    "name": "Scrotum"
                },
                {
                    "name": "Scrotum Notes"
                },
                {
                    "name": "Testes"
                },
                {
                    "name": "Testes Notes"
                },
                {
                    "name": "Prostate"
                },
                {
                    "name": "Prostate Notes"
                },
                {
                    "name": "Anus, Perineum, Rectum"
                },
                {
                    "name": "Anus, Perineum, Rectum Notes"
                },
                {
                    "name": "Motor Strength and Tone"
                },
                {
                    "name": "Motor Strength and Tone Notes"
                },
                {
                    "name": "Joints, Bones, and Muscles"
                },
                {
                    "name": "Joints, Bones, and Muscles Notes"
                },
                {
                    "name": "Extremities"
                },
                {
                    "name": "Extremities Notes"
                },
                {
                    "name": "Gait and Station"
                },
                {
                    "name": "Gait and Station Notes"
                },
                {
                    "name": "Cranial Nerves"
                },
                {
                    "name": "Cranial Nerves Notes"
                },
                {
                    "name": "Sensation"
                },
                {
                    "name": "Sensation Notes"
                },
                {
                    "name": "Reflexes"
                },
                {
                    "name": "Reflexes Notes"
                },
                {
                    "name": "Coordination and Cerebellum"
                },
                {
                    "name": "Coordination and Cerebellum Notes"
                },
                {
                    "name": "Inspection and palpation"
                },
                {
                    "name": "Inspection and palpation Notes"
                },
                {
                    "name": "Nails"
                },
                {
                    "name": "Nails Notes"
                },
                {
                    "name": "Thoracolumbar Appearance"
                },
                {
                    "name": "Thoracolumbar Appearance Notes"
                }
            ]
        },
        "Assessment": {
            "note_parameters": [
                {
                    "name": "Diagnosis"
                },
                {
                    "name": "Notes"
                }
            ]
        }
    }
}

HTTP Request

GET api/v1/patients/fetch/note/types

Schedule a patient visit

Example request:

curl -X POST "http://localhost/api/v1/patients/schedule/visit" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/schedule/visit",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/patients/schedule/visit

Patient visist schedule types

Example request:

curl -X GET "http://localhost/api/v1/patients/schedule/types" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/schedule/types",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": [
        {
            "id": 1,
            "name": "Follow Up Visit"
        },
        {
            "id": 2,
            "name": "New Patient Visit"
        },
        {
            "id": 3,
            "name": "Walk In"
        }
    ]
}

HTTP Request

GET api/v1/patients/schedule/types

List of registered doctors

Example request:

curl -X GET "http://localhost/api/v1/doctors" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/doctors",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": [],
    "links": {
        "first": "http:\/\/staging.emx.md\/api\/v1\/doctors?page=1",
        "last": "http:\/\/staging.emx.md\/api\/v1\/doctors?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "http:\/\/staging.emx.md\/api\/v1\/doctors",
        "per_page": 10,
        "to": null,
        "total": 0
    }
}

HTTP Request

GET api/v1/doctors

Register a Doctor

Example request:

curl -X POST "http://localhost/api/v1/doctors/create" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/doctors/create",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/doctors/create

Query Parameters

Parameter Type Required Description
first_name string Yes Doctor first name
last_name string Yes Doctor last name
email string Yes Doctor email
dob date Yes Doctor date of birth
address string Yes Doctor address
gender integer Yes Doctor gender
country integer Yes Doctor country of operation
province string Yes Doctor province/state of operation
phone string Yes Doctor phone
zip_code string No Doctor zip code
local_government_area string No Doctor local government area

Edit Doctor's info

Example request:

curl -X POST "http://localhost/api/v1/doctors/edit" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/doctors/edit",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/doctors/edit

Query Parameters

Parameter Type Required Description
first_name string Yes Doctor first name
last_name string Yes Doctor last name
email string Yes Doctor email
dob date Yes Doctor date of birth
address string Yes Doctor address
gender integer Yes Doctor gender
country integer Yes Doctor country of operation
province string Yes Doctor province/state of operation
phone string Yes Doctor phone
emx_doc_no string Yes System generated EMX doctor number
zip_code string No Doctor zip code
local_government_area string No Doctor local government area

Show doctor by EMX doctor number

Example request:

curl -X GET "http://localhost/api/v1/doctors/show/{emx_doc_no}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/doctors/show/{emx_doc_no}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": {
        "emx_doc_no": "drrxddgx",
        "first_name": "John",
        "last_name": "Doe",
        "email": "example@hospital.com",
        "phone": "07108938011"
    }
}

HTTP Request

GET api/v1/doctors/show/{emx_doc_no}

List pharmacies

Example request:

curl -X GET "http://localhost/api/v1/pharmacies" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/pharmacies",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": [
        {
            "id": 1,
            "name": "Chemist",
            "email": "chemist@emx.md",
            "geo_location": null,
            "address": "kindaruma road, blue violet plaza, 306",
            "country": 3,
            "state_province": "Nairobi",
            "zip_code": "00200",
            "street": "Joseph Kangethe",
            "branch_type": 1,
            "created_at": "2018-05-17 05:01:03",
            "updated_at": "2018-05-17 05:01:03"
        }
    ],
    "links": {
        "first": "http:\/\/staging.emx.md\/api\/v1\/pharmacies?page=1",
        "last": "http:\/\/staging.emx.md\/api\/v1\/pharmacies?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http:\/\/staging.emx.md\/api\/v1\/pharmacies",
        "per_page": 10,
        "to": 1,
        "total": 1
    }
}

HTTP Request

GET api/v1/pharmacies

Create a new pharmacy

Query Parameters

Parameter Type Required Description
name string Yes Pharmacy name
email string Yes Pharmacy email
address string Yes Pharmacy address
country integer Yes Pharmacy country of operation
state string Yes Pharmacy province/state of operation
street string Yes Pharmacy street
zip_code string No Pharmacy zip code
branch_type string No 1. for main branch 2. for sub branch

Example request:

curl -X POST "http://localhost/api/v1/pharmacies/create" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/pharmacies/create",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:


                {
     "status": "success",
     "message": "Pharmacy created successfully"
     }
            

HTTP Request

POST api/v1/pharmacies/create

Edit Pharmacy

Query Parameters

Parameter Type Required Description
name string Yes Pharmacy name
email string Yes Pharmacy email
address string Yes Pharmacy address
country integer Yes Pharmacy country of operation
state string Yes Pharmacy province/state of operation
street string Yes Pharmacy street
pharmacy_id integer yes id of the pharmacy being edited
zip_code string No Pharmacy zip code
branch_type string No 1. for main branch 2. for sub branch

Example request:

curl -X POST "http://localhost/api/v1/pharmacies/edit" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/pharmacies/edit",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:


                {
     "status": "success",
     "message": "Pharmacy edited successfully"
     }
            

HTTP Request

POST api/v1/pharmacies/edit

Search medications from EMX meds database

Example request:

curl -X GET "http://localhost/api/v1/pharmacies/medications/{phrase}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/pharmacies/medications/{phrase}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

{
    "status": "success",
    "data": [
        {
            "suggestion_name": "Carboplatin (Paraplatin)- FDA"
        },
        {
            "suggestion_name": "Carboplatin (Paraplatin)- Multum"
        },
        {
            "suggestion_name": "Paraplatin (Carboplatin)- FDA"
        },
        {
            "suggestion_name": "Paraplatin (Carboplatin)- Multum"
        }
    ]
}

HTTP Request

GET api/v1/pharmacies/medications/{phrase}

Prescribe medication

Query Parameters

Parameter Type Required Description
med_name string Yes Name of medication
frequency string Yes Number of times a day e.g. 1x3
quantity string Yes Amount of medication
start_date date Yes Medication start date (Date format: yyyy-mm-dd)
end_date date Yes Medication end date (Date format: yyyy-mm-dd)
route string Yes Oral/intravenous
emx_patient_no string Yes Patient EMX Number

Example request:

            curl -X POST "http://localhost/api/v1/pharmacies/prescribe" \
-H "Accept: application/json"
            
        
            var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/pharmacies/prescribe",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
            
        

HTTP Request

POST api/v1/pharmacies/prescribe

List of Countries

Example request:

            
                curl -X GET "http://localhost/api/v1/patients/countries" \
-H "Accept: application/json"
            
        
            var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/countries",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
            
        

Example response:

            {
    "status": "success",
    "data": [
        {
            "id": 119,
            "county_name": "Kenya",
            "calling_code": "254"
        }
    ]
}

HTTP Request

GET api/v1/patients/countries

List of genders

Example request:

            
                curl -X GET "http://localhost/api/v1/patients/gender" \
-H "Accept: application/json"
            
        
            var settings = {
    "async": true,
    "crossDomain": true,
    "url": "http://localhost/api/v1/patients/gender",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
            
        

Example response:

{
    "status": "success",
    "data": [
        {
            "id": 1,
            "gender_name": "Male"
        },
        {
            "id": 2,
            "gender_name": "Female"
        }
    ]
}
            

HTTP Request

GET api/v1/patients/gender