PHP code example of bridging / bpjs
1. Go to this page and download the library: Download bridging/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/ */
bridging / bpjs example snippets
//use your own bpjs config
/**
* VCLAIM
*/
$vclaim_config = [
'cons_id' => '123456',
'secret_key' => 'abcdef',
'user_key' => 'xxxyyyzzz',
'base_url' => 'https://apijkn-dev.bpjs-kesehatan.go.id',
'service_name' => 'vclaim-rest-dev'
];
/**
* APLI CARE
*/
$aplicare_config = [
'cons_id' => '',
'secret_key' => '',
'base_url' => 'https://new-api.bpjs-kesehatan.go.id:8080',
'service_name' => 'aplicaresws/rest'
];
/**
* P-CARE
*/
$pcare_config = [
'cons_id' => '',
'secret_key' => '',
'base_url' => 'https://dvlp.bpjs-kesehatan.go.id:9081',
'service_name' => 'pcare-rest-v3.0',
'pcare_user' => '',
'pcare_pass' => '',
'kd_aplikasi' => ''
];
/**
* SITB_CONF
*/
$sitb_conf = [
'cons_id' => '',
'user_pass' => '',
'base_url' => 'http://sirs.yankes.kemkes.go.id',
'service_name' => 'sirsservice/sitbtraining/sitb'
];
// use Referensi service
$referensi = new Bridging\Bpjs\VClaim\Referensi($vclaim_conf);
var_dump($referensi->diagnosa('A00'));
$peserta = new Bridging\Bpjs\VClaim\Peserta($vclaim_conf);
var_dump($peserta->getByNoKartu('123456789','2018-09-16'));