PHPackages                             viavario/ecadclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. viavario/ecadclient

ActiveLibrary[API Development](/categories/api)

viavario/ecadclient
===================

A PHP client for searching Belgian healthcare professionals by their name.

1.0.1(1w ago)01MITPHPPHP ^7.4|^8.0

Since Mar 14Pushed 1w agoCompare

[ Source](https://github.com/viavario/ecadclient)[ Packagist](https://packagist.org/packages/viavario/ecadclient)[ RSS](/packages/viavario-ecadclient/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

viavario/ecadclient
===================

[](#viavarioecadclient)

A lightweight PHP client for searching Belgian healthcare professionals via the public eCad API.

Requirements
------------

[](#requirements)

- PHP `^7.4 | ^8.0`
- Extensions: `ext-curl`, `ext-dom`
- `psr/simple-cache` (installed automatically via Composer)

Installation
------------

[](#installation)

```
composer require viavario/ecadclient
```

What this library does
----------------------

[](#what-this-library-does)

### `EcadClient`

[](#ecadclient)

`EcadClient` is responsible for:

- retrieving professions (`getProfessions()`)
- retrieving disciplines (`getDisciplines()`)
- searching healthcare professionals by name and optional filters (`search()`)
- optional caching (PSR-16 `CacheInterface`)

It communicates with:

- `https://apps.health.belgium.be/ecad-public-search-rs/professionals`
- `https://apps.health.belgium.be/ecad-public-search-rs/ref-data/professions`
- `https://apps.health.belgium.be/ecad-public-search-rs/ref-data/disciplines`

### Data objects

[](#data-objects)

The client maps API responses to:

- `EcadResult`
- `EcadProfession`
- `EcadDiscipline`

Each provides a `toArray()` method for easier export/serialization.

### Optional file-based cache

[](#optional-file-based-cache)

This package includes `viavario\ecadclient\Cache\FileCache`, a simple PSR-16 file cache implementation.

You can pass any PSR-16 cache to `EcadClient`, including this one.

Usage
-----

[](#usage)

### Basic search

[](#basic-search)

```
