FHM17062601CPONE - Update store procedure trigger table terkait cpone_dashboard
This commit is contained in:
248
docs_cpone_dashboard_endpoints.md
Normal file
248
docs_cpone_dashboard_endpoints.md
Normal file
@@ -0,0 +1,248 @@
|
||||
# Endpoint dan Controller yang Berhubungan dengan `cpone_dashboard`
|
||||
|
||||
Dokumen ini merangkum endpoint/controller di `BE_CPONE` yang memiliki hubungan dengan `cpone_dashboard`, baik secara langsung melalui koneksi database `cpone_dashboard`, maupun tidak langsung melalui library `Mcudashboard` atau stored procedure `cpone.sp_*`.
|
||||
|
||||
## Ringkasan Utama
|
||||
|
||||
Controller yang paling terkait dengan `cpone_dashboard`:
|
||||
|
||||
1. `summarydashboard/Generatedata`
|
||||
2. `dashboard_mcu/User`
|
||||
3. `cpone/SendEmailPreregister`
|
||||
4. `mockup/mcuoffline/Preregisterappcponev8`
|
||||
5. `mockup/mcuoffline/Preregisterappcponev3`
|
||||
6. `mockup/mcuoffline/Resumeindividucponev7`
|
||||
7. `mockup/sampling-lab-mobile-cpone-v14/Patient`
|
||||
8. `v1/su/Test`
|
||||
|
||||
## Detail per Controller
|
||||
|
||||
### 1. `summarydashboard/Generatedata`
|
||||
|
||||
File: `application/controllers/summarydashboard/Generatedata.php`
|
||||
|
||||
Keterangan:
|
||||
- Membuka koneksi database `cpone_dashboard` di constructor.
|
||||
- Pusat sinkronisasi ada di method private `sync_to_dashboard($mgm_mcuid)`.
|
||||
- Sync ini menulis snapshot hasil ke tabel dashboard seperti:
|
||||
- `mcu_generate`
|
||||
- `kelainan_details`
|
||||
- `kelainan_summary`
|
||||
- `mcu_result_all`
|
||||
|
||||
Method / endpoint yang memicu sinkronisasi:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `generate_kelainan_lab` | Generate kelainan lab lalu sync ke dashboard |
|
||||
| `generate_kelainan_nonlab` | Generate kelainan nonlab lalu sync ke dashboard |
|
||||
| `generate_kelainan_fisik` | Generate kelainan fisik lalu sync ke dashboard |
|
||||
| `generate_all_results` | Generate hasil gabungan lalu sync ke dashboard |
|
||||
| `summary_kelainan_sepuluh` | Generate summary kelainan lalu sync ke dashboard |
|
||||
|
||||
Catatan teknis:
|
||||
- `sync_to_dashboard()` melakukan delete per `Mgm_McuID` lalu insert ulang snapshot terbaru.
|
||||
- Sumber data diambil dari `cpone_corporate`, lalu dicopy ke `cpone_dashboard`.
|
||||
|
||||
### 2. `dashboard_mcu/User`
|
||||
|
||||
File: `application/controllers/dashboard_mcu/User.php`
|
||||
|
||||
Keterangan:
|
||||
- Controller khusus user management untuk dashboard MCU.
|
||||
- Direct query ke database `cpone_dashboard`.
|
||||
- Menyentuh tabel seperti:
|
||||
- `dashboard_user`
|
||||
- `dashboard_user_project`
|
||||
- Juga memakai stored procedure dashboard:
|
||||
- `sp_insert_dashboard_user`
|
||||
- `sp_reset_dashboard_user_password`
|
||||
- `sp_assign_user_project`
|
||||
- `sp_remove_user_project`
|
||||
|
||||
Method / endpoint terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `save` | Insert user dashboard |
|
||||
| `reset_password` | Reset password user dashboard |
|
||||
| `assign_project` | Assign project MCU ke user dashboard |
|
||||
| `remove_project` | Lepas project dari user dashboard |
|
||||
| `remove_user` | Nonaktifkan user dashboard |
|
||||
| `search_project` | Cari project untuk kebutuhan dashboard user |
|
||||
| `search` | Cari/list user dashboard |
|
||||
|
||||
### 3. `cpone/SendEmailPreregister`
|
||||
|
||||
File: `application/controllers/cpone/SendEmailPreregister.php`
|
||||
|
||||
Keterangan:
|
||||
- Tidak membuka koneksi `cpone_dashboard` secara khusus, tetapi query langsung tabel `cpone_dashboard` dan memanggil stored procedure sync.
|
||||
- Dipakai untuk kebutuhan email notifikasi preregister berdasarkan schedule dashboard participant daily.
|
||||
|
||||
Method / endpoint terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `RegisterEmailNotif` | Refresh participant daily dashboard lalu ambil pasien dari tabel dashboard untuk queue email |
|
||||
| `RegisterEmailNotifManual` | Ambil pasien berdasarkan `mcu_id + date` atau `preregister_id`, termasuk mode ambil data dari tabel dashboard |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `CALL cpone.sp_refresh_mcu_participant_daily_by_mcu_date(?, ?)`
|
||||
- `cpone_dashboard.mcu_participant_daily`
|
||||
- `cpone_dashboard.mcu_participant_daily_details`
|
||||
- `cpone_dashboard.mcu_patient`
|
||||
|
||||
### 4. `mockup/mcuoffline/Preregisterappcponev8`
|
||||
|
||||
File: `application/controllers/mockup/mcuoffline/Preregisterappcponev8.php`
|
||||
|
||||
Keterangan:
|
||||
- Membuka koneksi `cpone_dashboard` di constructor.
|
||||
- Lebih banyak memakai stored procedure / query terarah untuk sync preregister ke dashboard.
|
||||
|
||||
Method / endpoint terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `syncSchedule` | Menjalankan sync participant daily berdasarkan preregister |
|
||||
| `doReCheckin` | Insert data check-in ke `cpone_dashboard.mcu_checkinout` |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `CALL cpone.sp_refresh_mcu_participant_daily_by_preregister(?)`
|
||||
- `cpone_dashboard.mcu_checkinout`
|
||||
|
||||
### 5. `mockup/mcuoffline/Preregisterappcponev3`
|
||||
|
||||
File: `application/controllers/mockup/mcuoffline/Preregisterappcponev3.php`
|
||||
|
||||
Keterangan:
|
||||
- Membuka koneksi `cpone_dashboard` di constructor.
|
||||
- Versi ini punya helper direct untuk sinkron patient dan participant schedule ke dashboard.
|
||||
|
||||
Helper penting:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `sync_schedule_and_daily` | Sinkron schedule pasien dan total participant harian |
|
||||
| `sync_patient_dashboard` | Upsert data patient ke tabel dashboard |
|
||||
|
||||
Endpoint yang memicu helper tersebut:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `savenewform` | Setelah simpan preregister baru, sync patient ke dashboard |
|
||||
| `savepreregisterpatient` | Setelah update/simpan patient preregister, sync patient ke dashboard |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `mcu_patient_schedule`
|
||||
- `mcu_participant_daily`
|
||||
- `mcu_patient`
|
||||
|
||||
### 6. `mockup/mcuoffline/Resumeindividucponev7`
|
||||
|
||||
File: `application/controllers/mockup/mcuoffline/Resumeindividucponev7.php`
|
||||
|
||||
Keterangan:
|
||||
- Menggunakan library `Mcudashboard`.
|
||||
- Relasi ke dashboard bersifat tidak langsung melalui:
|
||||
- publish status resume
|
||||
- generate file dashboard
|
||||
- sync mirror `published_mcu_dashboard`
|
||||
- update resume status ke dashboard
|
||||
|
||||
Method / endpoint terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `save` | Saat validasi/unvalidasi resume, update publish dashboard, generate file dashboard, sync mirror dashboard, dan update status resume dashboard |
|
||||
|
||||
Helper terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `sync_resume_status_dashboard` | Update status resume patient ke dashboard via library |
|
||||
| `upsert_published_dashboard_on_new_to_val` | Buat/update row publish dashboard |
|
||||
| `ensure_publish_dashboard_file` | Generate file dashboard dan sync mirror ke `cpone_dashboard` |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `Mcudashboard->generate_dashboard_files(...)`
|
||||
- `Mcudashboard->upsert_patient_resume_status(...)`
|
||||
- `CALL cpone.sp_sync_published_mcu_dashboard_by_orderheaderid(?)`
|
||||
|
||||
### 7. `mockup/sampling-lab-mobile-cpone-v14/Patient`
|
||||
|
||||
File: `application/controllers/mockup/sampling-lab-mobile-cpone-v14/Patient.php`
|
||||
|
||||
Keterangan:
|
||||
- Menggunakan library `Mcudashboard`.
|
||||
- Hubungan ke `cpone_dashboard` terjadi lewat update progress station/sample, bukan direct query tabel dashboard di controller ini.
|
||||
|
||||
Helper terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `sync_station_progress` | Memanggil `Mcudashboard->upsert_station_progress(...)` |
|
||||
|
||||
Endpoint / flow yang memicu helper:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `scanbarcode` | Dalam alur proses/done bisa memicu sync station progress |
|
||||
| `scanbarcode_nonlab` | Dalam alur nonlab bisa memicu sync station progress |
|
||||
| `scanbarcode_additional_fisik` | Dalam alur additional fisik bisa memicu sync station progress |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `Mcudashboard->upsert_station_progress(orderSampleID, samplingSoID)`
|
||||
|
||||
### 8. `v1/su/Test`
|
||||
|
||||
File: `application/controllers/v1/su/Test.php`
|
||||
|
||||
Keterangan:
|
||||
- Endpoint test/debug untuk generate dashboard file.
|
||||
- Menggunakan library `Mcudashboard`.
|
||||
|
||||
Method / endpoint terkait:
|
||||
|
||||
| Method | Keterangan |
|
||||
| --- | --- |
|
||||
| `test_generate_dashboard_file` | Menjalankan `generate_dashboard_files()` untuk testing |
|
||||
|
||||
Objek dashboard yang disentuh:
|
||||
- `Mcudashboard->generate_dashboard_files($mgmMcuID, $publishedID)`
|
||||
|
||||
## Klasifikasi Hubungan ke `cpone_dashboard`
|
||||
|
||||
### Direct database connection / direct query
|
||||
|
||||
- `summarydashboard/Generatedata`
|
||||
- `dashboard_mcu/User`
|
||||
- `mockup/mcuoffline/Preregisterappcponev8`
|
||||
- `mockup/mcuoffline/Preregisterappcponev3`
|
||||
- `cpone/SendEmailPreregister`
|
||||
|
||||
### Indirect via library `Mcudashboard`
|
||||
|
||||
- `mockup/mcuoffline/Resumeindividucponev7`
|
||||
- `mockup/sampling-lab-mobile-cpone-v14/Patient`
|
||||
- `v1/su/Test`
|
||||
|
||||
### Indirect via stored procedure `cpone.sp_*`
|
||||
|
||||
- `cpone/SendEmailPreregister`
|
||||
- `mockup/mcuoffline/Preregisterappcponev8`
|
||||
- `mockup/mcuoffline/Resumeindividucponev7`
|
||||
|
||||
## Kesimpulan
|
||||
|
||||
Kalau tujuan utamanya adalah audit endpoint yang benar-benar berhubungan dengan `cpone_dashboard`, fokus paling penting biasanya dimulai dari:
|
||||
|
||||
1. `summarydashboard/Generatedata`
|
||||
2. `dashboard_mcu/User`
|
||||
3. `cpone/SendEmailPreregister`
|
||||
4. `mockup/mcuoffline/Preregisterappcponev8`
|
||||
5. `mockup/mcuoffline/Preregisterappcponev3`
|
||||
6. `mockup/mcuoffline/Resumeindividucponev7`
|
||||
|
||||
Sedangkan `sampling-lab-mobile-cpone-v14/Patient` dan `v1/su/Test` lebih tepat dianggap sebagai pintu masuk tidak langsung melalui library `Mcudashboard`.
|
||||
Reference in New Issue
Block a user