PHPackages                             viavario/rizivclient - 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. viavario/rizivclient

ActiveLibrary

viavario/rizivclient
====================

A PHP client for searching healthcare professionals by their RIZIV number.

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

Since Mar 13Pushed 1w agoCompare

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

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

viavario/rizivclient
====================

[](#viavariorizivclient)

A lightweight PHP client for searching healthcare professionals on the official RIZIV/INAMI silver pages by registration number.

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

[](#requirements)

- PHP `^7.4 | ^8.0`
- Extensions: `ext-curl`, `ext-dom`

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

[](#installation)

```
composer require viavario/rizivclient
```

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

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

### `RizivClient`

[](#rizivclient)

`RizivClient` is responsible for:

- sanitizing a registration number input (removing non-digits)
- building the search query expected by the RIZIV website
- performing the HTTP GET request
- parsing the returned HTML with `DOMDocument` + `DOMXPath`
- mapping the first result card into a `RizivResult` object

If no result card is found, it returns `null`. If the HTTP request fails (cURL failure or non-2xx status), it throws `\RuntimeException`.

### `RizivResult`

[](#rizivresult)

`RizivResult` is a simple data object that represents a single healthcare professional result.

It stores:

- `name` (`string`)
- `riziv_number` (`string`)
- `profession` (`string`)
- `contracted` (`bool`) — derived from whether the site returns `geconventioneerd`
- `qualification` (`string`)
- `qualification_date` (`\DateTime`)

It also provides `toArray()` to export those values as an associative array.

Usage
-----

[](#usage)

```
