1. Go to this page and download the library: Download virusphp/bridging-satusehat 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/ */
// Example Controller bridging to SATUSEHAT (Laravel 7 ke atas)
use Virusphp\BridgingSatusehat\Bridge\BridgeBase;
Class SomeController
{
protected $bridging;
public function __construct()
{
$this->bridging = new BridgeBase();
}
// Example To use get Patient
// Name of Method example
public function getPatient($nik)
{
$endpoint = 'Practitioner?identifier=https://fhir.kemkes.go.id/id/nik|'. $nik;
return $this->bridging->getRequest($endpoint);
}
}