PHP code example of viavario / rizivclient

1. Go to this page and download the library: Download viavario/rizivclient library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

viavario / rizivclient example snippets




iavario\rizivclient\RizivClient;

$client = new RizivClient();
$result = $client->searchByRegistrationNumber('731106598');

if ($result === null) {
    echo "No healthcare professional found." . PHP_EOL;
    exit;
}

echo "Name: " . $result->name . PHP_EOL;
echo "RIZIV number: " . $result->riziv_number . PHP_EOL;
echo "Profession: " . $result->profession . PHP_EOL;
echo "Contracted: " . ($result->contracted ? 'Yes' : 'No') . PHP_EOL;
echo "Qualification: " . $result->qualification . PHP_EOL;
echo "Qualification date: " . $result->qualification_date->format('Y-m-d') . PHP_EOL;

[
    'name'               => 'Test Name',
    'riziv_number'       => '12345678',
    'profession'         => 'Doctor',
    'contracted'         => true,
    'qualification'      => 'MD',
    'qualification_date' => new \DateTime('2020-01-01'),
]