ivanwilliammd / satusehat-integration
Build SATUSEHAT FHIR Object in Easy Way
Package info
github.com/ivanwilliammd/satusehat-integration
pkg:composer/ivanwilliammd/satusehat-integration
Fund package maintenance!
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- guzzlehttp/guzzle: ^7.8
- illuminate/config: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- jeroenzwart/laravel-csv-seeder: ^1.6
- phpseclib/phpseclib: ^3.0
- vlucas/phpdotenv: ^5.5
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
- laravel/pint: Minimalist Opionated Code Formatting Extension for PHP 8.0+
- pestphp/pest: Pest PHP Testing Framework for PHP 8.0+
This package is auto-updated.
Last update: 2026-08-05 19:01:36 UTC
README
Build SATUSEHAT FHIR R4 objects with ease — open source Laravel PHP library.
Overview
satusehat-integration is an open-source Laravel PHP library that makes integrating with SATUSEHAT (Indonesia's national health data platform, powered by FHIR R4) simple and developer-friendly.
Built on the official SATUSEHAT Platform Guidelines, it provides:
- OAuth2 authentication with SATUSEHAT IAM
- FHIR R4 resource object builders (Patient, Encounter, Condition, Observation, etc.)
- Bundle operations for multi-resource transactions
- KYC / Centang Biru verification
- Master data: ICD-10, Kode Wilayah Indonesia, KFA v2
Quick Start
composer require ivanwilliammd/satusehat-integration
# .env SATUSEHAT_ENV=DEV # DEV | STG | PROD SATUSEHAT_BASE_URL_DEV=https://api-satusehat-dev.dto.kemkes.go.id CLIENTID_DEV=your_client_id CLIENTSECRET_DEV=your_client_secret ORGID_DEV=your_org_id
use Satusehat\Integration\OAuth2Client; use Satusehat\Integration\FHIR\FhirPatient; use Satusehat\Integration\FHIR\FhirEncounter; $client = new OAuth2Client(); // Build & post Patient $patient = (new FhirPatient) ->setNik('3312345678901234') ->setName('John Doe') ->setGender('male') ->setBirthDate('1990-01-15') ->setAddress('Jl. Sudirman No.1', 'Jakarta Selatan', 'DKI Jakarta') ->setPhone('081234567890'); [$status, $resp] = $client->ss_post('Patient', $patient->build()); // Build & post Encounter $encounter = (new FhirEncounter) ->setStatus('finished') ->setClassCode('AMB') ->setSubjectReference("Patient/{$resp['id']}", 'John Doe') ->setParticipantIndividual('Practitioner/10009880728', 'Dr. Smith') ->setPeriodStart(now()->toIso8601String()) ->setReasonText('Pemeriksaan umum'); [$status, $encResp] = $client->ss_post('Encounter', $encounter->build());
FHIR Resources Supported
| # | Resource | GET | POST | PUT |
|---|---|---|---|---|
| 1 | Patient | ✅ | ✅ | ✅ |
| 2 | Practitioner | ✅ | ✅ | ✅ |
| 3 | Organization | ✅ | ✅ | ✅ |
| 4 | Location | ✅ | ✅ | ✅ |
| 5 | Encounter | ✅ | ✅ | ✅ |
| 6 | Condition | ✅ | ✅ | ✅ |
| 7 | Observation | ✅ | ✅ | ✅ |
| 8 | Bundle | — | ✅ | — |
Coming soon (Phase 3 roadmap): Procedure, MedicationRequest, MedicationDispense, ServiceRequest, Specimen, DiagnosticReport, AllergicIntolerance, ClinicalImpression, CarePlan, Goal, NutritionOrder, Composition, Immunization, and more.
Master Data Included
| Data | Seeder | CSV |
|---|---|---|
| ICD-10 (18,547 codes) | ✅ | ✅ |
| Kode Wilayah Indonesia (91,592 entries) | ✅ | ✅ |
Documentation
| Page | Description |
|---|---|
| Installation | composer require, publish config, env setup |
| Usage | OAuth, Patient, Encounter, Condition, Bundle, KFA |
| Features | Full feature matrix |
| Onboarding | SATUSEHAT developer account setup |
| Wiki | Full documentation |
Example Projects
- satusehat-laravel-example — Laravel 10 full integration example
Open Source Roadmap
This library is actively developed. See ROADMAP.md for the full phased release plan from v3.x → v5.0.
Upgrade Notes
v3.2.0 (Laravel 13)
- ✅ Added Laravel 13 support (
illuminate/* ^13.0) - ✅ Fixed Dotenv path resolution —
base_path()used inside Laravel,getcwd()fallback for standalone - ✅ Replaced deprecated
Dotenv::createUnsafeImmutable→Dotenv::createImmutable
v3.0.0
- Multi-role access with per-API restrictions
- Privacy: Patient/Practitioner name censorship
Encounter.subject.displayandEncounter.participant.individualmust match Master Patient Index / Master Nakes Index
License
MIT — see LICENSE