Uploaded From CV. Swandhana Server

This commit is contained in:
Duidev Software House
2025-01-27 08:16:55 +07:00
commit 6b3be42361
15186 changed files with 2328862 additions and 0 deletions
+176
View File
@@ -0,0 +1,176 @@
# BPJS Bridging Vclaim, APlicare & Pcare for Laravel
Bridging VClaim
### Installation
```sh
composer require aamdsam/bridging-bpjs
```
### use for VCLAIM
add to `.env` file
```env
BPJS_CONSID="2112121"
BPJS_SCREET_KEY="121212121"
BPJS_BASE_URL="https://new-api.bpjs-kesehatan.go.id:8080"
BPJS_SERVICE_NAME="new-vclaim-rest"
use AamDsam\Bpjs\VClaim;
function vclaim_conf(){
$config = [
'cons_id' => env('BPJS_CONSID'),
'secret_key' => env('BPJS_SCREET_KEY'),
'base_url' => env('BPJS_BASE_URL'),
'service_name' => env('BPJS_SERVICE_NAME'),
];
return $config;
}
$referensi = new VClaim\Referensi($this->vclaim_conf());
return response($referensi->propinsi());
```
### use for PCare
add to `.env` file
```env
BPJS_PCARE_CONSID="2112121"
BPJS_PCARE_SCREET_KEY="121212121"
BPJS_PCARE_USERNAME="username"
BPJS_PCARE_PASSWORD="password"
BPJS_PCARE_APP_CODE="095"
BPJS_PCARE_BASE_URL="https://dvlp.bpjs-kesehatan.go.id:9081"
BPJS_PCARE_SERVICE_NAME="pcare-rest-v3.0"
use AamDsam\Bpjs\PCare;
function pcare_conf(){
$config = [
'cons_id' => env('BPJS_PCARE_CONSID'),
'secret_key' => env('BPJS_PCARE_SCREET_KEY'),
'username' => env('BPJS_PCARE_USERNAME'),
'password' => env('BPJS_PCARE_PASSWORD'),
'app_code' => env('BPJS_PCARE_APP_CODE'),
'base_url' => env('BPJS_PCARE_BASE_URL'),
'service_name' => env('BPJS_PCARE_SERVICE_NAME'),
];
return $config;
}
//diagnosa
$bpjs = new PCare\Diagnosa($this->pcare_conf());
return $bpjs->keyword('001')->index(0, 2);
// dokter
$bpjs = new PCare\Dokter($this->pcare_conf());
return $bpjs->index($start, $limit);
// kesadaran
$bpjs = new PCare\Kesadaran($this->pcare_conf());
return $bpjs->index();
// kunjungan rujukan
$bpjs = new PCare\Kunjungan($this->pcare_conf());
return $bpjs->rujukan($nomorKunjungan)->index();
// kunjungan riwayat
$bpjs = new PCare\Kunjungan($this->pcare_conf());
return $bpjs->riwayat($nomorKartu)->index();
// mcu
$bpjs = new PCare\Mcu($this->pcare_conf());
return $bpjs->kunjungan($nomorKunjungan)->index();
// obat dpho
$bpjs = new PCare\Obat($this->pcare_conf());
return $bpjs->dpho($keyword)->index($start, $limit);
// obat kunjungan
$bpjs = new PCare\Obat($this->pcare_conf());
return $bpjs->kunjungan($nomorKunjungan)->index();
// pendaftaran tanggal daftar
$bpjs = new PCare\Pendaftaran($this->pcare_conf());
return $bpjs->tanggalDaftar($tglDaftar)->index($start, $limit);
// pendaftaran nomor urut
$bpjs = new PCare\Diagnosa($this->pcare_conf());
return $bpjs->nomorUrut($nomorUrut)->tanggalDaftar($tanggalDaftar)->index();
// peserta
$bpjs = new PCare\Peserta($this->pcare_conf());
return $bpjs->keyword($keyword)->show();
// peserta jenis kartu [NIK/NOKA]
$bpjs = new PCare\Peserta($this->pcare_conf());
return $bpjs->jenisKartu($jenisKartu)->keyword($keyword)->show();
// poli
$bpjs = new PCare\Poli($this->pcare_conf());
return $bpjs->fktp()->index($start, $limit);
// provider
$bpjs = new PCare\provider($this->pcare_conf());
return $bpjs->index($start, $limit);
// tindakan kode tkp
$bpjs = new PCare\Tindakan($this->pcare_conf());
return $bpjs->kodeTkp($keyword)->index($start, $limit);
// tindakan kunjungan
$bpjs = new PCare\Tindakan($this->pcare_conf());
return $bpjs->kunjungan($nomorKunjungan)->index();
// kelompok club
$bpjs = new PCare\Kelompok($this->pcare_conf());
return $bpjs->club($kodeJenisKelompok)->index();
// kelompok kegiatan
$bpjs = new PCare\Kelompok($this->pcare_conf());
return $bpjs->kegiatan($bulan)->index();
// kelompok peserta
$bpjs = new PCare\Kelompok($this->pcare_conf());
return $bpjs->peserta($eduId)->index();
// spesialis
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->index();
// spesialis sub spesialis
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->keyword($keyword)->subSpesialis()->index();
// spesialis sarana
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->sarana()->index();
// spesialis khusus
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->khusus()->index();
// spesialis rujuk
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->rujuk()->subSpesialis($kodeSubSpesialis)->sarana($kodeSarana)->tanggalRujuk($tanggalRujuk)->index();
// spesialis rujuk
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->rujuk()->khusus($kodeKhusus)->nomorKartu($nomorKartu)->tanggalRujuk($tanggalRujuk)->index();
// spesialis rujuk
$bpjs = new PCare\Spesialis($this->pcare_conf());
return $bpjs->rujuk()->khusus($kodeKhusus)->subSpesialis($kodeSubSpesialis)->nomorKartu($nomorKartu)->tanggalRujuk($tanggalRujuk)->index();
```
Katalog BPJS:
- Vclaim V1.1: https://dvlp.bpjs-kesehatan.go.id/VClaim-Katalog
- Pcare V3: https://new-api.bpjs-kesehatan.go.id/pcare-rest-v3.0
+21
View File
@@ -0,0 +1,21 @@
{
"name": "aamdsam/bridging-bpjs",
"description": "Package untuk bridging bpjs vclaim, apcare dan pcare",
"type": "library",
"license": "MIT",
"minimum-stability": "dev",
"authors": [
{
"name": "Muhammad Muammar",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"AamDsam\\Bpjs\\": "src/"
}
},
"require": {
"guzzlehttp/guzzle": ">=6.0"
}
}
@@ -0,0 +1,35 @@
<?php
namespace AamDsam\Bpjs\Aplicare;
use AamDsam\Bpjs\BpjsService;
class KetersediaanKamar extends BpjsService
{
public function refKelas()
{
$response = $this->get('ref/kelas');
return json_decode($response, true);
}
public function bedGet($kodePpk, $start, $limit)
{
$response = $this->get('bed/read/'.$kodePpk.'/'.$start.'/'.$limit);
return json_decode($response, true);
}
public function bedCreate($kodePpk, $data = [])
{
$header = 'application/json';
$response = $this->post('bed/create/'.$kodePpk, $data, $header);
return json_decode($response, true);
}
public function bedUpdate($kodePpk, $data = [])
{
$response = $this->put('bed/update/'.$kodePpk, $data);
return json_decode($response, true);
}
public function bedDelete($kodePpk, $data = [])
{
$response = $this->delete('bed/delete/'.$kodePpk, $data);
return json_decode($response, true);
}
}
+176
View File
@@ -0,0 +1,176 @@
<?php
namespace AamDsam\Bpjs;
use GuzzleHttp\Client;
class BpjsService{
/**
* Guzzle HTTP Client object
* @var \GuzzleHttp\Client
*/
private $clients;
/**
* Request headers
* @var array
*/
private $headers;
/**
* X-cons-id header value
* @var int
*/
private $cons_id;
/**
* X-Timestamp header value
* @var string
*/
private $timestamp;
/**
* X-Signature header value
* @var string
*/
private $signature;
/**
* @var string
*/
private $secret_key;
/**
* @var string
*/
private $base_url;
/**
* @var string
*/
private $user_key;
/**
* @var string
*/
private $service_name;
public function __construct($configurations)
{
$this->clients = new Client([
'verify' => false
]);
foreach ($configurations as $key => $val){
if (property_exists($this, $key)) {
$this->$key = $val;
}
}
//set X-Timestamp, X-Signature, and finally the headers
$this->setTimestamp()->setSignature()->setHeaders();
}
protected function setHeaders()
{
$this->headers = [
'X-cons-id' => $this->cons_id,
'X-Timestamp' => $this->timestamp,
'X-Signature' => $this->signature,
'user_key' => $this->user_key,
];
return $this;
}
protected function setTimestamp()
{
date_default_timezone_set('UTC');
$this->timestamp = strval(time() - strtotime('1970-01-01 00:00:00'));
return $this;
}
protected function setSignature()
{
$data = $this->cons_id . '&' . $this->timestamp;
$signature = hash_hmac('sha256', $data, $this->secret_key, true);
$encodedSignature = base64_encode($signature);
$this->signature = $encodedSignature;
return $this;
}
protected function get($feature)
{
$this->headers['Content-Type'] = 'application/json; charset=utf-8';
try {
$response = $this->clients->request(
'GET',
$this->base_url . '/' . $this->service_name . '/' . $feature,
[
'headers' => $this->headers
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function post($feature, $data = [], $headers = [])
{
$this->headers['Content-Type'] = 'application/x-www-form-urlencoded';
if(!empty($headers)){
$this->headers = array_merge($this->headers,$headers);
}
try {
$response = $this->clients->request(
'POST',
$this->base_url . '/' . $this->service_name . '/' . $feature,
[
'headers' => $this->headers,
'json' => $data,
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function put($feature, $data = [])
{
$this->headers['Content-Type'] = 'application/x-www-form-urlencoded';
try {
$response = $this->clients->request(
'PUT',
$this->base_url . '/' . $this->service_name . '/' . $feature,
[
'headers' => $this->headers,
'json' => $data,
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function delete($feature, $data = [])
{
$this->headers['Content-Type'] = 'application/x-www-form-urlencoded';
try {
$response = $this->clients->request(
'DELETE',
$this->base_url . '/' . $this->service_name . '/' . $feature,
[
'headers' => $this->headers,
'json' => $data,
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Alergi extends PcareService
{
/**
* @var string
*/
protected $feature = 'alergi/jenis';
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Diagnosa extends PcareService
{
/**
* @var string
*/
protected $feature = 'diagnosa';
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Dokter extends PcareService
{
/**
* @var string
*/
protected $feature = 'dokter';
}
+33
View File
@@ -0,0 +1,33 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Kelompok extends PcareService
{
/**
* @var string
*/
protected $feature = 'kelompok';
public function club($kodeJenisKelompok)
{
$this->feature .= "/club/{$kodeJenisKelompok}";
return $this;
}
public function kegiatan($parameter)
{
// {bulan} for get or {edu id} for delete
$this->feature .= "/kegiatan/{$parameter}";
return $this;
}
public function peserta($eduId, $nomorKartu = null)
{
$this->feature = "/peserta/{$eduId}";
if ($nomorKartu !== null) {
$this->feature .= "/{$nomorKartu}";
}
return $this;
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Kesadaran extends PcareService
{
/**
* @var string
*/
protected $feature = 'kesadaran';
}
+23
View File
@@ -0,0 +1,23 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Kunjungan extends PcareService
{
/**
* @var string
*/
protected $feature = 'kunjungan';
public function rujukan($nomorKunjungan)
{
$this->feature .= "/rujukan/{$nomorKunjungan}";
return $this;
}
public function riwayat($nomorKartu)
{
$this->feature .= "/peserta/{$nomorKartu}";
return $this;
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Mcu extends PcareService
{
/**
* @var string
*/
protected $feature = 'mcu';
public function kunjungan($nomorKunjungan)
{
$this->feature .= "/kunjungan/{$nomorKunjungan}";
return $this;
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Obat extends PcareService
{
/**
* @var string
*/
protected $feature = 'obat';
public function dpho($keyword)
{
$this->feature .= "/dpho/{$keyword}";
return $this;
}
public function kunjungan($nomorKunjungan)
{
$this->feature .= "/kunjungan/{$nomorKunjungan}";
return $this;
}
}
+359
View File
@@ -0,0 +1,359 @@
<?php
namespace AamDsam\Bpjs\PCare;
use GuzzleHttp\Client;
class PcareService
{
/**
* Guzzle HTTP Client object
* @var \GuzzleHttp\Client
*/
private $clients;
/**
* Request headers
* @var array
*/
private $headers;
/**
* X-cons-id header value
* @var int
*/
private $cons_id;
/**
* X-Timestamp header value
* @var string
*/
private $timestamp;
/**
* X-Signature header value
* @var string
*/
private $signature;
/**
* X-Authorization header value
* @var string
*/
private $authorization;
/**
* @var string
*/
private $secret_key;
/**
* @var string
*/
private $username;
/**
* @var string
*/
private $password;
/**
* @var string
*/
private $app_code;
/**
* @var string
*/
private $base_url;
/**
* @var string
*/
private $service_name;
/**
* @var string
*/
private $user_key;
/**
* @var string
*/
protected $feature;
/**
* @var string
*/
public $key_decrypt;
public function __construct($configurations = [])
{
$this->clients = new Client([
'verify' => false
]);
foreach ($configurations as $key => $val){
if (property_exists($this, $key)) {
$this->$key = $val;
}
}
//set X-Timestamp, X-Signature, and finally the headers
$this->setTimestamp()->setSignature()->setAuthorization()->setHeaders();
}
public function keyword($keyword)
{
$this->feature .= "/{$keyword}";
return $this;
}
public function responseDecoded($response)
{
// ubah ke array
$responseArray = json_decode($response, true);
if (!is_array($responseArray)) {
return [
"metaData" => [
"message" => $responseArray,
"code" => 201
]
];
}
if (!isset($responseArray["response"])) {
return $responseArray;
}
$responseDecrypt = $this->stringDecrypt($responseArray["response"]);
$responseArrayDecrypt = json_decode($responseDecrypt, true);
// apabila bukan array
if (!is_array($responseArrayDecrypt) || $responseDecrypt==''){
return $responseArray;
}
$responseArray["response"] = $responseArrayDecrypt;
return $responseArray;
}
public function index($start = null, $limit = null)
{
$feature = $this->feature;
if ($start !== null and $limit !== null) {
$response = $this->get("{$feature}/{$start}/{$limit}");
} else {
$response = $this->get("{$feature}");
}
return $this->responseDecoded($response);
}
public function show($keyword = null, $start = null, $limit = null)
{
$feature = $this->feature;
if ($start !== null and $limit !== null) {
$response = $this->get("{$feature}/{$keyword}/{$start}/{$limit}");
} elseif ($keyword !== null) {
$response = $this->get("{$feature}/{$keyword}");
} else {
$response = $this->get("{$feature}");
}
return $this->responseDecoded($response);
}
public function store($data = [])
{
$response = $this->post($this->feature, $data);
return $this->responseDecoded($response);
}
public function update($data = [])
{
$response = $this->put($this->feature, $data);
return $this->responseDecoded($response);
}
public function destroy($keyword = null, $parameters = [])
{
$response = $this->delete($this->feature, $keyword, $parameters);
return $this->responseDecoded($response);
}
protected function setHeaders()
{
$this->headers = [
'X-cons-id' => $this->cons_id,
'X-Timestamp' => $this->timestamp,
'X-Signature' => $this->signature,
'X-Authorization' => $this->authorization,
'user_key' => $this->user_key,
];
return $this;
}
protected function setTimestamp()
{
date_default_timezone_set('UTC');
$this->timestamp = strval(time() - strtotime('1970-01-01 00:00:00'));
date_default_timezone_set(env('APP_TIMEZONE', 'Asia/Singapore'));
return $this;
}
protected function setSignature()
{
$data = "{$this->cons_id}&{$this->timestamp}";
$signature = hash_hmac('sha256', $data, $this->secret_key, true);
$encodedSignature = base64_encode($signature);
$this->key_decrypt = "$this->cons_id$this->secret_key$this->timestamp";
$this->signature = $encodedSignature;
return $this;
}
protected function setAuthorization()
{
$data = "{$this->username}:{$this->password}:{$this->app_code}";
$encodedAuth = base64_encode($data);
$this->authorization = "Basic {$encodedAuth}";
return $this;
}
protected function getClients()
{
return $this->clients;
}
protected function addHeader($key, $value)
{
$this->headers[$key] = $value;
}
public function getHeaders()
{
return $this->headers;
}
public function getBaseUrl()
{
return $this->base_url;
}
public function getServiceName()
{
return $this->service_name;
}
function stringDecrypt($string){
$encrypt_method = 'AES-256-CBC';
$key_hash = hex2bin(hash('sha256', $this->key_decrypt));
$iv = substr(hex2bin(hash('sha256', $this->key_decrypt)), 0, 16);
$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key_hash, OPENSSL_RAW_DATA, $iv);
return \LZCompressor\LZString::decompressFromEncodedURIComponent($output);
}
protected function get($feature, $parameters = [])
{
$params = $this->getParams($parameters);
$this->headers['Content-Type'] = 'application/json; charset=utf-8';
try {
$response = $this->clients->request(
'GET',
"{$this->base_url}/{$this->service_name}/{$feature}{$params}",
[
'headers' => $this->headers
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function post($feature, $data = [], $headers = [])
{
// $this->headers['Content-Type'] = 'application/json';
$this->headers['Accept'] = 'application/json';
$this->headers['Content-Type'] = 'text/plain';
if (!empty($headers)){
$this->headers = array_merge($this->headers, $headers);
}
try {
$response = $this->clients->request(
'POST',
"{$this->base_url}/{$this->service_name}/{$feature}",
[
'headers' => $this->headers,
'body' => json_encode($data),
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function put($feature, $data = [])
{
// $this->headers['Content-Type'] = 'application/json';
$this->headers['Content-Type'] = 'text/plain';
$this->headers['Accept'] = 'application/json';
try {
$response = $this->clients->request(
'PUT',
"{$this->base_url}/{$this->service_name}/{$feature}",
[
'headers' => $this->headers,
'body' => json_encode($data),
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
protected function delete($feature, $id, $parameters = [])
{
$params = $this->getParams($parameters);
$this->headers['Content-Type'] = 'application/json';
$this->headers['Accept'] = 'application/json';
$url = "{$this->base_url}/{$this->service_name}";
if ($id !== null) {
$url .= "/{$feature}/{$id}";
} else {
$url .= "/{$feature}";
}
try {
$response = $this->clients->request(
'DELETE',
"{$url}{$params}",
[
'headers' => $this->headers,
]
)->getBody()->getContents();
} catch (\Exception $e) {
$response = $e->getMessage();
}
return $response;
}
private function getParams($parameters)
{
$params = '';
foreach ($parameters as $key => $value) {
if (is_int($key)) {
$params .= "/{$value}";
} else {
$params .= "/{$key}/{$value}";
}
}
return $params;
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Pendaftaran extends PcareService
{
/**
* @var string
*/
protected $feature = 'pendaftaran';
public function peserta($nomorKartu)
{
$this->feature .= "/peserta/{$nomorKartu}";
return $this;
}
public function tanggalDaftar($tanggalDaftar)
{
$this->feature .= "/tglDaftar/{$tanggalDaftar}";
return $this;
}
public function nomorUrut($nomorUrut)
{
$this->feature .= "/noUrut/{$nomorUrut}";
return $this;
}
public function kodePoli($kodePoli)
{
$this->feature .= "/kdPoli/{$kodePoli}";
return $this;
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Peserta extends PcareService
{
/**
* @var string
*/
protected $feature = 'peserta';
public function jenisKartu($jenisKartu)
{
$this->feature .= "/{$jenisKartu}";
return $this;
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Poli extends PcareService
{
/**
* @var string
*/
protected $feature = 'poli';
public function fktp()
{
$this->feature .= "/fktp";
return $this;
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Prognosa extends PcareService
{
/**
* @var string
*/
protected $feature = 'prognosa';
}
+11
View File
@@ -0,0 +1,11 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Provider extends PcareService
{
/**
* @var string
*/
protected $feature = 'provider';
}
+59
View File
@@ -0,0 +1,59 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Spesialis extends PcareService
{
/**
* @var string
*/
protected $feature = 'spesialis';
public function rujuk()
{
$this->feature .= "/rujuk";
return $this;
}
public function subSpesialis($kodeSpesialis = null)
{
$this->feature .= "/subspesialis";
if ($kodeSpesialis !== null) {
$this->feature .= "/{$kodeSpesialis}";
}
return $this;
}
public function sarana($kodeSarana = null)
{
$this->feature .= "/sarana";
if ($kodeSarana !== null) {
$this->feature .= "/{$kodeSarana}";
}
return $this;
}
public function tanggalRujuk($tanggalRujuk)
{
$this->feature .= "/tglEstRujuk/{$tanggalRujuk}";
return $this;
}
public function khusus($kodeKhusus = null)
{
$this->feature .= "/khusus";
if ($kodeKhusus !== null) {
$this->feature .= "/{$kodeKhusus}";
}
return $this;
}
public function nomorKartu($nomorKartu = null)
{
$this->feature .= "/noKartu";
if ($nomorKartu !== null) {
$this->feature .= "/{$nomorKartu}";
}
return $this;
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class StatusPulang extends PcareService
{
/**
* @var string
*/
protected $feature = 'statuspulang';
public function rawatInap($status = true)
{
$this->feature .= "/rawatInap/{$status}";
return $this;
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php namespace AamDsam\Bpjs\PCare;
use AamDsam\Bpjs\PCare\PcareService;
class Tindakan extends PcareService
{
/**
* @var string
*/
protected $feature = 'tindakan';
public function kodeTkp($kodeTkp)
{
$this->feature .= "/kdTkp/{$kodeTkp}";
return $this;
}
public function kunjungan($nomorKunjungan)
{
$this->feature .= "/kunjungan/{$nomorKunjungan}";
return $this;
}
}
@@ -0,0 +1,28 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class LembarPengajuanKlaim extends BpjsService
{
public function insertLPK($data = [])
{
$response = $this->post('LPK/insert', $data);
return json_decode($response, true);
}
public function updateLPK($data = [])
{
$response = $this->put('LPK/update', $data);
return json_decode($response, true);
}
public function deleteLPK($data = [])
{
$response = $this->delete('LPK/delete', $data);
return json_decode($response, true);
}
public function cariLPK($tglMasuk, $jnsPelayanan)
{
$response = $this->get('LPK/TglMasuk/'.$tglMasuk.'/JnsPelayanan/'.$jnsPelayanan);
return json_decode($response, true);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class Monitoring extends BpjsService
{
public function dataKunjungan($tglSep, $jnsPelayanan)
{
$response = $this->get('Monitoring/Kunjungan/Tanggal/'.$tglSep.'/JnsPelayanan/'.$jnsPelayanan);
return json_decode($response, true);
}
public function dataKlaim($tglPulang, $jnsPelayanan, $statusKlaim)
{
$response = $this->get('Monitoring/Klaim/Tanggal/'.$tglPulang.'/JnsPelayanan/'.$jnsPelayanan.'/Status/'.$statusKlaim);
return json_decode($response, true);
}
public function historyPelayanan($noKartu, $tglAwal, $tglAkhir)
{
$response = $this->get('monitoring/HistoriPelayanan/NoKartu/'.$noKartu.'/tglAwal/'.$tglAwal.'/tglAkhir/'.$tglAkhir);
return json_decode($response, true);
}
public function dataKlaimJasaRaharja($tglMulai, $tglAkhir)
{
$response = $this->get('monitoring/JasaRaharja/tglMulai/'.$tglMulai.'/tglAkhir/'.$tglAkhir);
return json_decode($response, true);
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class Peserta extends BpjsService
{
public function getByNoKartu($noKartu, $tglPelayananSEP)
{
$response = $this->get('Peserta/nokartu/'.$noKartu.'/tglSEP/'.$tglPelayananSEP);
return json_decode($response, true);
}
public function getByNIK($nik, $tglPelayananSEP)
{
$response = $this->get('Peserta/nik/'.$nik.'/tglSEP/'.$tglPelayananSEP);
return json_decode($response, true);
}
}
+91
View File
@@ -0,0 +1,91 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class Referensi extends BpjsService
{
public function diagnosa($keyword)
{
$response = $this->get('referensi/diagnosa/'.$keyword);
return json_decode($response, true);
}
public function poli($keyword)
{
$response = $this->get('referensi/poli/'.$keyword);
return json_decode($response, true);
}
public function faskes($kd_faskes = null, $jns_faskes = null)
{
$response = $this->get('referensi/faskes/'.$kd_faskes.'/'.$jns_faskes);
return json_decode($response, true);
}
public function dokterDpjp($jnsPelayanan, $tglPelayanan, $spesialis)
{
$response = $this->get('referensi/dokter/pelayanan/'.$jnsPelayanan.'/tglPelayanan/'.$tglPelayanan.'/Spesialis/'.$spesialis);
return json_decode($response, true);
}
public function propinsi()
{
$response = $this->get('referensi/propinsi');
return json_decode($response, true);
}
public function kabupaten($kdPropinsi)
{
$response = $this->get('referensi/kabupaten/propinsi/'.$kdPropinsi);
return json_decode($response, true);
}
public function kecamatan($kdKabupaten)
{
$response = $this->get('referensi/kecamatan/kabupaten/'.$kdKabupaten);
return json_decode($response, true);
}
public function procedure($keyword)
{
$response = $this->get('referensi/procedure/'.$keyword);
return json_decode($response, true);
}
public function kelasRawat()
{
$response = $this->get('referensi/kelasrawat');
return json_decode($response, true);
}
public function dokter($keyword)
{
$response = $this->get('referensi/dokter/'.$keyword);
return json_decode($response, true);
}
public function spesialistik()
{
$response = $this->get('referensi/spesialistik');
return json_decode($response, true);
}
public function ruangrawat()
{
$response = $this->get('referensi/ruangrawat');
return json_decode($response, true);
}
public function carakeluar()
{
$response = $this->get('referensi/carakeluar');
return json_decode($response, true);
}
public function pascapulang()
{
$response = $this->get('referensi/pascapulang');
return json_decode($response, true);
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class Rujukan extends BpjsService
{
public function insertRujukan($data = [])
{
$response = $this->post('Rujukan/insert', $data);
return json_decode($response, true);
}
public function updateRujukan($data = [])
{
$response = $this->put('Rujukan/update', $data);
return json_decode($response, true);
}
public function deleteRujukan($data = [])
{
$response = $this->delete('Rujukan/delete', $data);
return json_decode($response, true);
}
public function cariByNoRujukan($searchBy, $keyword)
{
if ($searchBy == 'RS') {
$url = 'Rujukan/RS/'.$keyword;
} else {
$url = 'Rujukan/'.$keyword;
}
$response = $this->get($url);
return json_decode($response, true);
}
public function cariByNoKartu($searchBy, $keyword, $multi = false)
{
$record = $multi ? 'List/' : '';
if ($searchBy == 'RS') {
$url = 'Rujukan/RS/Peserta/'.$keyword;
} else {
$url = 'Rujukan/'.$record.'Peserta/'.$keyword;
}
$response = $this->get($url);
return json_decode($response, true);
}
public function cariByTglRujukan($searchBy, $keyword)
{
if ($searchBy == 'RS') {
$url = 'Rujukan/RS/TglRujukan/'.$keyword;
} else {
$url = 'Rujukan/List/Peserta/'.$keyword;
}
$response = $this->get($url);
return json_decode($response, true);
}
}
+56
View File
@@ -0,0 +1,56 @@
<?php
namespace AamDsam\Bpjs\VClaim;
use AamDsam\Bpjs\BpjsService;
class Sep extends BpjsService
{
public function insertSEP($data = [])
{
$response = $this->post('SEP/1.1/insert', $data);
return json_decode($response, true);
}
public function updateSEP($data = [])
{
$response = $this->put('SEP/1.1/Update', $data);
return json_decode($response, true);
}
public function deleteSEP($data = [])
{
$response = $this->delete('SEP/Delete', $data);
return json_decode($response, true);
}
public function cariSEP($keyword)
{
$response = $this->get('SEP/'.$keyword);
return json_decode($response, true);
}
public function suplesiJasaRaharja($noKartu, $tglPelayanan)
{
$response = $this->get('sep/JasaRaharja/Suplesi/'.$noKartu.'/tglPelayanan/'.$tglPelayanan);
return json_decode($response, true);
}
public function pengajuanPenjaminanSep($data = [])
{
$response = $this->post('Sep/pengajuanSEP', $data);
return json_decode($response, true);
}
public function approvalPenjaminanSep($data = [])
{
$response = $this->post('Sep/aprovalSEP', $data);
return json_decode($response, true);
}
public function updateTglPlg($data = [])
{
$response = $this->put('Sep/updtglplg', $data);
return json_decode($response, true);
}
public function inacbgSEP($keyword)
{
$response = $this->get('sep/cbg/'.$keyword);
return json_decode($response, true);
}
}