96 lines
3.4 KiB
Markdown
96 lines
3.4 KiB
Markdown
# API Endpoints - DocLink Web
|
|
|
|
Source of truth for this document:
|
|
- Compiled Flutter web build in `main.dart.js`
|
|
- Sample test data in `assets/assets/fpp-example.json`
|
|
|
|
Important note:
|
|
- This repo snapshot looks like a **compiled web build**, not the original Dart source.
|
|
- Endpoint paths and request fields below are extracted from the compiled JavaScript bundle.
|
|
- Some request methods are inferred from the shared HTTP helper used by the app.
|
|
|
|
## Base URL
|
|
|
|
Most endpoints point to:
|
|
|
|
```text
|
|
https://devbandungraya.aplikasi.web.id/one-api-doctor/doctor_mitra
|
|
```
|
|
|
|
## HTTP pattern
|
|
|
|
The compiled app uses a shared JSON POST helper:
|
|
|
|
- `Content-Type: application/json`
|
|
- `Authorization: Bearer <token>` when token auth is available
|
|
- Many requests also include `token` in the JSON body
|
|
|
|
## Auth
|
|
|
|
| Endpoint | Method | Purpose | Request fields |
|
|
| --- | --- | --- | --- |
|
|
| `/auth/login` | POST | Login doctor user | `username`, `doctor_id`, `password` |
|
|
| `/auth/logout` | POST | Logout user | `M_UserID`, `M_UserUsername` |
|
|
| `/auth/change_password` | POST | Change password | `token`, `M_UserID`, `username`, `doctor_id`, `new_password`, `confirm_password` |
|
|
|
|
## Order / Result
|
|
|
|
| Endpoint | Method | Purpose | Request fields |
|
|
| --- | --- | --- | --- |
|
|
| `/order/home` | Referenced in app config | Home page / navigation target | Not visible as request body in the bundle snippet |
|
|
| `/order/order_list_search_for_result_v2` | Referenced in app config | Search/list result page | Not visible as request body in the bundle snippet |
|
|
| `/order/get_order_saran_by_order_patient_id` | POST | Fetch saran/recommendation by order patient ID | `token`, `order_patient_id` |
|
|
| `/order/hasil_belum_keluar_by_id` | POST | Fetch unfinished result by order ID | `token`, `order_id` |
|
|
| `/order/order_patient` | POST | Create/save order patient | `token`, `M_MouID`, `patient_name`, `patient_diagnosa`, `patient_address`, `patient_nik`, `patient_hp`, `patient_dob`, `patient_note`, `details` |
|
|
| `/order/search_order_pasien_by_doktorid` | POST | Search patient orders by doctor | `token`, `OrderPatientM_DoctorID`, `search` |
|
|
|
|
## FPP
|
|
|
|
| Endpoint | Method | Purpose | Request fields |
|
|
| --- | --- | --- | --- |
|
|
| `/Fpp/load/{c}/{b}` | POST | Load FPP data | Path params only in bundle snippet |
|
|
| `/Fpp/loadFPP/{a}/{b}` | POST | Load FPP detail/data | Path params only in bundle snippet |
|
|
|
|
## Pesan Khusus
|
|
|
|
| Endpoint | Method | Purpose | Request fields |
|
|
| --- | --- | --- | --- |
|
|
| `/Pesankhusus/add_pesan_khusus` | POST | Save special message | `token`, `order_id`, `pesan_khusus` |
|
|
|
|
## Other API base references
|
|
|
|
The bundle also references additional API bases for result/summary flows:
|
|
|
|
- `.../result/getResult`
|
|
- a base path used for summary and search flows
|
|
|
|
Those base URLs are not fully visible in the extracted snippet, so I did not guess them here.
|
|
|
|
## Sample data
|
|
|
|
`assets/assets/fpp-example.json` contains lab test group data, for example:
|
|
|
|
- `HEMATOLOGI`
|
|
- `KLINIK RUTIN`
|
|
|
|
This looks like static UI seed data, not an API endpoint.
|
|
|
|
## Rebuild notes for a new project
|
|
|
|
The current UI looks very mobile-first. For a new project, I would split it into:
|
|
|
|
1. Auth screens
|
|
2. Dashboard shell
|
|
3. Order flow
|
|
4. Result/search flow
|
|
5. FPP flow
|
|
6. Password change / profile actions
|
|
|
|
Responsive behavior should use:
|
|
|
|
- mobile: bottom navigation or drawer
|
|
- desktop: persistent sidebar + content pane
|
|
- forms: two-column layout on desktop, single column on mobile
|
|
- tables/lists: cards on mobile, table/grid on desktop
|
|
|