kemenkesri/satusehat-mediator-client-php
Composer 安装命令:
composer require kemenkesri/satusehat-mediator-client-php
包简介
Library to acceleare SATUSEHAT implementation via Interoperability Mediator
关键字:
README 文档
README
Spesifikasi API ini merupakan contoh untuk menggunakan Mediator Interoperabilitas SATUSEHAT yang secara khusus ditujukan untuk mempercepat dan memudahkan proses interoperabilitas data Rekam Medis Elektronik (RME) antara sistem informasi di Fasilitas Kesehatan (Rumah Sakit, Puskesmas, Klinik, Laboratorium, dll) dengan Platform SATUSEHAT. Mediator Interoperabilitas SATUSEHAT menyediakan format custom yang disederhanakan dari format HL7 FHIR sebagai perantara antara sistem RME dengan SATUSEHAT beserta sistem informasi kesehatan yang ada ditingkat nasional.
Package PHP ini digenerate secara otomatis menggunakan Swagger Codegen project:
Requirements
PHP 7.4 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/kemenkesri/satusehat-mediator-client-php.git"
}
],
"require": {
"kemenkesri/satusehat-mediator-client-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
require_once('/path/to/satusehat-mediator-client-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
Get Patient Info
<?php use Mediator\SatuSehat\Lib\Client\Api\PatientApi; use Mediator\SatuSehat\Lib\Client\Configuration; use Mediator\SatuSehat\Lib\Client\Model\GetPatientRequest; use Mediator\SatuSehat\Lib\Client\OAuthClient; require_once(__DIR__ . '/vendor/autoload.php'); $bearerToken = 'ABCD'; Configuration::setConfigurationConstant( 'development', [ 'authUrl' => 'https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken', 'tokenUrl' => 'https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/refreshtoken', 'baseUrl' => 'https://mediator-satusehat.kemkes.go.id/api-dev/satusehat/rme/v1.0', // 'clientId' => $clientId, // 'clientSecret' => $clientSecret, 'bearerToken' => $bearerToken, ] ); $apiInstance = new PatientApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new OAuthClient(Configuration::getDefaultConfiguration('development')) ); $body = new GetPatientRequest(); try { $result = $apiInstance->patientPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling PatientApi->patientPost: ', $e->getMessage(), PHP_EOL; } ?>
Submit RME data
<?php use Mediator\SatuSehat\Lib\Client\Api\SubmitDataApi; use Mediator\SatuSehat\Lib\Client\Configuration; use Mediator\SatuSehat\Lib\Client\Model\SubmitRequest; use Mediator\SatuSehat\Lib\Client\OAuthClient; require_once(__DIR__ . '/vendor/autoload.php'); $bearerToken = 'ABCD'; Configuration::setConfigurationConstant( 'development', [ 'authUrl' => 'https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken', 'tokenUrl' => 'https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/refreshtoken', 'baseUrl' => 'https://mediator-satusehat.kemkes.go.id/api-dev/satusehat/rme/v1.0', // 'clientId' => $clientId, // 'clientSecret' => $clientSecret, 'bearerToken' => $bearerToken, ] ); $apiInstance = new Mediator\SatuSehat\Lib\Client\Api\SubmitDataApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new OAuthClient(Configuration::getDefaultConfiguration('development')) ); $body = new SubmitRequest( "profile" => [ "TB" ], "organization_id" => "100011961", "location_id" => "ef011065-38c9-46f8-9c35-d1fe68966a3e", "practitioner_nik" => "N10000001", "patient" => [ "nik" => "3515120000000000", "name" => "ABCD", "birthDate" => "2019-10-25", "address" => [ [ "use" => "temp", // temp = alamat domisili, home = alamat ktp "country" => "id", "province" => "35", // kode depdagri 2 digit untuk provinsi "city" => "3578", // kode depdagri 4 digit untuk kab/kota "district" => "357801", // kode depdagri 6 digit untuk kecamatan "village" => "3578011002", // kode depdagri 10 digit untuk kelurahan/desa "rt" => "", "rw" => "", "postal_code" => "-", "line" => ["alamat jalan dan informasi lainnya"] ] ], ], "tb_suspect" => [ "tgl_daftar" => "2024-05-24", "asal_rujukan_id" => "3", "fasyankes_id" => "1000119617", "jenis_fasyankes_id" => "1", "terduga_tb_id" => "1", "terduga_ro_id" => null, "tipe_pasien_id" => "1", "status_dm_id" => "1", "status_hiv_id" => "3" ], "encounter" => [ "encounter_id" => "83ef7e32-64f3-40a7-87c4-3cc59d44b4c6", "local_id" => "2024-05-24 09:27:26.405593+07", "classification" => "AMB", "period_start" => "2024-05-24T09:28:01+07:00", "period_in_progress" => "2024-05-24T09:58:01+07:00", "period_end" => "2024-05-24T10:58:01+07:00" ], "condition" => [ [ "id" => "2a073abe-1b17-441d-885c-206e8b966f5c", "code_condition" => "Z10" ] ] ); try { $result = $apiInstance->syncPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling SubmitDataApi->syncPost: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://mediator-satusehat.kemkes.go.id/api-dev/satusehat/rme/v1.0
| Class | Method | HTTP request | Description |
|---|---|---|---|
| PatientApi | patientPost | POST /patient | Mengambil informasi terkait pasien |
| SubmitDataApi | syncPost | POST /sync | Kirim data RME ke Mediator dengan format Non-FHIR |
Documentation For Models
- ApiError
- CarePlan
- Composition
- Condition
- DiagnosticReport
- DocumentStatus
- Encounter
- EpisodeOfCare
- GetPatientRequest
- GetPatientResponse
- Immunization
- Location
- MediatorResourceBasic
- Medication
- MedicationIngredient
- MedicationStatement
- Observation
- ObservationComponent
- Patient
- PatientBasic
- Procedure
- QuestionnaireResponse
- SatuSehatResponse
- ServiceRequest
- Specimen
- SubmitRequest
- SubmitResponse
- TbConfirm
- TbSuspect
Documentation For Authorization
satusehat_auth
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1
- Scopes:
satusehat_bearer
- Type: HTTP bearer authentication
Author
kemenkesri/satusehat-mediator-client-php 适用场景与选型建议
kemenkesri/satusehat-mediator-client-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 487 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 07 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「hl7」 「ehr」 「fhir」 「ohie-mediator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kemenkesri/satusehat-mediator-client-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kemenkesri/satusehat-mediator-client-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kemenkesri/satusehat-mediator-client-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Pre-generated classes from dcarbone/php-fhir
A port of the PEAR Net_HL7 library to PHP5.3+
Pre-generated FHIR model classes for R4, R4B, and R5 versions
Official PHP SDK for the DrChrono API - Complete EHR/Practice Management integration
Official Aqua-io API library client for PHP (ICD-9 and ICD-10)
Shared interfaces, attributes and utilities for FHIR packages
统计信息
- 总下载量: 487
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2024-07-24