Download the PHP package ivanwilliammd/satusehat-integration without Composer
On this page you can find all versions of the php package ivanwilliammd/satusehat-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ivanwilliammd/satusehat-integration
More information about ivanwilliammd/satusehat-integration
Files in ivanwilliammd/satusehat-integration
Package satusehat-integration
Short Description Build SATUSEHAT FHIR Object in Easy Way
License MIT
Homepage https://github.com/ivanwilliammd/satusehat-integration
Informations about the package satusehat-integration
SATUSEHAT Integration Library
Open-source PHP library for integrating with SATUSEHAT — Indonesia's national health data platform powered by FHIR R4. Works standalone (native PHP) or with Laravel.
Overview
satusehat-integration is an open-source PHP library for integrating with SATUSEHAT — Indonesia's national health data platform powered by FHIR R4.
Built on the official SATUSEHAT Platform Guidelines. Ships with:
- 32 DataType classes — composable FHIR R4 value objects
- 141 PayloadBuilder classes — fluent builders for 139 FHIR R4 resources + 2 SATUSEHAT NON-FHIR builders (
BillingStatus,PurificationDecision) - SSRequest / SSResponse — HTTP client with OAuth2 + retry
- Durable queue + worker — SQLite-backed, retry/DLQ, rate limiting, monitoring
- SSValidationError — maps 558 SATUSEHAT validation rule codes to human messages
- Master data: ICD-10, Kode Wilayah Indonesia, KFA v2
Deploy as standalone PHP or integrate with Laravel via the service provider.
Quick Install
TerminologyClient — SmarTerm (terminology.ivanmd.id)
TerminologyClient menghubungkan aplikasi ke SmarTerm — layanan kamus terpadu
terminologi kesehatan Indonesia (ICD-10, ICD-9-CM, SNOMED CT, LOINC, KPTL, KFA
obat/alkes/BZA). Berguna saat aplikasi TIDAK ingin menyimpan dataset nasional
lokal — cukup panggil REST API untuk search / validate / resolve FHIR code.
Architecture
DataType Classes (src/DataType/)
Atomic FHIR R4 value objects. All extend DataType which provides a recursive toArray() method — nested DataType instances serialize to clean FHIR JSON automatically.
| Category | Classes |
|---|---|
| Core | Coding, CodeableConcept, Identifier, Period, ContactPoint, Address, HumanName, Reference |
| Quantity | Quantity, SimpleQuantity, Range, Ratio, Age, Count, Distance, Duration, Money |
| Structured | Attachment, Narrative, Annotation, Timing, TimingRepeat, Dosage, DosageDoseAndRate |
| Utility | Extension, Signature, RelatedArtifact, Expression, TriggerDefinition, DataRequirement, ParameterDefinition |
Example — HumanName:
PayloadBuilder Pattern (src/Builder/)
Fluent builder for each FHIR resource. Each builder accepts DataType instances and exposes a build() method returning a clean FHIR JSON payload.
SSRequest / SSResponse
- SSRequest — HTTP client with
get(),post(),put(),delete()methods. Handles OAuth2 bearer tokens, auto-refresh on HTTP 401, retry with exponential backoff on 429/5xx, configurable timeout. - SSResponse — Structured response wrapper:
isSuccess()/isError(),getErrorMessages(),getResourceId().
Queue + Worker
Durable SQLite queue with background worker. Handles retry, DLQ, rate limiting, and monitoring. Works standalone (no Laravel needed).
Status flow: pending → processing → success | failed (auto-retry) | dlq
Error classification: 401 (retry+token refresh), 429 (honor Retry-After), 422/400/403/404/409/412 (DLQ), 5xx (retry)
Artisan commands (Laravel):
Usage Examples
Patient
Encounter
Observation
Old Way vs v4 Way
Before v4 (raw array)
v4 (DataType + PayloadBuilder + SSResponse)
Key improvements in v4:
- DataType classes guarantee valid FHIR structure
toArray()handles nested serialization recursively- SSResponse gives typed, structured access to responses
- Automatic token refresh and retry on network failures
- Fully fluent builder API
Supported FHIR Resources
All 51 resources fully implemented via PayloadBuilder classes. Core (✅) + Non-Core (💼):
| # | Resource | GET | POST | PUT | PATCH | Notes |
|---|---|---|---|---|---|---|
| 1 | Patient | ✅ | ✅ | ✅ | ✅ | MPI |
| 2 | Practitioner | ✅ | ✅ | ✅ | ✅ | SDMK |
| 3 | PractitionerRole | ✅ | ✅ | ✅ | ✅ | |
| 4 | Organization | ✅ | ✅ | ✅ | ✅ | MSI |
| 5 | Location | ✅ | ✅ | ✅ | ✅ | |
| 6 | Encounter | ✅ | ✅ | ✅ | ✅ | |
| 7 | Condition | ✅ | ✅ | ✅ | ✅ | |
| 8 | Observation | ✅ | ✅ | ✅ | ✅ | |
| 9 | Procedure | ✅ | ✅ | ✅ | ✅ | |
| 10 | MedicationRequest | ✅ | ✅ | ✅ | ✅ | |
| 11 | Bundle | — | ✅ | — | — | batch/transaction |
| 12 | CarePlan | ✅ | ✅ | ✅ | ✅ | |
| 13 | Composition | ✅ | ✅ | ✅ | ✅ | RME |
| 14 | ClinicalImpression | ✅ | ✅ | ✅ | ✅ | |
| 15 | Goal | ✅ | ✅ | ✅ | ✅ | |
| 16 | NutritionOrder | ✅ | ✅ | ✅ | ✅ | |
| 17 | AllergyIntolerance | ✅ | ✅ | ✅ | ✅ | |
| 18 | Device | ✅ | ✅ | ✅ | ✅ | |
| 19 | DiagnosticReport | ✅ | ✅ | ✅ | ✅ | |
| 20 | DocumentReference | ✅ | ✅ | ✅ | ✅ | |
| 21 | EpisodeOfCare | ✅ | ✅ | ✅ | ✅ | |
| 22 | FamilyMemberHistory | ✅ | ✅ | ✅ | ✅ | |
| 23 | GenomicStudy | ✅ | ✅ | ✅ | ✅ | |
| 24 | Group | ✅ | ✅ | ✅ | ✅ | |
| 25 | Immunization | ✅ | ✅ | ✅ | ✅ | |
| 26 | Medication | ✅ | ✅ | ✅ | ✅ | |
| 27 | MedicationAdministration | ✅ | ✅ | ✅ | ✅ | |
| 28 | MedicationDispense | ✅ | ✅ | ✅ | ✅ | |
| 29 | MedicationStatement | ✅ | ✅ | ✅ | ✅ | |
| 30 | MolecularSequence | ✅ | ✅ | ✅ | ✅ | |
| 31 | QuestionnaireResponse | ✅ | ✅ | ✅ | ✅ | |
| 32 | RelatedPerson | ✅ | ✅ | ✅ | ✅ | |
| 33 | RiskAssessment | ✅ | ✅ | ✅ | ✅ | |
| 34 | ServiceRequest | ✅ | ✅ | ✅ | ✅ | |
| 35 | Specimen | ✅ | ✅ | ✅ | ✅ | |
| 36 | Substance | ✅ | ✅ | ✅ | ✅ | |
| 37 | Task | ✅ | ✅ | ✅ | ✅ | |
| 38 | Account | ✅ | ✅ | ✅ | ✅ | |
| 39 | ImagingStudy | 💼 | 💼 | 💼 | 💼 | non-core |
| 40 | Coverage | 💼 | 💼 | 💼 | 💼 | non-core |
| 41 | CoverageEligibilityRequest | 💼 | 💼 | 💼 | 💼 | non-core |
| 42 | CoverageEligibilityResponse | 💼 | 💼 | 💼 | 💼 | non-core |
| 43 | Claim | 💼 | 💼 | 💼 | 💼 | non-core |
| 44 | ClaimResponse | 💼 | 💼 | 💼 | 💼 | non-core |
| 45 | ChargeItem | 💼 | 💼 | 💼 | 💼 | non-core |
| 46 | ChargeItemDefinition | 💼 | 💼 | 💼 | 💼 | non-core |
| 47 | ChargeItemResponse | 💼 | 💼 | 💼 | 💼 | non-core |
| 48 | PaymentNotice | 💼 | 💼 | 💼 | 💼 | non-core |
| 49 | PaymentReconciliation | 💼 | 💼 | 💼 | 💼 | non-core |
| 50 | Invoice | 💼 | 💼 | 💼 | 💼 | non-core |
Documentation
| Page | Description |
|---|---|
| CHANGELOG | Version history and release notes |
| Wiki | Full documentation |
| Installation | composer require, publish config, env setup |
| Usage | OAuth, Patient, Encounter, Condition, Bundle, KFA |
| Features | Full feature matrix |
| Onboarding | SATUSEHAT developer account setup |
| ROADMAP.md | Phased release plan v3.x → v5.0 |
External Resources
- HL7 FHIR R4 Specification
- SATUSEHAT Platform Docs
- SATUSEHAT FHIR Base URL
- satusehat-laravel-example — Laravel 10 full integration example
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
Support
Open an issue for bugs or feature requests.
License
MIT — see LICENSE.
All versions of satusehat-integration with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/config Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
jeroenzwart/laravel-csv-seeder Version ^1.6
phpseclib/phpseclib Version ^3.0
vlucas/phpdotenv Version ^5.5