# Health Facility List

| **API URL**     | {{url}}/admin-service/healthfacility/list |
| --------------- | ----------------------------------------- |
| **Method**      | POST                                      |
| **Description** | Get the healthfacility list               |

#### **Sample Input** <a href="#healthfacilitylist-v2-sampleinput" id="healthfacilitylist-v2-sampleinput"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| countryId              | Bigint   | Yes           | Country id                                                                                                                              |
| tenantId               | Bigint   | No            | Tenant Id                                                                                                                               |
| limit                  | Bigint   | Yes           | Limit to fetching data                                                                                                                  |
| skip                   | Bigint   | No            | Skip data to filter data                                                                                                                |
| healthFacilityTypes    | String   | No            | HealthFacility Types                                                                                                                    |
| districtIds            | Bigint   | No            | List of District IDs                                                                                                                    |
| chiefdomIds            | Bigint   | No            | List of chiefdom IDs                                                                                                                    |
| userBased              | Boolean  | Yes           | User based for health facility                                                                                                          |
| searchTerm             | String   | No            | Search Term to filter data                                                                                                              |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | web                                                                                                                                     |

```
{
  "limit": 10,
  "skip": null,
  "countryId": 1,
  "tenantIds": [
    "1"
  ],
  "healthFacilityTypes": [],
  "districtIds": [],
  "chiefdomIds": [],
  "userBased": false,
  "searchTerm": ""
}
```

#### **Sample Output** <a href="#healthfacilitylist-v2-sampleoutput" id="healthfacilitylist-v2-sampleoutput"></a>

| **Field Name**       | **Type** | **Comments**                          |
| -------------------- | -------- | ------------------------------------- |
| message              | String   | Health facility fetched successfully. |
| status               | String   | Entity status                         |
| entityList           | String   | Entity List                           |
| id                   | Bigint   | Medication id                         |
| name                 | String   | Health facility Name                  |
| type                 | String   | Community Health Post                 |
| phuFocalPersonName   | String   | Phu Focal Person Name                 |
| phuFocalPersonNumber | String   | Phu Focal Person Number               |
| address              | String   | Health facility address               |
| chiefdom             | String   | List of chiefdom details              |
| district             | String   | List of district details              |
| cityName             | String   | City Name                             |
| latitude             | Double   | Location details                      |
| longitude            | Double   | longitude details                     |
| postalCode           | Bigint   | Postal Code of Health facility        |
| language             | String   | “English“                             |
| linkedVillages       | String   | List of linked Villages               |
| tenantId             | Bigint   | Tenant Id                             |
| fhirId               | Bigint   | Fhir Id for user                      |
| clinicalWorkflows    | String   | ClinicalWorkflows                     |
| customizedWorkflows  | String   | CustomizedWorkflows                   |

```
{
  "message": "Health facility fetched successfully.",
  "entity": null,
  "status": true,
  "entityList": [
      {
          "id": 499,
          "name": "Yami healthcare center",
          "type": "Community Health Post",
          "phuFocalPersonName": "Yami",
          "phuFocalPersonNumber": "1987329234",
          "address": "123",
          "chiefdom": {
          },
          "district": {
          },
          "cityName": "sh r",
          "latitude": "12",
          "longitude": "121",
          "postalCode": "321321",
          "language": "English",
          "linkedVillages": [
          ],
          "tenantId": 1689,
          "fhirId": "2014579",
          "clinicalWorkflows": [
          ],
          "customizedWorkflows": [],
          "peerSupervisors": null,
          "culture": null
        }
  ],
  "responseCode": 200,
  "totalCount": 284
}
```
