PHP code example of cmink / bpjs

1. Go to this page and download the library: Download cmink/bpjs 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/ */

    

cmink / bpjs example snippets


//use your own bpjs config
$vclaim_conf = [
    'cons_id' => '123456',
    'secret_key' => '123456',
    'user_key' => 'userkey untuk mengakses ws BPJS',
    'base_url' => 'url webservice BPJS',
    'service_name' => 'vclaim-rest'
];

// use Referensi service
// https://dvlp.bpjs-kesehatan.go.id/VClaim-Katalog/Referensi

$referensi = new cmiNk\Bpjs\V2\Bridging($vclaim_conf);
var_dump($referensi->diagnosa('A00'));

//use Peserta service
//https://dvlp.bpjs-kesehatan.go.id/VClaim-Katalog/Peserta

$peserta = new cmiNk\Bpjs\V2\Bridging($vclaim_conf);
var_dump($peserta->getByNoKartu('123456789','2018-09-16'));