Skip to content
Irwan Fathurrahman edited this page Jun 22, 2016 · 18 revisions

HEALTHSITES API DOCUMENTATION

The Healthsites API allows you to call methods that respond in REST. The API mostly retrieves data from healthsites.

The data itself is data of healthsites, that contains mandatory, core and other attributes, so the values can vary for other healthsites. But, name, source, geom, version, uuid and date_modified is mandatory attributes that will definitely in data.

1. FACILITIES

1.1 getting all facilities

Get all of facilties in healthsites, returning with details of each of facility. By default, it will be retrieve with Json format

URL Sample

https://healthsites.io/api/v1/healthsites/facilities?page=1

GET Parameters (required)

page - each page contains maximum 100 healthsites

GET Parameters (optional)

format - parameter that is used to change return format. [json/xml/geojson]

getting all facilities within boxed geographical area

Get all of facilties within boxed geographical area, returning with details of each of facility. By default, it will be retrieve with Json format

Result set will be truncated to 1000 records. If you need larger datasets, please use our data extract page.

URL

http://healthsites.io/api/v1/healthsites/facilities

GET Parameters (required)

extent : Geographical area that in decimal degree

GET Parameters (optional)

facility_type - use this parameter to filter by facility type format - parameter that is used to change return format. [json/xml]

Sample

https://healthsites.io/api/v1/healthsites/facilities?extent=-4.0,12.0,12.0,18.0

SEARCH

Search facilities

search facilities by key words. By default, it will be retrieve with Json format

URL

http://healthsites.io/api/v1/healthsites/search

GET Parameters (required)

search_type - Specify which type of feature you wish to search for. [facility, placename] name - keyword for searching

GET Parameters (optional)

format - parameter that is used to change return format. [json/xml]

Sample

https://healthsites.io/api/v1/healthsites/search?search_type=placename&name=Cape%20Town

https://healthsites.io/api/v1/healthsites/search?search_type=facility&name=bandung

FACILITY

Get Facility Detail

get facility details using uuid. By default, it will be retrieve with Json format

URL

http://healthsites.io/api/v1/healthsites/facility/details

GET Parameters (required)

uuid - uuid of facility

GET Parameters (optional)

format - parameter that is used to change return format. [json/xml]

Sample

https://healthsites.io/api/v1/healthsites/facility/details?uuid=47d5bd1449d143c99b9ba0042d31cfdd

Get Synonyms Of facilty

get synonyms or duplication of facility. By default, it will be retrieve with Json format

URL

http://healthsites.io/api/v1/healthsites/facility/details

GET Parameters (required)

uuid - uuid of facility

GET Parameters (optional)

format - parameter that is used to change return format. [json/xml]

Sample

https://healthsites.io/api/v1/healthsites/facility/synonyms?uuid=47d5bd1449d143c99b9ba0042d31cfdd


responses

json

{
  "raw_source": "http://www.openstreetmap.org/node/1342944384",
  "source_url": "https://www.openstreetmap.org/",
  "what3words": "laces.immunity.snipe",
  "upstream": "openstreetmap\u00b6n1342944384",
  "name": "Rumah Sakit Jiwa Pusat Bandung",
  "completeness": "35.29%",
  "uuid": "373ea7f3c02549baace3b69ac0c238e6",
  "date_modified": "2015-11-17T09:43:57.838Z",
  "source": "OpenStreetMap",
  "version": 2,
  "geom": [
    107.6115329,
    -6.9068551
  ],
  "type": "hospital"
}

json array

[
  {
    "raw-source": "https://data.humdata.org/dataset/nigeria-healthsites",
    "source_url": "http://nmis.mdgs.gov.ng/",
    "upstream": "Nigeria MDG Information System\u00b61523",
    "name": "Jimmy Clinic",
    "completeness": "35.29%",
    "uuid": "0fdc16639b394d239d2fc48f1b30d336",
    "date_modified": "2016-05-23T08:56:39.415Z",
    "source": "Nigeria MDG information system",
    "version": 4,
    "nature-of-facility": "Basic Health Centre or Primary Health Clinic",
    "geom": [
      8.328296542,
      7.017195225
    ]
  },
  {
    "raw-source": "https://data.humdata.org/dataset/nigeria-healthsites",
    "source_url": "http://nmis.mdgs.gov.ng/",
    "upstream": "Nigeria MDG Information System\u00b61522",
    "name": "Ilupewo Health Centre",
    "completeness": "35.29%",
    "uuid": "cfd5aa1177424a2fad04b63515548f8d",
    "date_modified": "2016-05-23T08:56:39.415Z",
    "source": "Nigeria MDG information system",
    "version": 4,
    "nature-of-facility": "Health Post",
    "geom": [
      3.25196482,
      6.67992909
    ]
  },
  {
    "raw-source": "https://data.humdata.org/dataset/nigeria-healthsites",
    "source_url": "http://nmis.mdgs.gov.ng/",
    "upstream": "Nigeria MDG Information System\u00b624740",
    "name": "R.Bade Dispensary",
    "completeness": "35.29%",
    "uuid": "edda4012ff08489b9d4aa47f4ba834bb",
    "date_modified": "2016-05-23T08:56:39.415Z",
    "source": "Nigeria MDG information system",
    "version": 4,
    "nature-of-facility": "Health Post",
    "geom": [
      7.85833848,
      12.70253224
    ]
  }
]

