NAV
bash javascript php

Info

Welcome to the generated API reference. Get Postman Collection

COVID Case management

Create a case


Requires authentication [api/v3/ext/cases]

Example request:

curl -X POST \
    "http://202.45.145.25/api/v3/ext/cases" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth" \
    -d '{"name":"RC Poudel","age":24,"age_unit":0,"sex":1,"caste":4,"province_id":3,"district_id":24,"municipality_id":293,"ward":5,"tole":"Dhumbarahi","occupation":5,"emergency_contact_one":"9*********","registered_at":"2021-01-01 10:02:20","service_for":1,"service_type":1,"sample_type":3,"sample_collected_date":"2021-01-01","infection_type":1,"lab_id":"MOB120","lab_received_date":"2021-01-01","lab_test_date":"2021-01-02","lab_test_time":"14:53:04","lab_result":3,"imu_swab_id":"1332-201201-21231","is_infected_covid_before":false,"is_received_vaccine":1}'
const url = new URL(
    "http://202.45.145.25/api/v3/ext/cases"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

let body = {
    "name": "RC Poudel",
    "age": 24,
    "age_unit": 0,
    "sex": 1,
    "caste": 4,
    "province_id": 3,
    "district_id": 24,
    "municipality_id": 293,
    "ward": 5,
    "tole": "Dhumbarahi",
    "occupation": 5,
    "emergency_contact_one": "9*********",
    "registered_at": "2021-01-01 10:02:20",
    "service_for": 1,
    "service_type": 1,
    "sample_type": 3,
    "sample_collected_date": "2021-01-01",
    "infection_type": 1,
    "lab_id": "MOB120",
    "lab_received_date": "2021-01-01",
    "lab_test_date": "2021-01-02",
    "lab_test_time": "14:53:04",
    "lab_result": 3,
    "imu_swab_id": "1332-201201-21231",
    "is_infected_covid_before": false,
    "is_received_vaccine": 1
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://202.45.145.25/api/v3/ext/cases',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
        'json' => [
            'name' => 'RC Poudel',
            'age' => 24,
            'age_unit' => 0,
            'sex' => 1,
            'caste' => 4,
            'province_id' => 3,
            'district_id' => 24,
            'municipality_id' => 293,
            'ward' => 5,
            'tole' => 'Dhumbarahi',
            'occupation' => 5,
            'emergency_contact_one' => '9*********',
            'registered_at' => '2021-01-01 10:02:20',
            'service_for' => 1,
            'service_type' => 1,
            'sample_type' => 3,
            'sample_collected_date' => '2021-01-01',
            'infection_type' => 1,
            'lab_id' => 'MOB120',
            'lab_received_date' => '2021-01-01',
            'lab_test_date' => '2021-01-02',
            'lab_test_time' => '14:53:04',
            'lab_result' => 3,
            'imu_swab_id' => '1332-201201-21231',
            'is_infected_covid_before' => false,
            'is_received_vaccine' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "message": "Data Successfully Sync",
    "status": 200
}

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

Example response (500):

{
    "message": "Invalid ........... Please send a valid data as mentioned in API documentation. Error at index:0",
    "status": 500
}

HTTP Request

POST api/v3/ext/cases

Body Parameters

Parameter Type Status Description
name string required The fullname of the case.
age integer required The age of the case.
age_unit integer required 0 = Year, 1 = Month, 2 = Days.
sex integer required 1=>Male, 2=>Female, 3=>Other.
caste integer required 0=>Dalit, 1=>Janajati, 2=>Madhesi, 3=>Muslim, 4=>Brahmin/Chettri, 5=>Other, 6=>Don't know.
province_id integer required The Province ID provided on Federal Info API.
district_id integer required The district ID provided on District API.
municipality_id integer required The municipality ID provided on Municipality API.
ward integer required The valid ward number.
tole string required The tole address.
occupation integer required 1=>Front Line Health Worker, 2=>Doctor ,3=>Nurse ,4=>Police/Army , 5=>Business/Industry, 6=>Teacher/Student/Education, 7=>Journalist, 8=>Agriculture, 9=>Transport/Delivery, 10=>Other
emergency_contact_one string required The valid phone number.
registered_at datetime required The date time format (yyyy-MM-dd HH:mm:ss) of your system's register/created of that case.
service_for integer required 1=>PCR Swab Collection, 2=>Anitgen Test.
service_type integer required 1=>Paid service, 2=>Free of cost service.
sample_type integer required 1=>Nasopharyngeal, 2=>Oropharyngeal, 3=>Both.
sample_collected_date date required The date time format (yyyy-MM-dd HH:mm:ss) of sample collection of that case.
infection_type integer required 1=>Symptomatic, 2=>Asymptomatic.
lab_id string required The Unique id for case in lab.
lab_received_date date required The date format (yyyy-MM-dd) of sample recieved in lab of case.
lab_test_date date required The date time format (yyyy-MM-dd HH:mm:ss) of sample test of case.
lab_test_time time required The time format (HH:mm:ss) of sample collection of that case.
lab_result integer required 3=> Positive, 4 => Negative
imu_swab_id string optional IMU generated sample ID if already registered in IMU case ( Nullable ) .
is_infected_covid_before boolean required (new) Have you been infected with COVID-19 before? .
is_received_vaccine integer required (new) 0=> No, 1 => Complete, 2=> Incomplete.

Get a case Details


Requires authentication [api/v3/ext/get-case-detail?imu_swab_id={imu_swab_id}]

Example request:

curl -X GET \
    -G "http://202.45.145.25/api/v3/ext/get-case-detail" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth"
const url = new URL(
    "http://202.45.145.25/api/v3/ext/get-case-detail"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://202.45.145.25/api/v3/ext/get-case-detail',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "data": [
        {
            "name": "RC Poudel",
            "age": 24,
            "age_unit": "",
            "sex": "1",
            "caste": 4,
            "province_id": 3,
            "district_id": 27,
            "municipality_id": 293,
            "ward": "5",
            "tole": "Dhumbarahi",
            "emergency_contact_one": "9*********",
            "occupation": 5,
            "registered_at": "2021-01-01 10:02:20",
            "service_for": "1",
            "service_type": "1",
            "sample_type": "3",
            "sample_collected_date": "2021-01-01",
            "infection_type": "1",
            "lab_id": "",
            "lab_received_date": "2021-01-01",
            "lab_test_date": "2021-01-02",
            "lab_test_time": "14:53:04",
            "lab_result": "3",
            "imu_swab_id": "3095-211213-2756",
            "is_infected_covid_before": "",
            "is_received_vaccine": ""
        }
    ],
    "status": 200
}

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

HTTP Request

GET api/v3/ext/get-case-detail

URL Parameters

Parameter Status Description
imu_swab_id required The ID of the imu_swab_id.

Designated COVID-19 OU

APIs for Designated COVID-19 OU

Get a Designated COVID-19 OU individual Information

Passing your username and password to the /api/v3/ext/designated-covid-ou


Requires authentication

Example request:

curl -X GET \
    -G "http://202.45.145.25/api/v3/ext/designated-covid-ou" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth"
const url = new URL(
    "http://202.45.145.25/api/v3/ext/designated-covid-ou"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://202.45.145.25/api/v3/ext/designated-covid-ou',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "hospital_register_id": "12",
    "name": "anil kc",
    "age": 47,
    "age_unit": 0,
    "gender": 1,
    "phone": 9813166511,
    "guardian_name": null,
    "health_condition": "[{\"id\":2,\"date\":\"2021-05-23\"},{\"id\":\"1\",\"date\":\"2021-05-26\"}]",
    "method_of_diagnosis": 1,
    "self_free": 2,
    "is_death": "1",
    "date_of_outcome_en": "2021-05-22",
    "remark": null,
    "lab_id": "12",
    "register_date_en": "2021-05-23 00:00:00",
    "complete_vaccination": 0,
    "comorbidity": "[8,2,1,31]",
    "other_comorbidity": null,
    "pregnant_status": null,
    "date_of_positive": null,
    "cause_of_death": null,
    "other_death_cause": null,
    "time_of_death": null,
    "province_id": null,
    "district_id": null,
    "municipality_id": null,
    "ward": null,
    "tole": "nilkantha 3, Dhading",
    "vaccine_type": null,
    "other_vaccine_type": null,
    "ethnicity": null,
    "is_health_worker": 0
}

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

HTTP Request

GET api/v3/ext/designated-covid-ou

URL Parameters

Parameter Status Description
lab_id required The Lab ID
hospital_register_id required The Hospital ID

Create or Update a Designated COVID-19 OU individual Information

Passing your username and password to the /api/v3/ext/designated-covid-ou For multiple case we accept array of array following json


Requires authentication

Example request:

curl -X POST \
    "http://202.45.145.25/api/v3/ext/designated-covid-ou" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth" \
    -d '{"hospital_register_id":"CH1231","name":"RC Poudel","age":24,"age_unit":0,"gender":1,"phone":"9*********","guardian_name":"RC Poudel","health_condition":"[{\"id\":2,\"date\":\"2021-05-23\"},{\"id\":\"1\",\"date\":\"2021-05-26\"}]","method_of_diagnosis":1,"self_free":1,"is_death":0,"date_of_outcome_en":"2021-01-01","remark":"Write something","lab_id":"PKR345343","register_date_en":"2021-01-01 10:02:20","complete_vaccination":1,"comorbidity":"[8,2,1,31]","other_comorbidity":"Arthritis","pregnant_status":0,"date_of_positive":"2021-01-01","cause_of_death":1,"other_death_cause":"voluptatem","time_of_death":1,"province_id":3,"district_id":24,"municipality_id":293,"ward":5,"tole":"Dhumbarahi","vaccine_type":5,"other_vaccine_type":"CoronaVac","is_health_worker":5,"ethnicity":5}'
const url = new URL(
    "http://202.45.145.25/api/v3/ext/designated-covid-ou"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

let body = {
    "hospital_register_id": "CH1231",
    "name": "RC Poudel",
    "age": 24,
    "age_unit": 0,
    "gender": 1,
    "phone": "9*********",
    "guardian_name": "RC Poudel",
    "health_condition": "[{\"id\":2,\"date\":\"2021-05-23\"},{\"id\":\"1\",\"date\":\"2021-05-26\"}]",
    "method_of_diagnosis": 1,
    "self_free": 1,
    "is_death": 0,
    "date_of_outcome_en": "2021-01-01",
    "remark": "Write something",
    "lab_id": "PKR345343",
    "register_date_en": "2021-01-01 10:02:20",
    "complete_vaccination": 1,
    "comorbidity": "[8,2,1,31]",
    "other_comorbidity": "Arthritis",
    "pregnant_status": 0,
    "date_of_positive": "2021-01-01",
    "cause_of_death": 1,
    "other_death_cause": "voluptatem",
    "time_of_death": 1,
    "province_id": 3,
    "district_id": 24,
    "municipality_id": 293,
    "ward": 5,
    "tole": "Dhumbarahi",
    "vaccine_type": 5,
    "other_vaccine_type": "CoronaVac",
    "is_health_worker": 5,
    "ethnicity": 5
}

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

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://202.45.145.25/api/v3/ext/designated-covid-ou',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
        'json' => [
            'hospital_register_id' => 'CH1231',
            'name' => 'RC Poudel',
            'age' => 24,
            'age_unit' => 0,
            'gender' => 1,
            'phone' => '9*********',
            'guardian_name' => 'RC Poudel',
            'health_condition' => '[{"id":2,"date":"2021-05-23"},{"id":"1","date":"2021-05-26"}]',
            'method_of_diagnosis' => 1,
            'self_free' => 1,
            'is_death' => 0,
            'date_of_outcome_en' => '2021-01-01',
            'remark' => 'Write something',
            'lab_id' => 'PKR345343',
            'register_date_en' => '2021-01-01 10:02:20',
            'complete_vaccination' => 1,
            'comorbidity' => '[8,2,1,31]',
            'other_comorbidity' => 'Arthritis',
            'pregnant_status' => 0,
            'date_of_positive' => '2021-01-01',
            'cause_of_death' => 1,
            'other_death_cause' => 'voluptatem',
            'time_of_death' => 1,
            'province_id' => 3,
            'district_id' => 24,
            'municipality_id' => 293,
            'ward' => 5,
            'tole' => 'Dhumbarahi',
            'vaccine_type' => 5,
            'other_vaccine_type' => 'CoronaVac',
            'is_health_worker' => 5,
            'ethnicity' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

{
    "message": "Data Successfully Sync",
    "status": 200
}

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

Example response (500):

{
    "message": "Invalid ........... Please send a valid data as mentioned in API documentation. Error at index:0",
    "status": 500
}

HTTP Request

POST api/v3/ext/designated-covid-ou

Body Parameters

Parameter Type Status Description
hospital_register_id string required The hospital register id.
name string required The name of the patient.
age integer required The age of the patient.
age_unit integer required 0 = Year, 1 = Month, 2 = Days.
gender integer required 1=>Male, 2=>Female, 3=>Other.
phone string required The valid phone number.
guardian_name string required The name of the patient.
health_condition required optional string_of_array Health condition id 1: 'No Symptoms', 2: 'Mild', 3: 'Moderate ( HDU )', 4: "Severe - ICU", 5: 'Severe - Ventilator'.
method_of_diagnosis integer required 1 => PCR, 2=> ANTIGEN, 3=>Clinically diagnosis 10=> others.
self_free integer required 1=>Paid service, 2=>Free of cost service.
is_death integer required { null: 'Under Treatment', 1: 'discharge', 2: Death }.
date_of_outcome_en date required The date time format (yyyy-MM-dd) of date of outcome either discharge or death from hospital or blank for nothing.
remark string required The remark field.
lab_id string required The lab id for the COVID-19 positive test lab.
register_date_en datetime required The date time format (yyyy-MM-dd HH:mm:ss) of your system's register/created of that case.
complete_vaccination integer required 0=>None, 1=>First Dose, 2=>Second Dose.
comorbidity string required comma separate details case '21' => 'Normal Health Condition', '8' => 'Blood Pressure (High/ Low)','1' => 'Cancer', '2' => 'Chronic kidney disease', '3' => 'Chronic respiratory diseases / Lung Diseases', '4' => 'Cardio related disease', '5' => 'Diabetes', '9' => 'Neuro related diseases', '11' => 'Tuberculosis (TB)', '22' => 'Mental Disease', '31' => 'HIV / AIDS', '23' => 'Already Covid-19 infected', '10' => 'Other'.
other_comorbidity string optional The Other comorbidity name.
pregnant_status integer required 1=>Yes, 0=>No.
date_of_positive date required The date format (yyyy-MM-dd) of date of positive from lab.
cause_of_death integer required 1 => 'COVID-19', 2 => 'COVID-19, Pneumonia', 3 => 'COVID-19, Pneumonia with Cardio Respiratory Failure', 4 =>'COVID-19 with ARDS', 5 => 'Severe COVID-19, Pneumonia with HTN', 10 => 'Others'.
other_death_cause string optional optional If other than cause of death options. Example:
time_of_death integer required 1=>Symptomatic, 2=>Asymptomatic.
province_id integer required The Province ID provided on Federal Info API.
district_id integer required The district ID provided on District API.
municipality_id integer required The municipality ID provided on Municipality API.
ward integer required The valid ward number.
tole string required The tole address.
vaccine_type integer required if complete_vaccination (1,2) 1. Vero Cell(Sinopharm), 2. Covishield(Serum Institute of India), 3. Pfizer, 4. Moderna, 5. Jansse (Johnson & Johnson), 6. AstraZeneca
other_vaccine_type string required if other type of vaccine name ?
is_health_worker integer required is Health Worker ? 1=>Yes , 0=>No
ethnicity integer required 1=>Dalit, 2=>Janajati, 3=>Madhesi, 4=>Muslim, 5=>Brahmin/Chettri, 6=>Other or Don't know.

General

Get a Federal Information

Passing your username and password to the api/v3/ext/federal-info


Requires authentication

Example request:

curl -X GET \
    -G "http://202.45.145.25/api/v3/ext/federal-info" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth"
const url = new URL(
    "http://202.45.145.25/api/v3/ext/federal-info"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://202.45.145.25/api/v3/ext/federal-info',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "province_name": "Province 1"
    },
    {
        "id": 2,
        "province_name": "Province 2"
    },
    {
        "id": 3,
        "province_name": "Bagmati Pradesh"
    },
    {
        "id": 4,
        "province_name": "Gandaki Pradesh"
    },
    {
        "id": 5,
        "province_name": "Lumbini Pradesh"
    },
    {
        "id": 6,
        "province_name": "Karnali Pradesh"
    },
    {
        "id": 7,
        "province_name": "Sudurpashchim Pradesh"
    }
]

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

HTTP Request

GET api/v3/ext/federal-info

Get a District Information

Passing your username and password to the /api/v3/ext/district


Requires authentication

Example request:

curl -X GET \
    -G "http://202.45.145.25/api/v3/ext/district" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth"
const url = new URL(
    "http://202.45.145.25/api/v3/ext/district"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://202.45.145.25/api/v3/ext/district',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "district_name": "Taplejung",
        "province_id": 1
    },
    {
        "id": 2,
        "district_name": "Panchthar",
        "province_id": 1
    },
    {
        "id": 3,
        "district_name": "Ilam",
        "province_id": 1
    },
    {
        "id": 4,
        "district_name": "Jhapa",
        "province_id": 1
    }
]

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

HTTP Request

GET api/v3/ext/district

Get a Municipality Information

Passing your username and password to the /api/v3/ext/municipality


Requires authentication

Example request:

curl -X GET \
    -G "http://202.45.145.25/api/v3/ext/municipality" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Basic Auth"
const url = new URL(
    "http://202.45.145.25/api/v3/ext/municipality"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic Auth",
};

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

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://202.45.145.25/api/v3/ext/municipality',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Authorization' => 'Basic Auth',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

[
    {
        "id": 1,
        "province_id": "1",
        "district_id": "1",
        "district_name": "",
        "municipality_name": "Aathrai Tribeni"
    },
    {
        "id": 2,
        "province_id": "1",
        "district_id": "1",
        "district_name": "",
        "municipality_name": "Maiwakhola"
    }
]

Example response (401):

{
    "message": "Authentication Failed",
    "status": 401
}

HTTP Request

GET api/v3/ext/municipality