ivanwilliammd / satusehat-integration

SATUSEHAT Integration Library
https://packagist.org/packages/ivanwilliammd/satusehat-integration
MIT License
55 stars 39 forks source link

Refactoring - Exception Handlling #43

Closed ivanwilliammd closed 5 months ago

ivanwilliammd commented 5 months ago

Based on suggestion di thread ini https://github.com/ivanwilliammd/satusehat-integration/issues/31#issuecomment-2041070770

ada usulan untuk buat new Folder untuk handling exception baru dan melakukan refactoring.

Note:

  1. Code perlu dipastikan backward compatible dari 7.4, 8.0, 8.1, 8.2, 8.3
  2. Jangan melakukan strictly typing berlebihan khususnya untuk ternary based variable
yudistirasd commented 5 months ago

Plannya nanti seperti ini : src/Exception/FHIRException.php ... dst src/Exception/KFA / Terminology Exception.php ... dst

Ada masukan pak?

ivanwilliammd commented 5 months ago

Plannya nanti seperti ini : src/Exception/FHIRException.php ... dst src/Exception/KFA / Terminology Exception.php ... dst

Ada masukan pak?

Saya usul seperti ini @yudistirasd ... kira2 dari yg lain ada masukan @YogiPristiawan @SyaefulKai ? Dan juga untuk naming convention sprtinya perlu kita rapikan jadi kesepakatan camel case, karena di laravel kalau pakai capslock secara modelling itu kurang sesuai PSR-4 (contoh : KYC.php --> refer ke tabel K_Y_C)

. └── satusehat-integration/ └── src/ ├── Exception/ │ ├── FHIR/ │ │ ├── FHIRException.php │ │ ├── FHIRInvalidPropertyValue.php │ │ └── .... │ ├── Terminology/ │ │ ├── TerminologyException.php │ │ └── .... (bila ada) │ ├── Models/ │ │ ├── SatusehatLogException.php (bila ada) │ │ └── SatusehatTokenException.php (bila ada) │ └── Helper/ │ ├── KycException.php (bila ada) │ └── OAuthClient.php (bila ada) ├── Models (untuk proses yang perlu CRUD)/ │ ├── SatusehatLog.php │ └── SatusehatToken.php ├── FHIR/ │ ├── Patient.php │ ├── Practitioner.php │ └── ...... (FHIR Object lainnya) ├── Terminology/ │ ├── Icd10.php │ ├── Icd9cm.php │ ├── Kfa.php (need to refactor jadi camel case instead) │ ├── KodeWilayahIndonesia.php │ └── Loinc.php (future development) ├── Kyc.php (Helper function, need help untuk refactor ini jadi camel case) ├── OAuthClient.php (Helper function) └── SatusehatIntegrationServiceProvider.php (provider php file)