deantev / inhealth-integration
此包的最新版本(dev-main)没有可用的许可信息。
Mandiri Inhealth 集成 API 版本:v2
dev-main
2024-02-12 07:45 UTC
Requires
- php: >=5.4.0
- illuminate/http: ^6.0|^7.0|^8.0|^9.0|^10.0
This package is auto-updated.
Last update: 2024-09-12 09:01:20 UTC
README
Mandiri Inhealth Integration for Laravel 10(尚未在 Laravel 6、7、8、9 & 上测试)。使用 composer 安装,无需麻烦即可开始集成。无公共资产,无供应商路由。有关 Mandiri Inhealth API 的信息,您可以在此处阅读:Swagger
安装(Laravel)
通过 composer 安装
composer require deantev/inhealth-integration:dev-main
添加提供者
将服务提供者添加到 config/app.php
中的 providers
部分
Deantev\Inhealth\Integration\InhealthServiceProvider::class,
发布配置文件
使用 artisan 发布配置文件
php artisan vendor:publish --tag=inhealth-config
配置设置
配置您的 .env 文件
INHEALTH_PRODUCTION = #toogle to production url true or false (default: false) INHEALTH_TOKEN = #Your Inhealth Token (this is required to be filled) INHEALTH_PROVIDER_CODE = #Your Provider Code (this is required to be filled) IHEALTH_DEV_URL = #inhealth development url (default: https://development.inhealth.co.id/pelkesws2/) you can change the value if url vendor mandiri changes. IHEALTH_PROD_URL = #inhealth prod url (default: https://development.inhealth.co.id/pelkesws2/)
示例用法
函数上的用法
use Deantev\Inhealth\Integration\Services\Inhealth as ServicesInhealth; public function somefunction(): array { // $data is the payload that you want to send to Mandiri Inhealth $data =[ "tglpelayanan" => "2023-11-23", "nokainhealth" => "10015xxxxxxxx", "jenispelayanan" => "400904xxxxxxxx", "poli" => "24J", ] // Call function $inhealth = new ServicesInhealth; $result = $inhealth->postEligibilitasPeserta($data); return $result; }
结果
成功响应
结果将是解码 json 响应的数组(以下表示的是示例响应)
[ "ERRORCODE" => "00", "ERRORDESC" => "Sukses", "NOKAPST" => "1001541995379", "NMPST" => "LINTANG SETIABUDI", "TGLLAHIR" => "1994-09-15T00:00:00", "KODEPRODUK" => "G", "NAMAPRODUK" => "GOLD", "KODEKELASRAWAT" => "1", "NAMAKELASRAWAT" => "KELAS I", "KODEBADANUSAHA" => "02230011", "NAMABADANUSAHA" => "PT GARUDA INDONESIA (PERSERO) Tbk", "KODEPROVIDER" => "0901K009", "NAMAPROVIDER" => "KLINIK GARUDA SENTRA MEDIKA", "NOKAPSTBPJS" => "0000165714636", "NMPSTBPJS" => "LINTANG SETIABUDI", "KELASBPJS" => "KELAS 1", "KODEPROVIDERBPJS" => "11030802", "NAMAPROVIDERBPJS" => "KALIWUNGU SELATAN", "FLAGPSTBPJS" => "1", "PRODUKCOB" => "BADAN USAHA NON COB", "PRIORITAS" => "", "TGLMULAIPST" => "2021-07-01T00:00:00", "TGLAKHIRPST" => "2023-12-31T00:00:00", "JENISKELAMIN" => "P", ]
错误响应
结果将是解码 json 响应的数组(以下表示的是示例响应)
[ "ERRORCODE" => "07", "ERRORDESC" => "Peserta Tidak Terdaftar", "NOKAPST" => null, "NMPST" => null, "TGLLAHIR" => "0001-01-01T00:00:00", "KODEPRODUK" => null, "NAMAPRODUK" => null, "KODEKELASRAWAT" => null, "NAMAKELASRAWAT" => null, "KODEBADANUSAHA" => null, "NAMABADANUSAHA" => null, "KODEPROVIDER" => null, "NAMAPROVIDER" => null, "NOKAPSTBPJS" => null, "NMPSTBPJS" => null, "KELASBPJS" => null, "KODEPROVIDERBPJS" => null, "NAMAPROVIDERBPJS" => null, "FLAGPSTBPJS" => null, "PRODUKCOB" => null, "PRIORITAS" => null, "TGLMULAIPST" => "0001-01-01T00:00:00", "TGLAKHIRPST" => "0001-01-01T00:00:00", "JENISKELAMIN" => null, ]