Build SATUSEHAT FHIR R4 objects with ease — open source Laravel PHP library.
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
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_iduse 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());| # | 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.
| Data | Seeder | CSV |
|---|---|---|
| ICD-10 (18,547 codes) | ✅ | ✅ |
| Kode Wilayah Indonesia (91,592 entries) | ✅ | ✅ |
| 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 |
- satusehat-laravel-example — Laravel 10 full integration example
This library is actively developed. See ROADMAP.md for the full phased release plan from v3.x → v5.0.
- ✅ 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
- Multi-role access with per-API restrictions
- Privacy: Patient/Practitioner name censorship
Encounter.subject.displayandEncounter.participant.individualmust match Master Patient Index / Master Nakes Index
MIT — see LICENSE