Download the PHP package viavario/rizivclient without Composer
On this page you can find all versions of the php package viavario/rizivclient. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download viavario/rizivclient
More information about viavario/rizivclient
Files in viavario/rizivclient
Package rizivclient
Short Description A PHP client for searching healthcare professionals by their RIZIV number.
License MIT
Informations about the package rizivclient
viavario/rizivclient
A lightweight PHP client for searching healthcare professionals on the official RIZIV/INAMI silver pages by registration number.
Requirements
- PHP
^7.4 | ^8.0 - Extensions:
ext-curl,ext-dom
Installation
What this library does
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
RizivResultobject
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 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 returnsgeconventioneerdqualification(string)qualification_date(\DateTime)
It also provides toArray() to export those values as an associative array.
Usage
API
RizivClient
searchByRegistrationNumber(string $registrationNumber): ?RizivResult
Searches by RIZIV registration number and returns the first match as RizivResult, or null if no match is found.
Possible exceptions:
\RuntimeExceptionwhen cURL fails\RuntimeExceptionwhen the server responds with a non-2xx status code
RizivResult
| Property | Type |
|---|---|
$name |
string |
$riziv_number |
string |
$profession |
string |
$contracted |
bool |
$qualification |
string |
$qualification_date |
\DateTime |
toArray(): array
Returns:
Development
Install dependencies:
Run tests:
License
MIT — see LICENSE for details.
Disclaimer
This package depends on the current HTML structure and labels of the RIZIV/INAMI website. If the upstream markup changes, parsing may need updates.
All versions of rizivclient with dependencies
ext-curl Version *
ext-dom Version *