xml

<?xml version="1.0" encoding="UTF-8" ?>
<root>
    <raw_source type="str">http://www.openstreetmap.org/way/379766394</raw_source>
    <source_url type="str">https://www.openstreetmap.org/</source_url>
    <what3words type="str">cloudless.vocalists.hardbacks</what3words>
    <upstream type="str">openstreetmap¶w379766394</upstream>
    <name type="str">Hospital de Hanga Roa</name>
    <completeness type="str">35.29%</completeness>
    <uuid type="str">47d5bd1449d143c99b9ba0042d31cfdd</uuid>
    <date_modified type="str">2015-12-11T10:51:22.924404+00:00</date_modified>
    <source type="str">
    OpenStreetMap</source>
    <version type="int">2</version>
    <geom type="list">
        <item type="float">-109.420938926</item>
        <item type="float">-27.1505165</item>
    </geom>
    <type type="str">hospital</type>
</root>

xml array

<?xml version="1.0" encoding="UTF-8" ?>
<root>
    <item type="dict">
        <raw-source type="str">https://data.humdata.org/dataset/nigeria-healthsites</raw-source>
        <source_url type="str">http://nmis.mdgs.gov.ng/</source_url>
        <upstream type="str">Nigeria MDG Information System¶1523</upstream>
        <name type="str">Jimmy Clinic</name>
        <completeness type="str">35.29%</completeness>
        <uuid type="str">0fdc16639b394d239d2fc48f1b30d336</uuid>
        <date_modified type="str">2016-05-23T08:56:39.415136+00:00</date_modified>
        <source type="str">
        Nigeria MDG information system</source>
        <version type="int">4</version>
        <nature-of-facility type="str">Basic Health Centre or Primary Health Clinic</nature-of-facility>
        <geom type="list">
            <item type="float">8.328296542</item>
            <item type="float">7.017195225</item>
        </geom>
    </item>
    <item type="dict">
        <raw-source type="str">https://data.humdata.org/dataset/nigeria-healthsites</raw-source>
        <source_url type="str">http://nmis.mdgs.gov.ng/</source_url>
        <upstream type="str">Nigeria MDG Information System¶1522</upstream>
        <name type="str">Ilupewo Health Centre</name>
        <completeness type="str">35.29%</completeness>
        <uuid type="str">cfd5aa1177424a2fad04b63515548f8d</uuid>
        <date_modified type="str">2016-05-23T08:56:39.415136+00:00</date_modified>
        <source type="str">
        Nigeria MDG information system</source>
        <version type="int">4</version>
        <nature-of-facility type="str">Health Post</nature-of-facility>
        <geom type="list">
            <item type="float">8.328296542</item>
            <item type="float">7.017195225</item>
        </geom>
    </item>
</root>

geojson

{
  "type": "FeatureCollection",
  "features": [
    {
      "geometry": {
        "type": "Point",
        "coordinates": [
          -0.348891624693934,
          43.32367125
        ]
      },
      "type": "Feature",
      "properties": {
        "raw_source": "http://www.openstreetmap.org/way/62876249",
        "source_url": "https://www.openstreetmap.org/",
        "what3words": "delivers.engage.rise",
        "upstream": "openstreetmap\u00b6w62876249",
        "name": "Clinique Princess",
        "completeness": "35.29%",
        "uuid": "1dd591eab22742c8b2321ed04833e83d",
        "date_modified": "2015-12-11T10:51:22.924Z",
        "source": "OpenStreetMap",
        "version": 2,
        "type": "hospital"
      }
    },
    {
      "geometry": {
        "type": "Point",
        "coordinates": [
          35.5173755374543,
          33.6282594
        ]
      },
      "type": "Feature",
      "properties": {
        "raw_source": "http://www.openstreetmap.org/way/24668716",
        "source_url": "https://www.openstreetmap.org/",
        "what3words": "outhouse.escapees.profiting",
        "upstream": "openstreetmap\u00b6w24668716",
        "name": "\u0627\u0644\u0645\u0633\u062a\u0648\u0635\u0641",
        "completeness": "35.29%",
        "uuid": "422a7157135642dfbe2719c2e0b36875",
        "date_modified": "2015-12-11T10:51:22.924Z",
        "source": "OpenStreetMap",
        "version": 2,
        "type": "hospital"
      }
    },
  ]
}

Clone this wiki locally