Giter VIP home page Giter VIP logo

bridging-bpjs's Introduction

Service-Bridging

Service-bridging adalah sebuah package yang di desain untuk mempermudah pengguna framework php untuk melakukan generate signature maupun token untuk akses ke service BPJS baik versi 1 maupun versi 2 yang akan datang, semoga package ini dapat membantu teman-teman dalam melakukan develop terhadap perkembangan service BPJS kesehatan

FEATURE

  • Custom Url
  • Generate Signature
  • Generate Timestamp BPJS
  • Generate keyString
  • Decrypt String
  • Decompress with (Lz-String)

Installation

Composer

composer require virusphp/bridging-bpjs

Publish Config

php artisan vendor:publish --provider="Vclaim\Bridging\BridgingBpjsServiceProvider" --tag=config

Usage

#Confirasi .env BPJS
CONS_ID=xxxxx
SECRET_KEY=xxxX

#Config untuk Vclaim BPJS
API_BPJS_VCLAIM=https://apijkn-dev.bpjs-kesehatan.go.id/vclaim-rest-dev/
USER_KEY_VCLAIM=xxxx

#Config untuk Icare BPJS
API_BPJS_ICARE=https://apijkn-dev.bpjs-kesehatan.go.id/ihs_dev/

#Config untuk Antrol BPJS
API_BPJS_ANTROL=https://apijkn-dev.bpjs-kesehatan.go.id/antreanrs_dev/
USER_KEY_ANTROL=xxxx

#Config untuk Aplicares BPJS
API_BPJS_APLICARE=https://new-api.bpjs-kesehatan.go.id/aplicaresws/rest/


##Configurasi .env untuk sirs kemkes
USER_SIRS=xxxx
PASS_SIRS=xxxx
API_KEMKES=http://sirs.kemkes.go.id/fo/index.php/
<?php
// configurasi config (Support laravel 7 ke atas)
config/vclaim.php
return [
	'api' => [
		'endpoint'  => env('API_BPJS','ENDPOINT-KAMU'),
		'consid'  => env('CONS_ID','CONSID-KAMU'),
		'seckey' => env('SECRET_KEY', 'SECRET-KAMU'),
		'user_key' => env('USER_KEY', 'SECRET-KAMU'),
	]
]
<?php
// Example Controller bridging to Vclaim BPJS  (Laravel 7 ke atas)
use Bpjs\Bridging\Vclaim\BridgeVclaim;

Class SomeController
{
	protected $bridging;

	public function __construct()
	{
		$this->bridging = new BridgeVclaim();
	}

	// Example To use get Referensi diagnosa
	// Name of Method example
	public function getDiagnosa($kode)
	{
		$endpoint = 'referensi/diagnosa/'. $kode;
		return $this->bridging->getRequest($endpoint);
	}
}
<?php
// Example Controller bridging to Icare BPJS  (Laravel 7 ke atas)
use Bpjs\Bridging\Icare\BridgeIcare;
use Illuminate\Http\Request;

Class SomeController
{
	protected $bridging;

	public function __construct()
	{
		$this->bridging = new BridgeIcare();
	}

	// Example To use get History
	// Name of Method example
	public function getHistory(Request $reqeust)
	{
		$data = $this->handleRequest($reqeust);
		$endpoint = 'api/rs/validate';
		return $this->bridging->postRequest($endpoint, $data);
	}

	protected function handleRequest($request)
	{
		$data['param'] = $request->nomor_kartu;
		$data['kodedokter'] = $request->kode_dokter;
		return json_encode($data);
	}
}
<?php
// Example Controller bridging to Aplicare BPJS  (Laravel 7 ke atas)
use Bpjs\Bridging\Icare\BridgeAPlicares;
use Illuminate\Http\Request;

Class SomeController
{
	protected $bridging;

	public function __construct()
	{
		$this->bridging = new BridgeAplicares();
	}

	// Example To use get Referensi Kelas
	// Name of Method example
	public function getReferensiKelas()
	{
		$endpoint = 'ref/kelas';
		return $this->bridging->getRequest($endpoint);
	}
}
<?php
// Example Controller bridging to SIRS Kemkes  (Laravel 7 ke atas)
use Kemkes\Bridging\Sirs\BridgeSirs;

Class SomeController
{
   	protected $bridging;

    public function __construct()
    {
        $this->bridging = new BridgeSirs;
    }

	// Example To use get list Tempat tidur
	// Name of Method example
	 public function getTempatTidur()
    {
        $url = 'Fasyankes';
        $tempattidur = $this->bridging->getRequest($url);
        return $tempattidur;
    }
}

CHANEL YOUTUBE

KLIK TONTON UNTUK SUPORT (LIKE DAN KOMEN)

Watch the video

CONTACT

  • 082220801333

Changelog

2024-08-02

  • v2.1.4 Add new fitur briding Sirs update

bridging-bpjs's People

Contributors

dvlwj avatar ferifahrul7 avatar virusphp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bridging-bpjs's Issues

cURL error 60: SSL certificate problem

Saya sudah coba menggunakan library ini... tetapi ada kendala di SSL certificate problem.
berikut response dari API BPJSnya
"metaData" => array:2 [
"code" => 0
"message" => "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://apijkn-dev.bpjs-kesehatan.go.id/vclaim-rest-dev/referensi/faskes/ikur/1"
]
"response" => null

Error Ketika menggunakan bridging antrol

Saya mengalami error ketika menggunakan bridging antrian online
Class 'Bpjs\Bridging\Vclaim\BridgingAntrol' not found
Class 'Bpjs\Bridging\Vclaim\ResponseAntrol' not found
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.