Skip to content

API for PICO (Pusat Informasi COVID-19/COVID-19 Information Center) of Central Sulawesi. This API build using microframework Lumen.

License

Notifications You must be signed in to change notification settings

ryanaidilp/PICO_SULTENG_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PICO SulTeng API

License: MIT

Commits/month Stars Website: up Last Commit Coverage

API for PICO (Pusat Informasi COVID-19/COVID-19 Information Center) of Central Sulawesi. This API build using microframework Lumen.

PICO API

Table of contents

Language : Id

You are reading the English version of this README. Click on the language badge to switch to another language.

Data Source

General info

This API was created to provide realtime data on the COVID-19 situation in Central Sulawesi. This API was created because the data provided by the local government is still in the form of static data so that the data cannot be used in my application (PICO).

By making this API, we expected that developers who need realtime data on the COVID-19 situation in Central Sulawesi can be helped by this API.

Additional Info

  • API Version

    Version Link
    1 baseurl/{endpoint}
    2 baseurl/v2/{endpoint}

Build With

  • Lumen - version 7.0.2
  • PHP - version 7.3.13

Setup

Response Examples

  • TASK FORCE DATA

    • JSON Example (v1)/{"task_force_object"} :
    {
        "kabupaten":"Banggai Kepulauan",
        "kontak":
        [
            {
                "jenis_kontak":"Telepon",
                "kontak":"082292105885",
                "nama":"Arabia Tamrin",
                "label":"Telpon",
                "prefix":"tel:"
            }
        ]
    }
  • JSON Example (v2)/{"task_force_object"} :
    {
        "kabupaten":"Banggai Kepulauan",
        "kontak":
        [
            {
                "jenis_kontak":"Telepon",
                "kontak":"082292105885",
                "nama":"Arabia Tamrin",
                "label":"Telpon",
                "prefix":"tel:"
            }
        ]
    }
  • GET /posko (v1)

    Returning data of the COVID-19 Task Force Command Post in Central Sulawesi.

    • URL Params
      • None (v1)
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type: application/json
    • Success Response :
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data":
            [
                {"task_force_object"},
                {"task_force_object"},
                {"task_force_object"},
            ]
        }
  • DISTRICT DATA

    • JSON Example (v1) /{"district_object"} :
    {
        "no": 7205,
        "kabupaten": "Donggala",
        "ODP": 6,
        "PDP": 0,
        "positif": 0,
        "negatif": 0,
        "sembuh": 0,
        "meninggal": 0,
        "selesai_pengawasan": 0,
        "dalam_pengawasan": 6,
        "selesai_pemantauan": 0,
        "dalam_pemantauan": 0,
        "updated_at": "2020-04-29T17:00:00.000000Z"
    }
  • JSON Example (v2) /{"district_object"} :
    {
        "no": 7205,
        "kabupaten": "Donggala",
        "updated_at": "2020-04-29T17:00:00.000000Z",
        "positif": 0,
        "negatif": 0,
        "sembuh": 0,
        "meninggal": 0,
        "ODP": 6,
        "selesai_pemantauan": 0,
        "dalam_pemantauan": 0,
        "PDP": 0,
        "selesai_pengawasan": 0,
        "dalam_pengawasan": 6,
        "rasio_kematian": 6,
    }
  • GET /kabupaten

    Returns data on COVID-19 cases in all districts / cities in Central Sulawesi.

    • URL Params
      • None (v1)
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type : application/json
    • Success Response :
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data":
            [
                {"district_object"},
                {"district_object"},
                {"district_object"},
            ]
        }
  • GET /kabupaten/:id

    Returns data on COVID-19 cases in selected district.

    • URL Params
      • Required: id=[integer]
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type : application/json
    • Success Response:
      • Code : 200
      • Content :
{
    "success": true,
    "errors": [],
    "data": {"district_object"}
}
  • Error Response:
    • Code : 404
    • Content :
        {
           "success": false,
            "errors" :
             {
                "code": 404,
                "message": "Ditrict not found!"
             },
             "data": []
        }
  • PROVINCE DATA

    The "map_id" property is used on AnyChart-Android.

    • JSON Example (v1)/{"province_object"} :
    {
        "kode_provinsi":31,
        "provinsi":"DKI Jakarta",
        "positif":515,
        "sembuh":46,
        "meninggal":25,
        "map_id":"ID.JR",
        "updated_at": "2020-04-29T17:00:00.000000Z"
    }
  • JSON Example (v2)/{"province_object"} :
    {
        "kode_provinsi":31,
        "updated_at": "2020-04-29T17:00:00.000000Z",
        "provinsi":"DKI Jakarta",
        "positif":515,
        "dalam_perawatan":444,
        "sembuh":46,
        "meninggal":25,
        "rasio_kematian":5,
        "map_id":"ID.JR",
    }
  • GET /provinsi

    Returns data on COVID-19 cases in all provinces throughout Indonesia.

    • URL Params
      • None (v1)
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type: application/json
    • Success Response :
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data":
            [
                {"province_object"},
                {"province_object"},
                {"province_object"},
            ],
        }
  • GET /provinsi/:code

    Returns data on COVID-19 cases in selected province.

    • URL Params
      • Required: code=[integer]
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type: application/json
    • Success Response:
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data": {"province_object"},
        }
  • Error Response:
    • Code : 404
    • Content :
        {
            "success": false,
            "errors":
            {
                "code": 404,
                "message": "Province not found!"
            },
            "data": [],
        }
  • COVID-19 REFERRAL HOSPITAL DATA

    • JSON Example/{"hospital_object"} :
    {
        "no":"7271014",
        "nama":"RS Umum Daerah Undata Palu",
        "longitude":119.881858,
        "latitude":-0.8578386,
        "jumlah_igd":0,
        "terakhir_diperbarui":"2021-07-24T01:58:08.000000Z",
        "kontak":
        [
            {
                "jenis_kontak":"Telepon",
                "kontak":"0451421270",
                "prefix":"tel:",
                "label":"Telpon"
            }
            
        ],
        "tempat_tidur":
        [
            {
                "jenis_tempat_tidur":"IGD Khusus Covid",
                "total":4,
                "tersedia":0,
                "terisi":4,
                "antrian":0,
                "terakhir_diperbarui":"2021-07-24T01:58:08.000000Z"
            },
        ]
    }
  • GET /rumahsakit

    Returns data from the COVID-19 referral hospital in Central Sulawesi.

    • URL Params
      • None
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type: application/json
    • Success Response :
      • Code : 200
      • Content :
        {
          "success": true,
          "errors": [],
          "data":
          [
            {"hospital_object"},
            {"hospital_object"},
            {"hospital_object"},
          ],
        }
  • GET /rumahsakit/:id

    Returns Hospital data based on selected number/id.

    • URL Params
      • Required: id=[integer]
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Heders
      • Content-Type: application/json
    • Success Response:
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data": {"hospital_object"},
        }
  • Error Response:
    • Code : 404
    • Content :
        {
            "success": false,
            "errors":
            {
                "code": 404,
                "message": "Hospital not found!"
            },
            "data" :  [],
        }
  • STATISTICS

    Returns daily data of COVID-19 outbreak in Central Sulawesi since March 22, 2020.

    • JSON Example (v1)/{"stats_object"} :
    {
        "day" : 42,
        "date" : "2020-05-02T16:00:00.000000Z",
        "positive" : 12,
        "cumulative_positive" : 59,
        "recovered" : 0,
        "cumulative_recovered" : 11,
        "death" : 0,
        "cumulative_death" : 3,
        "death_percentage" : 5.08,
        "recovered_percentage" : 18.64,
        "under_treatment_percentage" : 76.27,
    }
  • JSON Example (v2)/{"stats_object"} :
    {
        "hari_ke" : 42,
        "tanggal" : "2020-05-02T16:00:00.000000Z",
        "kasus_baru" : {
          "positif": 0,
          "sembuh": 0,
          "meninggal": 0,
          "negatif": 0,
          "ODP": 0,
          "PDP": 0
        },
        "aktif" : {
          "dalam_perawatan": 45,
          "ODP": 161,
          "PDP": 45
        },
        "selesai" : {
          "ODP": 161,
          "PDP": 45
        },
        "kumulatif" : {
          "positif": 59,
          "sembuh": 11,
          "meninggal": 3,
          "negatif": 50,
          "ODP": 724,
          "PDP": 120,
          "selesai_ODP": 563,
          "selesai_PDP": 76
        },
      
        "rekap" : {
          "angka_reproduksi" : {
            "rt_upper": 1.98,
            "rt": 1.2,
            "rt_lower": 0.3
          },
          "persentase": {
            "meninggal": 5.08,
            "sembuh": 18.64,
            "dalam_perawatan": 76.27
          },
        },
    }
  • GET /statistik

    Returns statistics of COVID-19 outbreak in Central Sulawesi.

    • URL Params
      • None (v1)
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Headers
      • Content-Type: application/json
    • Success Response :
      • Code : 200
      • Content :
        {
          "success": true,
          "errors": [],
          "data":
          [
            {"stats_object"},
            {"stats_object"},
            {"stats_object"},
          ],
        }
  • GET /statistik/:day

    Returns statistics of COVID-19 outbreak in Central Sulawesi on selected day.

    • URL Params
      • Required: day=[integer]
      • Optional : ?lang=[string] (v2)
    • Data Params
      • None
    • Heders
      • Content-Type: application/json
    • Success Response:
      • Code : 200
      • Content :
        {
            "success": true,
            "errors": [],
            "data": {"stats_object"},
        }
  • Error Response:
    • Code : 404
    • Content :
        {
            "success": false,
            "errors":
            {
                "code": 404,
                "message": "Stats not found!"
            },
            "data" :  [],
        }

Features

Some features have been made so far :

  • Data for COVID-19 situation by districts/cities in Central Sulawesi
  • Data for COVID-19 situation by Province in Indonesia
  • Data of Central Sulawesi COVID-19 Task Force Team post
  • Data of COVID-19 referral hospital in Central Sulawesi
  • Daily report of COVID-19 situation in Central Sulawesi
  • Daily report of COVID-19 situation in Indonesia

To-do list:

  • Data for COVID-19 situation by districts/cities in Central Sulawesi
  • Data for COVID-19 situation by Province in Indonesia
  • Data of Central Sulawesi COVID-19 Task Force Team post
  • Data of COVID-19 referral hospital in Central Sulawesi
  • Daily report of COVID-19 situation in Central Sulawesi
  • Daily report of COVID-19 situation in Indonesia

License

MIT License

Copyright (c) 2020 Fajrian Aidil Pratama

Contact

Created by @ryanidilp_ - feel free to contact me!