{"openapi":"3.0.0","info":{"version":"2","title":"Advomed API v2","description":"for backend contract only"},"paths":{"/api/product/vaccines":{"get":{"tags":["Master Vaccine"],"operationId":"getVaccineList","summary":"Get list master vaksin","description":"Mengambil daftar master vaksin.","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Nomor halaman.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Jumlah data per halaman.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"search","in":"query","required":false,"description":"Pencarian berdasarkan kode atau nama produk.","schema":{"type":"string","example":"BCG"}}],"responses":{"200":{"description":"Daftar master vaksin berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaccineListResponse"},"example":{"success":true,"message":"Daftar master vaksin berhasil diambil","data":[{"id":1,"instance_product_id":101,"product":{"code":"VAC-BCG","display_name":"Vaksin BCG"},"vaccine_age_giving":"0-1 bulan","vaccine_dose_count":1,"instance_id":3},{"id":2,"instance_product_id":102,"product":{"code":"VAC-HEPB","display_name":"Vaksin Hepatitis B"},"vaccine_age_giving":"Saat lahir","vaccine_dose_count":1,"instance_id":3}],"meta":{"current_page":1,"per_page":10,"total":2,"last_page":1}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/vaccine":{"get":{"tags":["Master Vaccine"],"operationId":"getVaccineDetail","summary":"Get detail master vaksin","description":"Mengambil detail master vaksin berdasarkan ID.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"description":"ID master vaksin.","schema":{"type":"integer","minimum":1},"example":1}],"responses":{"200":{"description":"Detail master vaksin berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaccineDetailResponse"},"example":{"success":true,"message":"Detail master vaksin berhasil diambil","data":{"id":1,"instance_product_id":101,"product":{"code":"VAC-BCG","display_name":"Vaksin BCG"},"vaccine_age_giving":"0-1 bulan","vaccine_dose_count":1,"vaccine_brands":[{"id":10,"instance_product_id":201,"product":{"code":"BRAND-BCG-01","display_name":"BCG Bio Farma"}},{"id":11,"instance_product_id":202,"product":{"code":"BRAND-BCG-02","display_name":"BCG Japan"}}],"instance_id":3}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/VaccineNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Master Vaccine"],"operationId":"createVaccine","summary":"Add new master vaksin","description":"Menambahkan master vaksin baru beserta daftar merek vaksin.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVaccineRequest"},"example":{"instance_product_id":101,"vaccine_dose_count":1,"vaccine_brands":[{"instance_product_id":201},{"instance_product_id":202}]}}}},"responses":{"201":{"description":"Master vaksin berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaccineDetailResponse"},"example":{"success":true,"message":"Master vaksin berhasil ditambahkan","data":{"id":1,"instance_product_id":101,"product":{"code":"VAC-BCG","display_name":"Vaksin BCG"},"vaccine_age_giving":"0-1 bulan","vaccine_dose_count":1,"vaccine_brands":[{"id":10,"instance_product_id":201,"product":{"code":"BRAND-BCG-01","display_name":"BCG Bio Farma"}},{"id":11,"instance_product_id":202,"product":{"code":"BRAND-BCG-02","display_name":"BCG Japan"}}],"instance_id":3}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Master vaksin sudah terdaftar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Produk vaksin sudah terdaftar sebagai master vaksin","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Master Vaccine"],"operationId":"updateVaccine","summary":"Update master vaksin","description":"Memperbarui master vaksin dan daftar merek vaksin.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVaccineRequest"},"example":{"id":1,"instance_product_id":101,"vaccine_dose_count":2,"vaccine_brands":[{"id":10,"instance_product_id":201},{"id":11,"instance_product_id":203}]}}}},"responses":{"200":{"description":"Master vaksin berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaccineDetailResponse"},"example":{"success":true,"message":"Master vaksin berhasil diperbarui","data":{"id":1,"instance_product_id":101,"product":{"code":"VAC-BCG","display_name":"Vaksin BCG"},"vaccine_age_giving":"0-1 bulan","vaccine_dose_count":2,"vaccine_brands":[{"id":10,"instance_product_id":201,"product":{"code":"BRAND-BCG-01","display_name":"BCG Bio Farma"}},{"id":11,"instance_product_id":203,"product":{"code":"BRAND-BCG-03","display_name":"BCG Vaccine Baru"}}],"instance_id":3}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/VaccineNotFoundResponse"},"409":{"description":"Data master vaksin mengalami konflik.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Produk vaksin sudah digunakan oleh master vaksin lain","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Master Vaccine"],"operationId":"deleteVaccine","summary":"Delete master vaksin","description":"Menghapus master vaksin berdasarkan ID.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"description":"ID master vaksin yang akan dihapus.","schema":{"type":"integer","minimum":1},"example":1}],"responses":{"200":{"description":"Master vaksin berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"example":{"success":true,"message":"Master vaksin berhasil dihapus","data":null}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/VaccineNotFoundResponse"},"409":{"description":"Master vaksin tidak dapat dihapus karena sudah digunakan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Master vaksin tidak dapat dihapus karena sudah digunakan","data":null}}}},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/instance_products":{"get":{"tags":["Product"],"summary":"Mendapatkan daftar instance product","description":"Mengambil daftar produk milik instance pengguna.\n\nDigunakan pada Master Vaksin untuk:\n1. Memilih layanan/tindakan vaksin.\n2. Memilih produk inventory atau merek vaksin.\n","operationId":"getInstanceProducts","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Halaman pagination.","schema":{"type":"integer","minimum":1,"default":1},"example":1},{"name":"limit","in":"query","required":false,"description":"Jumlah data per halaman.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"example":100},{"name":"service_type","in":"query","required":false,"description":"Tipe layanan produk.\n\nNilai yang digunakan pada Master Vaksin:\n- `general`: layanan/tindakan umum.\n- `inventory`: produk yang memiliki inventory.\n","schema":{"type":"string","enum":["general","inventory"]},"examples":{"vaccineService":{"summary":"Layanan vaksin","value":"general"},"vaccineInventory":{"summary":"Produk inventory vaksin","value":"inventory"}}},{"name":"product_type","in":"query","required":false,"description":"Filter berdasarkan tipe produk.\n\nUntuk mengambil produk inventory vaksin gunakan\n`product_type_vaccine`.\n","schema":{"type":"string"},"example":"product_type_vaccine"},{"name":"filter[service_action_type]","in":"query","required":false,"description":"Filter berdasarkan tipe tindakan layanan.\n\nUntuk mengambil layanan vaksin gunakan\n`product_type_general_service_vaccine`.\n","schema":{"type":"string"},"example":"product_type_general_service_vaccine"}],"responses":{"200":{"description":"Daftar instance product berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceProductListResponse"},"examples":{"vaccineService":{"summary":"Daftar layanan/tindakan vaksin","value":{"data":[{"instance_product_id":100,"product":{"id":825,"code":"dummy-plus-pemeriksaan-dokter-umum-1-1","name":"Pemeriksaan Dokter Umum 1","uoms":[],"product_ingredient":[],"dosage_form":null},"price":{"id":168,"base_price":100000,"applied_price":100000},"min_price":{"id":64,"base_price":50000,"applied_price":50000},"prices":[{"id":64,"patient_category":null,"selling_price":"50000.00","markup":50000,"uom":null}],"inv_stock":null}],"links":{"first":"{base_url}/api/product/instance_products?page=1","last":"{base_url}/api/product/instance_products?page=14","prev":null,"next":"{base_url}/api/product/instance_products?page=2"},"meta":{"current_page":1,"per_page":1,"total":14},"success":true,"message":"OK"}},"vaccineInventory":{"summary":"Daftar produk inventory vaksin","value":{"data":[{"instance_product_id":105,"product":{"id":834,"code":"BDX-001","name":"Bodrex","uoms":[{"id":117,"name":"Kapsul","uom_id":1,"is_base_unit":true,"conversion_value":1}],"product_ingredient":{"name":null,"strength_value":1,"strength_uom":{"uom_id":111,"uom_name":"Puyer"}},"dosage_form":{"id":2,"name":"Kapsul"}},"price":{"id":174,"base_price":32000,"applied_price":33000},"min_price":{"id":90,"base_price":4000,"applied_price":5000},"prices":[{"id":90,"patient_category":"Regular","selling_price":5000,"markup":5000,"uom":"Kapsul"}],"inv_stock":{"id":62,"base_qty_system":510560,"base_qty_reserved":0,"base_qty_available":510560,"base_min_qty_threshold":100,"base_last_cost":33000,"base_unit_id":1,"base_unit":{"id":1,"name":"Kapsul"}}}],"links":{"first":"{base_url}/api/product/instance_products?page=1","last":"{base_url}/api/product/instance_products?page=62","prev":null,"next":"{base_url}/api/product/instance_products?page=2"},"meta":{"current_page":1,"per_page":1,"total":62},"success":true,"message":"OK"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/polyclinics":{"get":{"tags":["Master Poliklinik"],"operationId":"getPolyclinicList","summary":"Get list master poliklinik","description":"Mengambil daftar master poliklinik.","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Nomor halaman.","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Jumlah data per halaman.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"search","in":"query","required":false,"description":"Pencarian berdasarkan nama poliklinik (case insensitive).","schema":{"type":"string","example":"umum"}},{"name":"orders[]","in":"query","required":false,"description":"Pengurutan data. Format `<field>:<asc|desc>`. Field yang didukung: name, slug, prefix_queue, polyclinic_charge, admin_charge, status.","schema":{"type":"array","items":{"type":"string"}},"example":["name:asc"]},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[slug]","in":"query","required":false,"schema":{"type":"string"},"example":"poli_umum"},{"name":"filter[prefix_queue]","in":"query","required":false,"schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar master poliklinik berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicListResponse"},"example":{"success":true,"message":"Daftar master poliklinik berhasil diambil","data":[{"id":1,"name":"Poli Umum","slug":"poli_umum","prefix_queue":"PU","polyclinic_type":{"id":1,"slug":"kedokteran_umum","name":"Kedokteran Umum"},"onsite_polyclinic_charge":20000,"onsite_admin_charge":20000,"status":{"id":1,"slug":"active","label":"Aktif"},"seq":1,"depth":0,"parent_id":null,"module_id":1}],"meta":{"current_page":1,"per_page":10,"total":1,"last_page":1}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/polyclinic":{"get":{"tags":["Master Poliklinik"],"operationId":"getPolyclinicDetail","summary":"Get detail master poliklinik","description":"Mengambil detail master poliklinik berdasarkan ID.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","minimum":1},"example":1}],"responses":{"200":{"description":"Detail master poliklinik berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Master Poliklinik"],"operationId":"createPolyclinic","summary":"Add new master poliklinik","description":"Menambahkan master poliklinik baru beserta tarif konsultasi dan integrasi Pcare BPJS (opsional). Lihat rules.md #4.2.3 untuk detail proses pembentukan product/instance_product/ip_price_service/ip_price per tarif.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolyclinicRequest"},"example":{"name":"Poli Umum","polyclinic_type_id":1,"pcare_polyclinic_code":null,"pcare_polyclinic_name":null,"prefix_queue":"PU","medical_imaging_id":null,"nursery_assesment_form_type_id":1,"onsite_polyclinic_charge":50000,"onsite_admin_charge":10000,"onsite_fee_nakes":null,"teleconsultation_polyclinic_charge":null,"teleconsultation_admin_charge":null,"teleconsultation_fee_nakes":null}}}},"responses":{"201":{"description":"Master poliklinik berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"},"example":{"success":true,"message":"Data Poli Klinik Berhasil disimpan !"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Nama poliklinik atau kode antrean sudah digunakan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Nama poliklinik sudah digunakan","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Master Poliklinik"],"operationId":"updatePolyclinic","summary":"Update master poliklinik","description":"Memperbarui master poliklinik beserta tarif konsultasi.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePolyclinicRequest"}}}},"responses":{"200":{"description":"Master poliklinik berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"409":{"description":"Nama poliklinik atau kode antrean sudah digunakan poliklinik lain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Nama poliklinik sudah digunakan poliklinik lain","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Master Poliklinik"],"operationId":"deletePolyclinic","summary":"Delete master poliklinik","description":"Menghapus (soft delete) master poliklinik berdasarkan ID.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","minimum":1},"example":1}],"responses":{"200":{"description":"Master poliklinik berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"409":{"description":"Poliklinik tidak dapat dihapus karena masih memiliki jadwal, dokter, atau transaksi aktif.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Poliklinik tidak dapat dihapus karena masih digunakan","data":null}}}},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/polyclinic/activate":{"patch":{"tags":["Master Poliklinik"],"operationId":"activatePolyclinic","summary":"Aktifkan poliklinik","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","example":2}}}}}},"responses":{"200":{"description":"Poliklinik berhasil diaktifkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/polyclinic/deactivate":{"patch":{"tags":["Master Poliklinik"],"operationId":"deactivatePolyclinic","summary":"Non-aktifkan poliklinik","description":"Poliklinik nonaktif tidak muncul pada transaksi.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","example":2}}}}}},"responses":{"200":{"description":"Poliklinik berhasil dinonaktifkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/staff_schedule_summaries":{"get":{"tags":["Doctor Schedule"],"operationId":"getStaffScheduleSummaryList","summary":"Get ringkasan dokter per poliklinik","description":"Daftar dokter yang memiliki jadwal praktek pada suatu poliklinik & jenis konsultasi.","security":[{"bearerAuth":[]}],"parameters":[{"name":"filter[polyclinic_id]","in":"query","required":true,"schema":{"type":"integer"},"example":1},{"name":"filter[consultation_type]","in":"query","required":false,"description":"consultation_type_onsite | consultation_type_teleconsultation","schema":{"type":"string","example":"consultation_type_onsite"}}],"responses":{"200":{"description":"Daftar ringkasan jadwal dokter berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffScheduleSummaryListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/staff_schedules":{"get":{"tags":["Doctor Schedule"],"operationId":"getStaffScheduleList","summary":"Get list jadwal praktek dokter","security":[{"bearerAuth":[]}],"parameters":[{"name":"filter[staff_id]","in":"query","required":false,"schema":{"type":"integer"}},{"name":"filter[polyclinic_id]","in":"query","required":true,"schema":{"type":"integer"}},{"name":"filter[consultation_type]","in":"query","required":false,"schema":{"type":"string","example":"consultation_type_onsite"}}],"responses":{"200":{"description":"Daftar jadwal praktek dokter berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffScheduleListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/staff_schedule":{"get":{"tags":["Doctor Schedule"],"operationId":"getStaffScheduleDetail","summary":"Get detail jadwal praktek dokter","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"Detail jadwal praktek dokter berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffScheduleDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/StaffScheduleNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Schedule"],"operationId":"createStaffSchedule","summary":"Tambah jadwal praktek dokter","description":"staff_id[] dan day_of_week_id[] mendukung multi pilihan — sistem membuat satu baris staff_schedule per kombinasi dokter x hari.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStaffScheduleRequest"},"example":{"staff_id":[1],"consultation_type_id":1,"day_of_week_id":[1],"start_time":"09:00","end_time":"19:00","duration_minutes":30,"slot_total":20,"staff_schedule_breaks":[]}}}},"responses":{"201":{"description":"Jadwal Praktek Dokter Berhasil ditambahkan !","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffScheduleDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Dokter memiliki jadwal bentrok pada hari dan jam yang sama.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Dokter sudah memiliki jadwal praktek yang bentrok pada hari dan jam tersebut","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Schedule"],"operationId":"updateStaffSchedule","summary":"Update jadwal praktek dokter","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStaffScheduleRequest"}}}},"responses":{"200":{"description":"Jadwal praktek dokter berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffScheduleDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/StaffScheduleNotFoundResponse"},"409":{"description":"Dokter memiliki jadwal bentrok pada hari dan jam yang sama.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Dokter sudah memiliki jadwal praktek yang bentrok pada hari dan jam tersebut","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Schedule"],"operationId":"deleteStaffSchedule","summary":"Hapus jadwal praktek dokter","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"Jadwal praktek dokter berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/StaffScheduleNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/bridging/bpjs/pcare/polis":{"get":{"tags":["Polyclinic Reference"],"operationId":"getPcarePolyclinicReferenceList","summary":"Get referensi poliklinik Pcare BPJS","description":"Endpoint bridging eksternal (BPJS Pcare) — bukan tabel lokal.","security":[{"bearerAuth":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100}}],"responses":{"200":{"description":"Daftar referensi poliklinik Pcare berhasil diambil.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Data berhasil diambil"},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"poli_umum"},"name":{"type":"string","example":"Poli Umum"}}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/medical_imagings":{"get":{"tags":["Polyclinic Reference"],"operationId":"getMedicalImagingList","summary":"Get referensi master gambar medis","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Daftar referensi gambar medis berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalImagingListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/general/types":{"get":{"tags":["Polyclinic Reference","Doctor Finish Reference"],"operationId":"getGeneralTypeList","summary":"Get referensi umum berdasarkan group_slug (shared endpoint, extended by multiple modules)","description":"Endpoint referensi generik pada tabel `types`, dibedakan per kelompok data lewat `group_slug`. Dipakai untuk formulir assesmen perawat (`nursery_assessment_form`) dan jenis poliklinik (`polyclinic_types`) dari modul Master Poliklinik, serta sub-fitur Pulang (`discharge_status_types`, `discharge_condition_types`, `follow_up_plan_status_types`, `follow_up_plan_referral_types`, `follow_up_plan_referral_action_types`, `follow_up_plan_intent_types`, `service_prognosis_types`, `follow_up_further_examination`, `follow_up_transportation_facility_types`, `follow_up_referral_external_types`) dari modul Doctor Finish. 3 group_slug terakhir BARU dan BELUM diseed (REVISI v1.3.0) — value pada examples-nya ilustratif, perlu konfirmasi Product/BE.","security":[{"bearerAuth":[]}],"parameters":[{"name":"group_slug","in":"query","required":true,"schema":{"type":"string","enum":["nursery_assessment_form","polyclinic_types","discharge_status_types","discharge_condition_types","follow_up_plan_status_types","follow_up_plan_referral_types","follow_up_plan_referral_action_types","follow_up_plan_intent_types","service_prognosis_types","follow_up_further_examination","follow_up_transportation_facility_types","follow_up_referral_external_types"],"default":"nursery_assessment_form"}}],"responses":{"200":{"description":"Daftar referensi berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralTypeListResponse"},"examples":{"nursery_assessment_form":{"summary":"group_slug=nursery_assessment_form","value":{"success":true,"message":"OK","data":[{"id":1,"slug":"initial_assessment","name_id":"Assesment awal","name_en":"Initial Assessment"}]}},"polyclinic_types":{"summary":"group_slug=polyclinic_types","value":{"success":true,"message":"OK","data":[{"id":1,"slug":"general_medicine","name_id":"Kedokteran Umum","name_en":"General Medicine"},{"id":2,"slug":"obstetrics","name_id":"Kebidanan","name_en":"Obstetrics"}]}},"discharge_status_types":{"summary":"group_slug=discharge_status_types — menentukan section kondisional yang tampil (Rujuk Internal/Eksternal -> Rencana Tindak Lanjut, Meninggal -> Section Kematian)","value":{"success":true,"message":"OK","data":[{"id":1,"slug":"discharge_status_type_outpatient_treatment","name_id":"Berobat Jalan","name_en":"Outpatient Treatment"},{"id":2,"slug":"discharge_status_type_external_referral","name_id":"Rujuk Eksternal","name_en":"External Referral"},{"id":3,"slug":"discharge_status_type_internal_referral","name_id":"Rujuk Internal","name_en":"Internal Referral"},{"id":4,"slug":"discharge_status_type_aps_referral","name_id":"Rujuk Atas Permintaan Sendiri (APS)","name_en":"Discharge Against Medical Advice (AMA)"},{"id":5,"slug":"discharge_status_type_deceased","name_id":"Meninggal","name_en":"Deceased"}]}},"discharge_condition_types":{"summary":"group_slug=discharge_condition_types","value":{"success":true,"message":"OK","data":[{"id":8,"slug":"discharge_condition_type_stable","name_id":"Stabil","name_en":"Stable"},{"id":9,"slug":"discharge_condition_type_unstable","name_id":"Tidak Stabil","name_en":"Unstable"},{"id":10,"slug":"discharge_condition_type_improved","name_id":"Membaik","name_en":"Improved"}]}},"follow_up_plan_status_types":{"summary":"group_slug=follow_up_plan_status_types","value":{"success":true,"message":"OK","data":[{"id":59,"slug":"follow_up_plan_status_type_draft","name_id":"Draft","name_en":"Draft"},{"id":60,"slug":"follow_up_plan_status_type_active","name_id":"Aktif","name_en":"Active"},{"id":61,"slug":"follow_up_plan_status_type_completed","name_id":"Selesai","name_en":"Completed"}]}},"follow_up_plan_referral_types":{"summary":"group_slug=follow_up_plan_referral_types — auto-terpilih FE sesuai discharge_status_type (Rujuk Internal/Eksternal)","value":{"success":true,"message":"OK","data":[{"id":62,"slug":"follow_up_plan_referral_type_internal","name_id":"Internal","name_en":"Internal"},{"id":63,"slug":"follow_up_plan_referral_type_external","name_id":"Eksternal","name_en":"External"}]}},"follow_up_plan_referral_action_types":{"summary":"group_slug=follow_up_plan_referral_action_types — hanya tampil jika Rujuk Internal","value":{"success":true,"message":"OK","data":[{"id":64,"slug":"follow_up_plan_referral_action_rawat_inap","name_id":"Rawat Inap","name_en":"Inpatient Care"},{"id":65,"slug":"follow_up_plan_referral_action_kontrol_ulang","name_id":"Kontrol Ulang","name_en":"Follow-up Visit"},{"id":66,"slug":"follow_up_plan_referral_action_konsultasi","name_id":"Konsultasi","name_en":"Consultation"}]}},"follow_up_plan_intent_types":{"summary":"group_slug=follow_up_plan_intent_types","value":{"success":true,"message":"OK","data":[{"id":67,"slug":"follow_up_plan_intent_proposal","name_id":"Proposal","name_en":"Proposal"},{"id":68,"slug":"follow_up_plan_intent_plan","name_id":"Plan","name_en":"Plan"},{"id":69,"slug":"follow_up_plan_intent_directive","name_id":"Directive","name_en":"Directive"}]}},"service_prognosis_types":{"summary":"group_slug=service_prognosis_types — dipakai section Prognosis (order_service_statuses, kontrak existing)","value":{"success":true,"message":"OK","data":[{"id":40,"slug":"service_prognosis_type_good","name_id":"Prognosis Good/Baik","name_en":"Good Prognosis"},{"id":41,"slug":"service_prognosis_type_fair","name_id":"Fair Prognosis/Cenderung Baik","name_en":"Fair Prognosis"},{"id":42,"slug":"service_prognosis_type_guarded","name_id":"Guarded Prognosis/Cenderung Tidak Baik","name_en":"Guarded Prognosis"}]}},"follow_up_further_examination":{"summary":"group_slug=follow_up_further_examination — REVISI v1.3.0 BARU, BELUM diseed. Value ilustratif mengikuti job.md & sequence 1-3, perlu konfirmasi Product/BE sebelum di-seed.","value":{"success":true,"message":"OK","data":[{"id":70,"slug":"follow_up_further_examination_re_control","name_id":"Kontrol Ulang","name_en":"Re-control"},{"id":71,"slug":"follow_up_further_examination_further_lab","name_id":"Lab Lanjutan","name_en":"Further Laboratory"},{"id":72,"slug":"follow_up_further_examination_referral","name_id":"Rujukan","name_en":"Referral"},{"id":73,"slug":"follow_up_further_examination_further_action","name_id":"Tindakan Lanjutan","name_en":"Further Action"}]}},"follow_up_transportation_facility_types":{"summary":"group_slug=follow_up_transportation_facility_types — REVISI v1.3.0 BARU, BELUM diseed. Value ilustratif, perlu konfirmasi Product/BE sebelum di-seed.","value":{"success":true,"message":"OK","data":[{"id":80,"slug":"follow_up_transportation_facility_type_ambulance","name_id":"Ambulance","name_en":"Ambulance"},{"id":81,"slug":"follow_up_transportation_facility_type_private_vehicle","name_id":"Kendaraan Pribadi","name_en":"Private Vehicle"},{"id":82,"slug":"follow_up_transportation_facility_type_public_transportation","name_id":"Transportasi Umum","name_en":"Public Transportation"},{"id":83,"slug":"follow_up_transportation_facility_type_other","name_id":"Lainnya","name_en":"Other"}]}},"follow_up_referral_external_types":{"summary":"group_slug=follow_up_referral_external_types — REVISI v1.3.0 BARU, BELUM diseed, hanya dipakai jika Rujuk Eksternal. Value ilustratif, perlu konfirmasi Product/BE sebelum di-seed.","value":{"success":true,"message":"OK","data":[{"id":90,"slug":"follow_up_referral_external_type_outpatient_facility","name_id":"Outpatient Facility","name_en":"Outpatient Facility"},{"id":91,"slug":"follow_up_referral_external_type_hospital","name_id":"Hospital","name_en":"Hospital"},{"id":92,"slug":"follow_up_referral_external_type_primary_care_clinic","name_id":"Primary Care Clinic","name_en":"Primary Care Clinic"}]}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/product/satusehat/register_polyclinic":{"post":{"tags":["Polyclinic Reference"],"operationId":"registerPolyclinicSatuSehat","summary":"Daftarkan poliklinik ke Satu Sehat","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["polyclinic_id"],"properties":{"polyclinic_id":{"type":"integer","example":1}}}}}},"responses":{"200":{"description":"Poliklinik berhasil didaftarkan ke Satu Sehat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolyclinicDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/PolyclinicNotFoundResponse"},"409":{"description":"Poliklinik sudah terdaftar di Satu Sehat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Poliklinik sudah terdaftar di Satu Sehat","data":null}}}},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/orders/{order_id}/emr":{"put":{"tags":["EMR Assessment Section","EMR Doctor Finish Section"],"operationId":"saveEmr","summary":"Simpan EMR (shared endpoint, extended by multiple modules)","description":"Endpoint EMR `saveEmr` sudah ada di advomed-api (`EmrController::saveEmr`, section-based) dan didokumentasikan bertahap per modul SA seiring section yang disentuh bertambah. Sejauh ini mencakup key request/ response BARU dari modul Assessment (section `nurse_anamnesis`, `doctor_assessment` — lihat `AssessmentEmrSaveRequest`) dan modul Doctor Finish (section `doctor_finish` — lihat `DoctorFinishEmrSaveRequest`). BUKAN kontrak lengkap endpoint (section lain seperti `nurse_clinical`, `doctor_diagnosis` di luar scope kedua modul ini). `order_id` pada path merujuk `orders.id`. Body gabungan (`allOf`) bersifat aditif — kirim hanya key yang relevan dengan `section` yang dipilih.","security":[{"bearerAuth":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer"},"example":1001},{"name":"section","in":"query","required":true,"schema":{"type":"string","enum":["nurse_anamnesis","doctor_assessment","doctor_finish"]},"description":"nurse_anamnesis untuk riwayat penyakit menular; doctor_assessment untuk riwayat perjalanan penyakit, tujuan perawatan, rencana rawat, instruksi medik & keperawatan, dan penilaian risiko (modul Assessment); doctor_finish untuk rekomendasi diet, diet plan, dan edukasi (modul Doctor Finish), selain include lama section ini."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AssessmentEmrSaveRequest"},{"$ref":"#/components/schemas/DoctorFinishEmrSaveRequest"}]},"examples":{"doctorFinishPulang":{"summary":"section=doctor_finish — Pulang (Rujuk Internal) + Prognosis + Rencana Kontrol","description":"Contoh body untuk section=doctor_finish, sub-fitur Pulang (REVISI v1.3.0/v1.3.1). order_discharges/order_controll_plans/ order_follow_up_plans di sini HANYA menunjukkan field BARU (is_register_next_consultation, control_plan_time, follow_up_further_examination_id, dst.) — field existing lain (discharge_status_type_id, dsb.) TETAP wajib dikirim sesuai kontrak lama, tidak semuanya dicontohkan di sini agar fokus pada delta v1.3.0/v1.3.1.","value":{"order_discharges":[{"id":55,"discharge_status_type_id":3,"discharge_condition_type_id":8,"discharge_planning":"Kondisi stabil, dirujuk untuk konsultasi lanjutan.","is_register_next_consultation":true}],"order_service_statuses":[{"id":77,"service_prognosis_type_id":40,"service_prognosis_concept":"good","service_prognosis_notes":"Prognosis baik, respon terapi optimal."}],"order_controll_plans":[{"control_plan_date":"2026-08-21","control_plan_time":"10:30","control_polyclinic_id":2,"control_doctor_id":15}],"order_follow_up_plans":[{"follow_up_plan_status_type_id":60,"follow_up_plan_intent_type_id":61,"follow_up_plan_referral_type_id":62,"follow_up_further_examination_id":70,"follow_up_plan_polyclinic_id":2,"follow_up_plan_referral_action_type_id":63,"follow_up_transportation_facility_type_id":80,"follow_up_plan_date":"2026-08-21","follow_up_plan_notes":"Rujuk ke poli spesialis untuk evaluasi lanjutan."}],"patient_death":null}},"doctorFinishMeninggal":{"summary":"section=doctor_finish — Pulang (Meninggal)","description":"patient_death (REVISI v1.3.1) dikirim hanya saat discharge_status_type = Meninggal, disimpan pada transaksi PUT yang sama — bukan endpoint terpisah. patient_id TIDAK dikirim (di-resolve server-side dari order_id).","value":{"order_discharges":[{"id":56,"discharge_status_type_id":5,"discharge_planning":"Pasien meninggal dunia di ruang rawat inap.","is_register_next_consultation":false}],"patient_death":{"death_cause":"Gagal jantung akut","death_place":"Ruang ICU","death_datetime":"2026-08-14T22:15:00Z","doctor_id":15}}}}}}},"responses":{"200":{"description":"EMR berhasil disimpan.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AssessmentEmrSaveResponse"},{"$ref":"#/components/schemas/DoctorFinishEmrSaveResponse"}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNotFoundResponse"},"409":{"description":"Referensi SNOMED/types/satuan tidak valid atau tidak sesuai kategori.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Referensi jenis penyakit menular tidak ditemukan","data":null}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"get":{"tags":["EMR Assessment Section","EMR Doctor Finish Section"],"operationId":"viewEmr","summary":"Lihat EMR (shared endpoint, extended by multiple modules)","description":"Sama seperti `PUT`, endpoint `GET` ini sudah ada (`EmrController::viewEmr`) — dokumen ini mencakup key response BARU dari modul Assessment (`nurse_anamnesis`/`doctor_assessment`) dan modul Doctor Finish (`doctor_finish`).","security":[{"bearerAuth":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer"},"example":1001},{"name":"section","in":"query","required":true,"schema":{"type":"string","enum":["nurse_anamnesis","doctor_assessment","doctor_finish"]}}],"responses":{"200":{"description":"Data EMR berhasil diambil.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AssessmentEmrViewResponse"},{"$ref":"#/components/schemas/DoctorFinishEmrViewResponse"}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_infectious_illness_histories":{"get":{"tags":["Nurse Assessment - Riwayat Penyakit Menular"],"operationId":"getOrderInfectiousIllnessHistoryList","summary":"Get list riwayat penyakit menular","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"},"example":1001}],"responses":{"200":{"description":"Daftar riwayat penyakit menular berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistoryListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_infectious_illness_history":{"get":{"tags":["Nurse Assessment - Riwayat Penyakit Menular"],"operationId":"getOrderInfectiousIllnessHistoryDetail","summary":"Get detail riwayat penyakit menular","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail riwayat penyakit menular berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistoryDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderInfectiousIllnessHistoryNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Nurse Assessment - Riwayat Penyakit Menular"],"operationId":"createOrderInfectiousIllnessHistory","summary":"Tambah riwayat penyakit menular (CRUD murni)","description":"Selain lewat `PUT .../emr?section=nurse_anamnesis`, riwayat penyakit menular juga bisa dikelola langsung lewat CRUD murni ini (job.md §1.a.vi). `*_patient_id`/`*_patient_name` pada response di-resolve otomatis dari `order_id -> orders.orderable`, bukan bagian request.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderInfectiousIllnessHistoryRequest"}}}},"responses":{"201":{"description":"Riwayat penyakit menular berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistoryDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Order tidak ditemukan pada instance ini atau referensi SNOMED/types tidak valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Nurse Assessment - Riwayat Penyakit Menular"],"operationId":"updateOrderInfectiousIllnessHistory","summary":"Ubah riwayat penyakit menular","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderInfectiousIllnessHistoryRequest"}}}},"responses":{"200":{"description":"Riwayat penyakit menular berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistoryDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderInfectiousIllnessHistoryNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Nurse Assessment - Riwayat Penyakit Menular"],"operationId":"deleteOrderInfectiousIllnessHistory","summary":"Hapus riwayat penyakit menular","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Riwayat penyakit menular berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderInfectiousIllnessHistoryNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/snomed_infectious_illness_histories":{"get":{"tags":["Assessment Reference"],"operationId":"getSnomedInfectiousIllnessHistoryList","summary":"Get referensi SNOMED jenis penyakit menular","description":"Read only, list only — mengikuti konvensi endpoint SNOMED lain di repo.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Pencarian berdasarkan code/display."}],"responses":{"200":{"description":"Daftar referensi SNOMED jenis penyakit menular berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_natural_history_of_diseases":{"get":{"tags":["Doctor Assessment - Riwayat Perjalanan Penyakit"],"operationId":"getOrderNaturalHistoryOfDiseaseList","summary":"Get list riwayat perjalanan penyakit","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Daftar riwayat perjalanan penyakit berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDiseaseListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_natural_history_of_disease":{"get":{"tags":["Doctor Assessment - Riwayat Perjalanan Penyakit"],"operationId":"getOrderNaturalHistoryOfDiseaseDetail","summary":"Get detail riwayat perjalanan penyakit","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail riwayat perjalanan penyakit berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDiseaseDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNaturalHistoryOfDiseaseNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Assessment - Riwayat Perjalanan Penyakit"],"operationId":"createOrderNaturalHistoryOfDisease","summary":"Tambah riwayat perjalanan penyakit (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderNaturalHistoryOfDiseaseRequest"}}}},"responses":{"201":{"description":"Riwayat perjalanan penyakit berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDiseaseDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Assessment - Riwayat Perjalanan Penyakit"],"operationId":"updateOrderNaturalHistoryOfDisease","summary":"Ubah riwayat perjalanan penyakit","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderNaturalHistoryOfDiseaseRequest"}}}},"responses":{"200":{"description":"Riwayat perjalanan penyakit berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDiseaseDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNaturalHistoryOfDiseaseNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Assessment - Riwayat Perjalanan Penyakit"],"operationId":"deleteOrderNaturalHistoryOfDisease","summary":"Hapus riwayat perjalanan penyakit","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Riwayat perjalanan penyakit berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNaturalHistoryOfDiseaseNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_goals":{"get":{"tags":["Doctor Assessment - Tujuan Perawatan"],"operationId":"getOrderGoalList","summary":"Get list tujuan perawatan","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Daftar tujuan perawatan berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderGoalListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_goal":{"get":{"tags":["Doctor Assessment - Tujuan Perawatan"],"operationId":"getOrderGoalDetail","summary":"Get detail tujuan perawatan","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail tujuan perawatan berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderGoalDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderGoalNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Assessment - Tujuan Perawatan"],"operationId":"createOrderGoal","summary":"Tambah tujuan perawatan (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderGoalRequest"}}}},"responses":{"201":{"description":"Tujuan perawatan berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderGoalDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Referensi status/status pencapaian tidak sesuai kategori.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Assessment - Tujuan Perawatan"],"operationId":"updateOrderGoal","summary":"Ubah tujuan perawatan","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderGoalRequest"}}}},"responses":{"200":{"description":"Tujuan perawatan berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderGoalDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderGoalNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Assessment - Tujuan Perawatan"],"operationId":"deleteOrderGoal","summary":"Hapus tujuan perawatan","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Tujuan perawatan berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderGoalNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_care_plans":{"get":{"tags":["Doctor Assessment - Rencana Rawat & Instruksi Medik"],"operationId":"getOrderCarePlanList","summary":"Get list rencana rawat / instruksi medik & keperawatan","description":"Satu tabel dipakai untuk dua fitur job.md (\"Rencana Rawat\" & \"Instruksi Medik dan Keperawatan Pasien\"), dibedakan lewat `filter[care_plan_type_id]` atau `filter[care_plan_type_slug]`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}},{"name":"filter[care_plan_type_slug]","in":"query","required":false,"schema":{"type":"string","enum":["care_plan_type_care_plan","care_plan_type_medical_instruction"]}}],"responses":{"200":{"description":"Daftar rencana rawat / instruksi medik berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCarePlanListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_care_plan":{"get":{"tags":["Doctor Assessment - Rencana Rawat & Instruksi Medik"],"operationId":"getOrderCarePlanDetail","summary":"Get detail rencana rawat / instruksi medik","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail rencana rawat / instruksi medik berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCarePlanDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderCarePlanNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Assessment - Rencana Rawat & Instruksi Medik"],"operationId":"createOrderCarePlan","summary":"Tambah rencana rawat / instruksi medik (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderCarePlanRequest"}}}},"responses":{"201":{"description":"Rencana rawat / instruksi medik berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCarePlanDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"care_plan_type_id yang dikirim bukan bagian group `care_plan_types`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Assessment - Rencana Rawat & Instruksi Medik"],"operationId":"updateOrderCarePlan","summary":"Ubah rencana rawat / instruksi medik","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderCarePlanRequest"}}}},"responses":{"200":{"description":"Rencana rawat / instruksi medik berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCarePlanDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderCarePlanNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Assessment - Rencana Rawat & Instruksi Medik"],"operationId":"deleteOrderCarePlan","summary":"Hapus rencana rawat / instruksi medik","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rencana rawat / instruksi medik berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderCarePlanNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_risk_assessments":{"get":{"tags":["Doctor Assessment - Penilaian Risiko"],"operationId":"getOrderRiskAssessmentList","summary":"Get list penilaian risiko","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Daftar penilaian risiko berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRiskAssessmentListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_risk_assessment":{"get":{"tags":["Doctor Assessment - Penilaian Risiko"],"operationId":"getOrderRiskAssessmentDetail","summary":"Get detail penilaian risiko (termasuk daftar prediksi)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail penilaian risiko berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRiskAssessmentDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderRiskAssessmentNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Assessment - Penilaian Risiko"],"operationId":"createOrderRiskAssessment","summary":"Tambah penilaian risiko beserta daftar prediksi (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRiskAssessmentRequest"},"example":{"order_id":1001,"snomed_risk_assessment_id":5,"risk_assessment_mitigation":"Edukasi jatuh & pasang bed rail.","order_risk_assessment_predictions":[{"snomed_risk_assessment_outcome_id":12,"order_risk_assessment_prediction_probability":"Tinggi"}]}}}},"responses":{"201":{"description":"Penilaian risiko berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRiskAssessmentDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Referensi SNOMED risk assessment/outcome tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Assessment - Penilaian Risiko"],"operationId":"updateOrderRiskAssessment","summary":"Ubah penilaian risiko (sinkronisasi daftar prediksi)","description":"`order_risk_assessment_predictions` disinkronkan mengikuti pola `vaccine_brands` pada Master Vaksin: item dengan `id` akan diupdate, item tanpa `id` akan dibuat baru, item existing yang tidak dikirim ulang akan dihapus (soft delete) — sekaligus mendukung fungsi edit & hapus per baris (job.md §2.e.vi).","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderRiskAssessmentRequest"}}}},"responses":{"200":{"description":"Penilaian risiko berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRiskAssessmentDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderRiskAssessmentNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Assessment - Penilaian Risiko"],"operationId":"deleteOrderRiskAssessment","summary":"Hapus penilaian risiko (beserta seluruh prediksi)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Penilaian risiko berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderRiskAssessmentNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/snomed_risk_assessments":{"get":{"tags":["Assessment Reference"],"operationId":"getSnomedRiskAssessmentList","summary":"Get referensi SNOMED jenis penilaian risiko","description":"Model/controller/service/resource SUDAH ADA di advomed-api tapi belum diroutekan — hanya perlu registrasi `Route::controller(...)` seperti endpoint SNOMED lain (list only).","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar referensi jenis penilaian risiko berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/snomed_risk_assessment_outcomes":{"get":{"tags":["Assessment Reference"],"operationId":"getSnomedRiskAssessmentOutcomeList","summary":"Get referensi SNOMED kemungkinan outcome risiko","description":"Sama seperti snomed_risk_assessments — sudah ada, belum diroutekan.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar referensi outcome risiko berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_nutrition_orders":{"get":{"tags":["Doctor Finish - Rekomendasi Diet"],"operationId":"getOrderNutritionOrderList","summary":"Get list rekomendasi diet","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Daftar rekomendasi diet berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNutritionOrderListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_nutrition_order":{"get":{"tags":["Doctor Finish - Rekomendasi Diet"],"operationId":"getOrderNutritionOrderDetail","summary":"Get detail rekomendasi diet (termasuk daftar detail)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail rekomendasi diet berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNutritionOrderDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNutritionOrderNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Finish - Rekomendasi Diet"],"operationId":"createOrderNutritionOrder","summary":"Tambah rekomendasi diet beserta detail (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderNutritionOrderRequest"},"example":{"order_id":1001,"nutrition_order_status_type_id":10,"nutrition_order_intent_type_id":20,"order_nutrition_order_details":[{"order_nutrition_order_detail_type_id":30,"snomed_nutrition_id":5,"amount_value":250,"satu_sehat_laboratory_unit_id":3}]}}}},"responses":{"201":{"description":"Rekomendasi diet berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNutritionOrderDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Referensi status/tujuan/SNOMED nutrisi/satuan tidak valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Finish - Rekomendasi Diet"],"operationId":"updateOrderNutritionOrder","summary":"Ubah rekomendasi diet (sinkronisasi daftar detail)","description":"`order_nutrition_order_details` disinkronkan mengikuti pola `order_risk_assessment_predictions` pada modul Assessment: item dengan `id` diupdate, item tanpa `id` dibuat baru, item existing yang tidak dikirim ulang dihapus (soft delete).","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderNutritionOrderRequest"}}}},"responses":{"200":{"description":"Rekomendasi diet berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNutritionOrderDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNutritionOrderNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Finish - Rekomendasi Diet"],"operationId":"deleteOrderNutritionOrder","summary":"Hapus rekomendasi diet (beserta seluruh detail)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rekomendasi diet berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderNutritionOrderNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/bridging/satu-sehat/nutrition-order-types":{"get":{"tags":["Doctor Finish Reference"],"operationId":"getNutritionOrderTypeList","summary":"Get referensi SNOMED jenis nutrisi","description":"REVISI v1.2.0: dibatalkan meregistrasi route `snomed_nutritions` lama (tabel per-domain, model/controller ada tapi route TIDAK PERNAH didaftarkan — orphan). Endpoint ini BARU, mengikuti pola `SatuSehatProcedureTypeService`/`Controller` yang sudah ada (`GET /bridging/satu-sehat/procedure-types`) — Service/Controller dedicated baru yang query `satu_sehat_snomed_ct_terms` dengan filter tetap `fhir_resource='NutritionOrder'`. Parameter `fhir_element` meneruskan nilai kolom `fhir_element` mentah dari tabel referensi (`oralDiet.type`, `oralDiet.nutrient.modifier`, `enteralFormula.baseFormulaType`) — ASUMSI mapping ke 3 `order_nutrition_order_detail_type` (`oral_type` / `exclude_from_food` / `oral_nutrient`) BELUM RAPI 1:1 di data seeder sumber, perlu konfirmasi Product/BE (lihat §8 tecnical_design.md doctor_finish).","security":[{"bearerAuth":[]}],"parameters":[{"name":"fhir_element","in":"query","required":false,"schema":{"type":"string","enum":["oralDiet.type","oralDiet.nutrient.modifier","enteralFormula.baseFormulaType"]}},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar referensi jenis nutrisi berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/satu_sehat_laboratory_units":{"get":{"tags":["Doctor Finish Reference"],"operationId":"getSatuSehatLaboratoryUnitList","summary":"Get referensi satuan laboratorium Satu Sehat","description":"BARU sepenuhnya — tabel/model/controller/route tidak ada sama sekali di codebase sebelumnya, meski job.md menuliskannya seolah endpoint ini sudah live.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar referensi satuan berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_educations":{"get":{"tags":["Doctor Finish - Edukasi"],"operationId":"getOrderEducationList","summary":"Get list edukasi","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"filter[order_id]","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Daftar edukasi berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEducationListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/transaction/order_education":{"get":{"tags":["Doctor Finish - Edukasi"],"operationId":"getOrderEducationDetail","summary":"Get detail edukasi","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Detail edukasi berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEducationDetailResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderEducationNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"post":{"tags":["Doctor Finish - Edukasi"],"operationId":"createOrderEducation","summary":"Tambah edukasi (CRUD murni)","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderEducationRequest"}}}},"responses":{"201":{"description":"Edukasi berhasil ditambahkan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEducationDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"409":{"description":"Referensi tipe edukasi/SNOMED edukasi tidak valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"put":{"tags":["Doctor Finish - Edukasi"],"operationId":"updateOrderEducation","summary":"Ubah edukasi","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderEducationRequest"}}}},"responses":{"200":{"description":"Edukasi berhasil diperbarui.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEducationDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderEducationNotFoundResponse"},"422":{"$ref":"#/components/responses/ValidationErrorResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}},"delete":{"tags":["Doctor Finish - Edukasi"],"operationId":"deleteOrderEducation","summary":"Hapus edukasi","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Edukasi berhasil dihapus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"403":{"$ref":"#/components/responses/ForbiddenResponse"},"404":{"$ref":"#/components/responses/OrderEducationNotFoundResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}},"/api/bridging/satu-sehat/education-types":{"get":{"tags":["Doctor Finish Reference"],"operationId":"getEducationTypeList","summary":"Get referensi kode edukasi (SNOMED)","description":"REVISI v1.2.0: rencana awal (wrapper baca dari `terminologies` JOIN `terminology_categories` WHERE `category='education'`) DIBATALKAN — riset lanjutan menemukan `terminologies`/`terminology_categories` TIDAK dipakai kode aktif manapun di advomed-api (tidak ada model/controller/route yang membacanya, dead end). Endpoint ini BARU, mengikuti pola `SatuSehatProcedureTypeService`/`Controller` yang sudah ada (`GET /bridging/satu-sehat/procedure-types`) — Service/Controller dedicated baru yang query `satu_sehat_snomed_ct_terms` dengan filter tetap `fhir_resource='Procedure'` DAN `fhir_element='education'` (7 kode sudah ter-seed, mis. \"84635008 Disease process or condition education\"). Kontrak response tetap `{id, code, display, system, description}`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Daftar referensi kode edukasi berhasil diambil.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnomedRefListResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorResponse"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Product":{"type":"object","required":["code","display_name"],"properties":{"code":{"type":"string","description":"Kode produk.","example":"VAC-BCG"},"display_name":{"type":"string","description":"Nama produk yang ditampilkan.","example":"Vaksin BCG"}}},"VaccineListItem":{"type":"object","required":["id","instance_product_id","product","vaccine_dose_count","instance_id"],"properties":{"id":{"type":"integer","example":1},"instance_product_id":{"type":"integer","description":"ID produk vaksin pada instance.","example":101},"product":{"$ref":"#/components/schemas/Product"},"vaccine_age_giving":{"type":"string","nullable":true,"description":"Usia pemberian vaksin.","example":"0-1 bulan"},"vaccine_dose_count":{"type":"integer","minimum":1,"description":"Jumlah dosis vaksin.","example":1},"instance_id":{"type":"integer","example":3}}},"VaccineBrand":{"type":"object","required":["id","instance_product_id","product"],"properties":{"id":{"type":"integer","description":"ID relasi merek vaksin.","example":10},"instance_product_id":{"type":"integer","description":"ID produk merek vaksin pada instance.","example":201},"product":{"$ref":"#/components/schemas/Product"}}},"VaccineDetail":{"allOf":[{"$ref":"#/components/schemas/VaccineListItem"},{"type":"object","required":["vaccine_brands"],"properties":{"vaccine_brands":{"type":"array","description":"Daftar merek vaksin.","items":{"$ref":"#/components/schemas/VaccineBrand"}}}}]},"CreateVaccineBrandRequest":{"type":"object","required":["instance_product_id"],"properties":{"instance_product_id":{"type":"integer","minimum":1,"description":"ID produk yang digunakan sebagai merek vaksin.","example":201}}},"UpdateVaccineBrandRequest":{"type":"object","required":["id","instance_product_id"],"properties":{"id":{"type":"integer","minimum":1,"description":"ID relasi merek vaksin.","example":10},"instance_product_id":{"type":"integer","minimum":1,"description":"ID produk yang digunakan sebagai merek vaksin.","example":201}}},"CreateVaccineRequest":{"type":"object","required":["instance_product_id","vaccine_dose_count","vaccine_brands"],"properties":{"instance_product_id":{"type":"integer","minimum":1,"description":"ID produk utama vaksin pada instance.","example":101},"vaccine_dose_count":{"type":"integer","minimum":1,"description":"Jumlah dosis vaksin.","example":1},"vaccine_brands":{"type":"array","minItems":1,"description":"Daftar produk yang menjadi merek vaksin.","items":{"$ref":"#/components/schemas/CreateVaccineBrandRequest"}}}},"UpdateVaccineRequest":{"type":"object","required":["id","instance_product_id","vaccine_dose_count","vaccine_brands"],"properties":{"id":{"type":"integer","minimum":1,"description":"ID master vaksin.","example":1},"instance_product_id":{"type":"integer","minimum":1,"description":"ID produk utama vaksin pada instance.","example":101},"vaccine_dose_count":{"type":"integer","minimum":1,"description":"Jumlah dosis vaksin.","example":2},"vaccine_brands":{"type":"array","minItems":1,"description":"Daftar merek vaksin yang diperbarui.","items":{"$ref":"#/components/schemas/UpdateVaccineBrandRequest"}}}},"PaginationMeta":{"type":"object","required":["current_page","per_page","total","last_page"],"properties":{"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":25},"last_page":{"type":"integer","example":3}}},"VaccineListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Daftar master vaksin berhasil diambil"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VaccineListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"VaccineDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Detail master vaksin berhasil diambil"},"data":{"$ref":"#/components/schemas/VaccineDetail"}}},"DeleteResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Master vaksin berhasil dihapus"},"data":{"nullable":true,"example":null}}},"ErrorResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Terjadi kesalahan"},"data":{"nullable":true,"example":null}}},"ValidationErrorResponse":{"type":"object","required":["success","message","errors"],"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Data yang diberikan tidak valid"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"example":{"instance_product_id":["Instance product wajib diisi."],"vaccine_dose_count":["Jumlah dosis vaksin minimal 1."],"vaccine_brands.0.instance_product_id":["Instance product merek vaksin wajib diisi."]}}}},"InstanceProductListResponse":{"type":"object","required":["data","links","meta","success","message"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstanceProduct"}},"links":{"type":"object","properties":{"first":{"type":"string","example":"{base_url}/api/product/instance_products?page=1"},"last":{"type":"string","example":"{base_url}/api/product/instance_products?page=14"},"prev":{"type":"string","nullable":true,"example":null},"next":{"type":"string","example":"{base_url}/api/product/instance_products?page=2"}}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"success":{"type":"boolean","example":true},"message":{"type":"string","example":"OK"}}},"InstanceProduct":{"type":"object","properties":{"instance_product_id":{"type":"integer","example":105},"product":{"$ref":"#/components/schemas/InstanceProductDetail"},"price":{"$ref":"#/components/schemas/InstanceProductPriceSummary"},"min_price":{"$ref":"#/components/schemas/InstanceProductPriceSummary"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/InstanceProductPrice"}},"inv_stock":{"allOf":[{"$ref":"#/components/schemas/InstanceProductStock"}],"nullable":true}}},"InstanceProductDetail":{"type":"object","properties":{"id":{"type":"integer","example":834},"code":{"type":"string","example":"BDX-001"},"name":{"type":"string","example":"Bodrex"},"product_ingredient":{"anyOf":[{"$ref":"#/components/schemas/ProductIngredient"},{"type":"array","items":{}}],"nullable":true},"dosage_form":{"allOf":[{"$ref":"#/components/schemas/DosageForm"}],"nullable":true}}},"ProductUom":{"type":"object","properties":{"id":{"type":"integer","example":117},"name":{"type":"string","example":"Kapsul"},"uom_id":{"type":"integer","example":1},"is_base_unit":{"type":"boolean","example":true},"conversion_value":{"type":"number","example":1}}},"ProductIngredient":{"type":"object","properties":{"name":{"type":"string","nullable":true},"strength_value":{"type":"number","nullable":true,"example":1},"strength_uom":{"allOf":[{"$ref":"#/components/schemas/IngredientStrengthUom"}],"nullable":true}}},"IngredientStrengthUom":{"type":"object","properties":{"uom_id":{"type":"integer","example":111},"uom_name":{"type":"string","example":"Puyer"}}},"DosageForm":{"type":"object","properties":{"id":{"type":"integer","example":2},"name":{"type":"string","example":"Kapsul"}}},"InstanceProductPriceSummary":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":174},"base_price":{"type":"number","example":32000},"applied_price":{"type":"number","example":33000}}},"InstanceProductPrice":{"type":"object","properties":{"id":{"type":"integer","example":90},"patient_category":{"type":"string","nullable":true,"example":"Regular"},"selling_price":{"oneOf":[{"type":"number"},{"type":"string"}],"example":5000},"markup":{"type":"number","example":5000},"uom":{"type":"string","nullable":true,"example":"Kapsul"}}},"InstanceProductStock":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","example":62},"base_qty_system":{"type":"number","example":510560},"base_qty_reserved":{"type":"number","example":0},"base_qty_available":{"type":"number","example":510560},"base_min_qty_threshold":{"type":"number","example":100},"base_last_cost":{"type":"number","example":33000},"base_unit_id":{"type":"integer","example":1},"base_unit":{"$ref":"#/components/schemas/BaseUnit"}}},"BaseUnit":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Kapsul"}}},"ReferenceOption":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string"}}},"StatusRef":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string"},"label":{"type":"string"}}},"MedicalImagingRef":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","example":"Odontogram"}}},"PcarePolyclinicRef":{"type":"object","properties":{"pcare_polyclinic_code":{"type":"string","nullable":true},"pcare_polyclinic_name":{"type":"string","nullable":true}}},"ChargeDetail":{"type":"object","properties":{"instance_product_id":{"type":"integer"},"product_display_name":{"type":"string"},"price":{"type":"number","description":"Nilai dari ip_prices (harga aktif saat ini)."}}},"PolyclinicChargeGroup":{"type":"object","properties":{"polyclinic_charge":{"$ref":"#/components/schemas/ChargeDetail"},"admin_charge":{"$ref":"#/components/schemas/ChargeDetail"},"fee_nakes":{"type":"number","nullable":true,"description":"Persentase fee nakes (dari ip_fee_details.multiplier_value)."}}},"PolyclinicListItem":{"type":"object","required":["id","name","slug","status"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"prefix_queue":{"type":"string"},"polyclinic_type":{"$ref":"#/components/schemas/ReferenceOption"},"onsite_polyclinic_charge":{"type":"number","description":"Ditampilkan sebagai kolom \"Tarif Poliklinik\" pada list (ASUMSI, mengikuti list.png)."},"onsite_admin_charge":{"type":"number","description":"Ditampilkan sebagai kolom \"Biaya Administrasi\" pada list (ASUMSI, mengikuti list.png)."},"status":{"$ref":"#/components/schemas/StatusRef"},"seq":{"type":"integer"},"depth":{"type":"integer"},"parent_id":{"type":"integer","nullable":true},"module_id":{"type":"integer","nullable":true}}},"PolyclinicDetail":{"allOf":[{"$ref":"#/components/schemas/PolyclinicListItem"},{"type":"object","properties":{"pcare_polyclinic":{"$ref":"#/components/schemas/PcarePolyclinicRef"},"medical_imaging":{"$ref":"#/components/schemas/MedicalImagingRef","nullable":true},"nursery_assesment_form":{"$ref":"#/components/schemas/ReferenceOption"},"onsite":{"$ref":"#/components/schemas/PolyclinicChargeGroup"},"teleconsultation":{"$ref":"#/components/schemas/PolyclinicChargeGroup"}}}]},"CreatePolyclinicRequest":{"type":"object","required":["name","polyclinic_type_id","prefix_queue","onsite_polyclinic_charge","onsite_admin_charge"],"properties":{"name":{"type":"string","description":"Alfabet only, unique per instance."},"polyclinic_type_id":{"type":"integer"},"pcare_polyclinic_code":{"type":"string","nullable":true},"pcare_polyclinic_name":{"type":"string","nullable":true},"prefix_queue":{"type":"string","description":"Unique per instance."},"medical_imaging_id":{"type":"integer","nullable":true},"nursery_assesment_form_type_id":{"type":"integer","nullable":true,"description":"Default \"Assesment awal\" bila tidak diisi."},"onsite_polyclinic_charge":{"type":"number"},"onsite_admin_charge":{"type":"number"},"onsite_fee_nakes":{"type":"number","nullable":true},"teleconsultation_polyclinic_charge":{"type":"number","nullable":true},"teleconsultation_admin_charge":{"type":"number","nullable":true},"teleconsultation_fee_nakes":{"type":"number","nullable":true}}},"UpdatePolyclinicRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreatePolyclinicRequest"}]},"PolyclinicListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PolyclinicListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"PolyclinicDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/PolyclinicDetail"}}},"MedicalImagingListResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MedicalImagingRef"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"GeneralTypeListResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name_id":{"type":"string"},"name_en":{"type":"string"}}}}}},"StaffRef":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"StaffScheduleSummaryItem":{"type":"object","properties":{"staff_id":{"type":"integer"},"staff_name":{"type":"string"},"staff_schedule_count":{"type":"integer"}}},"StaffScheduleSummaryListResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StaffScheduleSummaryItem"}}}},"StaffScheduleListItem":{"type":"object","properties":{"id":{"type":"integer"},"day_of_week":{"$ref":"#/components/schemas/ReferenceOption"},"start_time":{"type":"string","example":"09:00"},"end_time":{"type":"string","example":"19:00"},"total_staff_schedule_slot":{"type":"integer"}}},"StaffScheduleListResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StaffScheduleListItem"}}}},"StaffScheduleBreakItem":{"type":"object","properties":{"id":{"type":"integer"},"start_time":{"type":"string"},"end_time":{"type":"string"}}},"StaffScheduleSlotItem":{"type":"object","properties":{"id":{"type":"integer"},"start_time":{"type":"string"}}},"StaffScheduleDetail":{"type":"object","properties":{"id":{"type":"integer"},"staff_id":{"type":"integer"},"staff":{"$ref":"#/components/schemas/StaffRef"},"consultation_type_id":{"type":"integer"},"consultation_type":{"$ref":"#/components/schemas/ReferenceOption"},"day_of_week_id":{"type":"integer"},"day_of_week":{"$ref":"#/components/schemas/ReferenceOption"},"start_time":{"type":"string"},"end_time":{"type":"string"},"time_span":{"type":"integer","description":"Durasi total dalam menit."},"total_staff_schedule_slot":{"type":"integer"},"is_staff_have_break_slot":{"type":"boolean"},"staff_break_slots":{"type":"array","items":{"$ref":"#/components/schemas/StaffScheduleBreakItem"}},"staff_schedule_slots":{"type":"array","items":{"$ref":"#/components/schemas/StaffScheduleSlotItem"}}}},"StaffScheduleDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/StaffScheduleDetail"}}},"CreateStaffScheduleBreakRequest":{"type":"object","required":["start_time","end_time"],"properties":{"start_time":{"type":"string","example":"12:00"},"end_time":{"type":"string","example":"13:00"}}},"CreateStaffScheduleRequest":{"type":"object","required":["staff_id","consultation_type_id","day_of_week_id","start_time","end_time","slot_total"],"properties":{"staff_id":{"type":"array","minItems":1,"items":{"type":"integer"}},"consultation_type_id":{"type":"integer"},"day_of_week_id":{"type":"array","minItems":1,"items":{"type":"integer"}},"start_time":{"type":"string","example":"09:00"},"end_time":{"type":"string","example":"19:00"},"duration_minutes":{"type":"integer","nullable":true,"description":"Estimasi waktu per praktek. Bila diisi manual, slot_total otomatis dihitung ulang."},"slot_total":{"type":"integer","description":"Auto = floor(total durasi menit / duration_minutes). Bisa diisi manual."},"staff_schedule_breaks":{"type":"array","items":{"$ref":"#/components/schemas/CreateStaffScheduleBreakRequest"}}}},"UpdateStaffScheduleRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"type":"object","properties":{"staff_id":{"type":"integer","description":"Update hanya untuk satu jadwal (bukan array) karena mengacu ke satu staff_schedule.id."},"consultation_type_id":{"type":"integer"},"day_of_week_id":{"type":"array","items":{"type":"integer"}},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_minutes":{"type":"integer","nullable":true},"slot_total":{"type":"integer"},"staff_schedule_breaks":{"type":"array","items":{"$ref":"#/components/schemas/CreateStaffScheduleBreakRequest"}}}}]},"SnomedRef":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"display":{"type":"string"},"system":{"type":"string"}}},"SnomedRefListResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SnomedRef"}}}},"SatuSehatSyncStatus":{"type":"object","description":"Read-only, di-JOIN dari satu_sehat_resource_trackers (existing, polymorphic) — BUKAN kolom pada tabel asal. Terisi setelah order di-submit lewat POST /orders/{order_id}/emr/submit (trigger existing, di luar scope endpoint-endpoint pada dokumen ini).","properties":{"is_synced":{"type":"boolean","example":false},"fhir_resource_type":{"type":"string","nullable":true,"example":"Condition"},"fhir_resource_id":{"type":"string","nullable":true,"description":"FHIR resource id (IHS id) dari Satu Sehat."},"synced_at":{"type":"string","format":"date-time","nullable":true}}},"OrderInfectiousIllnessHistory":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"infectious_illness_history_patient_id":{"type":"integer","nullable":true,"description":"Read-only, di-resolve otomatis dari order_id -> orders.orderable."},"infectious_illness_history_patient_name":{"type":"string","nullable":true},"snomed_infectious_illness_history_id":{"type":"integer","nullable":true},"snomed_infectious_illness_history":{"$ref":"#/components/schemas/SnomedRef"},"snomed_infectious_illness_history_code":{"type":"string","nullable":true},"snomed_infectious_illness_history_display":{"type":"string","nullable":true},"infectious_illness_history_staff_id":{"type":"integer","nullable":true},"infectious_illness_history_staff":{"$ref":"#/components/schemas/StaffRef"},"infectious_illness_history_staff_name":{"type":"string","nullable":true},"infectious_illness_history_age":{"type":"integer","nullable":true},"infectious_illness_history_note":{"type":"string","nullable":true},"satu_sehat_sync":{"$ref":"#/components/schemas/SatuSehatSyncStatus"},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderInfectiousIllnessHistoryRequest":{"type":"object","required":["order_id","snomed_infectious_illness_history_id","infectious_illness_history_staff_id"],"properties":{"order_id":{"type":"integer"},"snomed_infectious_illness_history_id":{"type":"integer","description":"Jenis penyakit — ref snomed_infectious_illness_histories."},"infectious_illness_history_staff_id":{"type":"integer","description":"Diinput oleh — staff yang mencatat, ref staffs (bukan types)."},"infectious_illness_history_age":{"type":"integer","nullable":true},"infectious_illness_history_note":{"type":"string","nullable":true}}},"UpdateOrderInfectiousIllnessHistoryRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreateOrderInfectiousIllnessHistoryRequest"}]},"OrderInfectiousIllnessHistoryListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistory"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderInfectiousIllnessHistoryDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistory"}}},"OrderNaturalHistoryOfDisease":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"natural_history_of_disease_patient_id":{"type":"integer","nullable":true},"natural_history_of_disease_patient_name":{"type":"string","nullable":true},"natural_history_of_disease_summary":{"type":"string","nullable":true},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"ClinicalImpression\" untuk entity ini."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderNaturalHistoryOfDiseaseRequest":{"type":"object","required":["order_id","natural_history_of_disease_summary"],"properties":{"order_id":{"type":"integer"},"natural_history_of_disease_summary":{"type":"string"}}},"UpdateOrderNaturalHistoryOfDiseaseRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreateOrderNaturalHistoryOfDiseaseRequest"}]},"OrderNaturalHistoryOfDiseaseListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDisease"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderNaturalHistoryOfDiseaseDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDisease"}}},"OrderGoal":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"goal_patient_id":{"type":"integer","nullable":true},"goal_patient_name":{"type":"string","nullable":true},"goal_status_type_id":{"type":"integer","nullable":true},"goal_status_type":{"$ref":"#/components/schemas/ReferenceOption"},"goal_status_type_name":{"type":"string","nullable":true},"goal_achievement_status_type_id":{"type":"integer","nullable":true},"goal_achievement_status_type":{"$ref":"#/components/schemas/ReferenceOption"},"goal_achievement_status_type_name":{"type":"string","nullable":true},"goal_summary":{"type":"string","nullable":true},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"Goal\" untuk entity ini."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderGoalRequest":{"type":"object","required":["order_id","goal_summary","goal_status_type_id","goal_achievement_status_type_id"],"properties":{"order_id":{"type":"integer"},"goal_summary":{"type":"string"},"goal_status_type_id":{"type":"integer","description":"Status — group_slug ASUMSI goal_status_types (Active/Dibatalkan/Selesai)."},"goal_achievement_status_type_id":{"type":"integer","description":"Status pencapaian — group_slug ASUMSI goal_achievement_status_types (Sedang berlangsung/Tercapai/Tidak tercapai)."}}},"UpdateOrderGoalRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreateOrderGoalRequest"}]},"OrderGoalListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderGoal"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderGoalDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderGoal"}}},"OrderCarePlan":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"care_plan_patient_id":{"type":"integer","nullable":true},"care_plan_patient_name":{"type":"string","nullable":true},"care_plan_summary":{"type":"string","nullable":true},"care_plan_type_id":{"type":"integer"},"care_plan_type":{"$ref":"#/components/schemas/ReferenceOption"},"care_plan_type_name":{"type":"string","nullable":true},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"CarePlan\" untuk entity ini."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderCarePlanRequest":{"type":"object","required":["order_id","care_plan_summary","care_plan_type_id"],"properties":{"order_id":{"type":"integer"},"care_plan_summary":{"type":"string","description":"Textarea."},"care_plan_type_id":{"type":"integer","description":"ref types, group_slug care_plan_types, slug care_plan_type_care_plan | care_plan_type_medical_instruction."}}},"UpdateOrderCarePlanRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreateOrderCarePlanRequest"}]},"OrderCarePlanListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderCarePlan"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderCarePlanDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderCarePlan"}}},"OrderRiskAssessmentPrediction":{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"Kosongkan untuk baris baru saat update."},"order_risk_assessment_prediction_probability":{"type":"string"},"snomed_risk_assessment_outcome_id":{"type":"integer"},"snomed_risk_assessment_outcome":{"$ref":"#/components/schemas/SnomedRef"},"snomed_risk_assessment_outcome_code":{"type":"string","nullable":true},"snomed_risk_assessment_outcome_display":{"type":"string","nullable":true}}},"OrderRiskAssessmentListItem":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"risk_assessment_patient_id":{"type":"integer","nullable":true},"risk_assessment_patient_name":{"type":"string","nullable":true},"snomed_risk_assessment_id":{"type":"integer","nullable":true},"snomed_risk_assessment":{"$ref":"#/components/schemas/SnomedRef"},"snomed_risk_assessment_code":{"type":"string","nullable":true},"snomed_risk_assessment_display":{"type":"string","nullable":true},"risk_assessment_mitigation":{"type":"string","nullable":true},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"Status aktif/nonaktif direpresentasikan lewat soft delete, bukan kolom status terpisah."},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"RiskAssessment\" untuk entity ini (satu resource per header, mencakup seluruh prediction[])."},"prediction_count":{"type":"integer","description":"Jumlah baris risiko & probabilitas."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"OrderRiskAssessmentDetail":{"allOf":[{"$ref":"#/components/schemas/OrderRiskAssessmentListItem"},{"type":"object","properties":{"order_risk_assessment_predictions":{"type":"array","items":{"$ref":"#/components/schemas/OrderRiskAssessmentPrediction"}}}}]},"CreateOrderRiskAssessmentPredictionRequest":{"type":"object","required":["snomed_risk_assessment_outcome_id","order_risk_assessment_prediction_probability"],"properties":{"snomed_risk_assessment_outcome_id":{"type":"integer","description":"Risiko — ref snomed_risk_assessment_outcomes."},"order_risk_assessment_prediction_probability":{"type":"string","description":"Probabilitas."}}},"UpdateOrderRiskAssessmentPredictionRequest":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"Isi untuk update baris existing, kosongkan untuk baris baru."}}},{"$ref":"#/components/schemas/CreateOrderRiskAssessmentPredictionRequest"}]},"CreateOrderRiskAssessmentRequest":{"type":"object","required":["order_id","snomed_risk_assessment_id","risk_assessment_mitigation","order_risk_assessment_predictions"],"properties":{"order_id":{"type":"integer"},"snomed_risk_assessment_id":{"type":"integer","description":"Jenis penilaian resiko."},"risk_assessment_mitigation":{"type":"string","description":"Mitigasi."},"order_risk_assessment_predictions":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CreateOrderRiskAssessmentPredictionRequest"}}}},"UpdateOrderRiskAssessmentRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"type":"object","required":["snomed_risk_assessment_id","risk_assessment_mitigation","order_risk_assessment_predictions"],"properties":{"snomed_risk_assessment_id":{"type":"integer"},"risk_assessment_mitigation":{"type":"string"},"order_risk_assessment_predictions":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/UpdateOrderRiskAssessmentPredictionRequest"}}}}]},"OrderRiskAssessmentListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderRiskAssessmentListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderRiskAssessmentDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderRiskAssessmentDetail"}}},"AssessmentEmrSaveRequest":{"type":"object","description":"Hanya key BARU yang ditambahkan modul Assessment. Key lain milik section yang sama (mis. `nurse_anamnesis` juga punya key existing seperti `order_allergy_histories`) tetap berlaku dan tidak diulang di sini.","properties":{"order_infectious_illness_histories":{"type":"array","description":"Section nurse_anamnesis.","items":{"$ref":"#/components/schemas/CreateOrderInfectiousIllnessHistoryRequest"}},"order_natural_history_of_diseases":{"type":"array","description":"Section doctor_assessment.","items":{"$ref":"#/components/schemas/CreateOrderNaturalHistoryOfDiseaseRequest"}},"order_goals":{"type":"array","description":"Section doctor_assessment.","items":{"$ref":"#/components/schemas/CreateOrderGoalRequest"}},"order_care_plans":{"type":"array","description":"Section doctor_assessment (rencana rawat + instruksi medik).","items":{"$ref":"#/components/schemas/CreateOrderCarePlanRequest"}},"order_risk_assessments":{"type":"array","description":"Section doctor_assessment.","items":{"$ref":"#/components/schemas/CreateOrderRiskAssessmentRequest"}},"deleted":{"type":"object","description":"Map key sub-resource -> array id yang dihapus, mengikuti pola existing EmrService.","properties":{"order_infectious_illness_histories":{"type":"array","items":{"type":"integer"}},"order_natural_history_of_diseases":{"type":"array","items":{"type":"integer"}},"order_goals":{"type":"array","items":{"type":"integer"}},"order_care_plans":{"type":"array","items":{"type":"integer"}},"order_risk_assessments":{"type":"array","items":{"type":"integer"}}}}}},"AssessmentEmrSaveResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"object","description":"Mengikuti bentuk response saveEmr existing (saved/deleted count per key + view data terbaru).","properties":{"saved":{"type":"object","additionalProperties":{"type":"integer"}},"deleted":{"type":"object","additionalProperties":{"type":"integer"}}}}}},"AssessmentEmrViewResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"object","properties":{"order_infectious_illness_histories":{"type":"array","items":{"$ref":"#/components/schemas/OrderInfectiousIllnessHistory"}},"order_natural_history_of_diseases":{"type":"array","items":{"$ref":"#/components/schemas/OrderNaturalHistoryOfDisease"}},"order_goals":{"type":"array","items":{"$ref":"#/components/schemas/OrderGoal"}},"order_care_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderCarePlan"}},"order_risk_assessments":{"type":"array","items":{"$ref":"#/components/schemas/OrderRiskAssessmentDetail"}}}}}},"OrderNutritionOrderDetail":{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"Kosongkan untuk baris baru saat update."},"order_nutrition_order_detail_type_id":{"type":"integer"},"order_nutrition_order_detail_type":{"$ref":"#/components/schemas/ReferenceOption"},"order_nutrition_order_detail_type_name":{"type":"string","nullable":true},"snomed_nutrition_id":{"type":"integer","nullable":true},"snomed_nutrition":{"$ref":"#/components/schemas/SnomedRef"},"snomed_nutrition_code":{"type":"string","nullable":true},"snomed_nutrition_display":{"type":"string","nullable":true},"amount_value":{"type":"number","nullable":true},"satu_sehat_laboratory_unit_id":{"type":"integer","nullable":true},"satu_sehat_laboratory_unit":{"$ref":"#/components/schemas/SnomedRef"},"satu_sehat_laboratory_unit_name":{"type":"string","nullable":true}}},"CreateOrderNutritionOrderDetailRequest":{"type":"object","required":["order_nutrition_order_detail_type_id"],"properties":{"order_nutrition_order_detail_type_id":{"type":"integer","description":"ref types, group_slug order_nutrition_order_detail_types."},"snomed_nutrition_id":{"type":"integer","nullable":true,"description":"ref satu_sehat_snomed_ct_terms (fhir_resource='NutritionOrder'), filter fhir_element mengikuti detail_type yang dipilih — ASUMSI mapping, lihat prd.md/tecnical_design §8."},"amount_value":{"type":"number","nullable":true},"satu_sehat_laboratory_unit_id":{"type":"integer","nullable":true}}},"UpdateOrderNutritionOrderDetailRequest":{"allOf":[{"type":"object","properties":{"id":{"type":"integer","nullable":true,"description":"Isi untuk update baris existing, kosongkan untuk baris baru."}}},{"$ref":"#/components/schemas/CreateOrderNutritionOrderDetailRequest"}]},"OrderNutritionOrder":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"nutrition_order_patient_id":{"type":"integer","nullable":true,"description":"Read-only, di-resolve otomatis dari order_id -> orders.orderable."},"nutrition_order_patient_name":{"type":"string","nullable":true},"nutrition_order_status_type_id":{"type":"integer","nullable":true},"nutrition_order_status_type":{"$ref":"#/components/schemas/ReferenceOption"},"nutrition_order_status_type_name":{"type":"string","nullable":true},"nutrition_order_intent_type_id":{"type":"integer","nullable":true},"nutrition_order_intent_type":{"$ref":"#/components/schemas/ReferenceOption"},"nutrition_order_intent_type_name":{"type":"string","nullable":true},"order_nutrition_order_details":{"type":"array","items":{"$ref":"#/components/schemas/OrderNutritionOrderDetail"}},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"NutritionOrder\" untuk entity ini (satu resource per header, mencakup detail yang didukung builder — lihat tecnical_design.md §8 untuk gap dukungan per tipe detail)."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderNutritionOrderRequest":{"type":"object","required":["order_id","nutrition_order_status_type_id","nutrition_order_intent_type_id","order_nutrition_order_details"],"properties":{"order_id":{"type":"integer"},"nutrition_order_status_type_id":{"type":"integer","description":"Status — group_slug order_nutrition_types (active/cancelled)."},"nutrition_order_intent_type_id":{"type":"integer","description":"Tujuan — group_slug nutrition_order_intent_types (proposal/plan/directive/order)."},"order_nutrition_order_details":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/CreateOrderNutritionOrderDetailRequest"}}}},"UpdateOrderNutritionOrderRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"type":"object","required":["nutrition_order_status_type_id","nutrition_order_intent_type_id","order_nutrition_order_details"],"properties":{"nutrition_order_status_type_id":{"type":"integer"},"nutrition_order_intent_type_id":{"type":"integer"},"order_nutrition_order_details":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/UpdateOrderNutritionOrderDetailRequest"}}}}]},"OrderNutritionOrderListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderNutritionOrder"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderNutritionOrderDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderNutritionOrder"}}},"OrderDietPlan":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"diet_plan_patient_id":{"type":"integer","nullable":true},"diet_plan_patient_name":{"type":"string","nullable":true},"diet_plan_summary":{"type":"string","nullable":true},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"UpsertOrderDietPlanRequest":{"type":"object","description":"Hanya dipakai di dalam body PUT .../emr?section=doctor_finish — TIDAK ada endpoint CRUD murni terpisah untuk Diet Plan (keputusan SA).","required":["diet_plan_summary"],"properties":{"diet_plan_summary":{"type":"string","description":"Textarea."}}},"OrderEducation":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"order_education_patient_id":{"type":"integer","nullable":true},"order_education_patient_name":{"type":"string","nullable":true},"order_education_type_id":{"type":"integer"},"order_education_type":{"$ref":"#/components/schemas/ReferenceOption"},"order_education_type_name":{"type":"string","nullable":true},"order_education_name":{"type":"string","nullable":true},"order_education_reason":{"type":"string","nullable":true},"order_education_note":{"type":"string","nullable":true},"snomed_education_id":{"type":"integer","nullable":true},"snomed_education":{"$ref":"#/components/schemas/SnomedRef"},"snomed_education_code":{"type":"string","nullable":true},"snomed_education_display":{"type":"string","nullable":true},"satu_sehat_sync":{"allOf":[{"$ref":"#/components/schemas/SatuSehatSyncStatus"}],"description":"fhir_resource_type bernilai \"Procedure\" untuk entity ini — HANYA terisi kalau snomed_education_id ada isinya saat submit; baris tanpa kode SNOMED tidak pernah menghasilkan resource FHIR (is_synced selalu false, bukan indikasi kegagalan)."},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CreateOrderEducationRequest":{"type":"object","required":["order_id","order_education_type_id"],"properties":{"order_id":{"type":"integer"},"order_education_type_id":{"type":"integer","description":"ref types, group_slug order_education_types (Pasien/Keluarga pasien/Selain pasien/Tidak bisa dilakukan edukasi)."},"order_education_name":{"type":"string","nullable":true,"description":"Wajib jika order_education_type = keluarga pasien / selain pasien."},"order_education_reason":{"type":"string","nullable":true,"description":"Wajib jika order_education_type = tidak bisa dilakukan edukasi."},"order_education_note":{"type":"string","nullable":true},"snomed_education_id":{"type":"integer","nullable":true,"description":"ref satu_sehat_snomed_ct_terms (fhir_resource='Procedure', fhir_element='education')."}}},"UpdateOrderEducationRequest":{"allOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}},{"$ref":"#/components/schemas/CreateOrderEducationRequest"}]},"OrderEducationListResponse":{"type":"object","required":["success","message","data","meta"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderEducation"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}},"OrderEducationDetailResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/OrderEducation"}}},"OrderDischargeNewFields":{"type":"object","description":"Field BARU pada `order_discharges` (entity EXISTING, field lain seperti discharge_status_type_id/discharge_condition_type_id/ discharge_planning tidak berubah & tidak diulang di sini).","properties":{"is_register_next_consultation":{"type":"boolean","nullable":true,"default":false,"description":"Checkbox \"Daftarkan konsultasi selanjutnya\". Bila true, FE wajib mengirim minimal satu baris `order_controll_plans[]` (ASUMSI SA, perlu konfirmasi Product/BE)."}}},"OrderControllPlanNewFields":{"type":"object","description":"Field BARU pada `order_controll_plans` (entity EXISTING, field lain tidak berubah & tidak diulang di sini).","properties":{"control_plan_time":{"type":"string","format":"time","nullable":true,"description":"Jam konsultasi selanjutnya."}}},"OrderFollowUpPlanNewFields":{"type":"object","description":"Field BARU pada `order_follow_up_plans` (entity EXISTING, field lain tidak berubah & tidak diulang di sini). Section ini tampil jika `discharge_status_type` = Rujuk Internal/Rujuk Eksternal.","properties":{"follow_up_further_examination_id":{"type":"integer","nullable":true,"description":"ref types, group_slug BARU \"follow_up_further_examination\" (belum diseed, perlu konfirmasi penamaan slug ke Product/BE)."},"follow_up_transportation_facility_type_id":{"type":"integer","nullable":true,"description":"ref types, group_slug BARU \"follow_up_transportation_facility_types\" (belum diseed)."},"follow_up_referral_external_type_id":{"type":"integer","nullable":true,"description":"ref types, group_slug BARU \"follow_up_referral_external_types\" (belum diseed). Tampil hanya jika referral_type = external."}}},"UpsertPatientDeathRequest":{"type":"object","required":["death_cause","death_place","death_datetime","doctor_id"],"description":"Hanya dipakai di dalam body PUT .../emr?section=doctor_finish saat discharge_status_type = Meninggal — TIDAK ada endpoint CRUD murni terpisah untuk item ini. Field mengikuti CreatePatientDeathRequest existing di advomed-api MINUS patient_id (server-derived). Field tambahan (user_id/place_of_death/diagnosis) diminta draft SA tapi tidak ada di request/migration existing — perlu konfirmasi Product/BE sebelum ditambahkan.","properties":{"death_cause":{"type":"string"},"death_place":{"type":"string"},"death_datetime":{"type":"string","format":"date-time"},"doctor_id":{"type":"integer"}}},"PatientDeath":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer","description":"Bukan kolom asli patient_deaths (key-nya patient_id) — ditambahkan di response view EMR agar FE bisa mencocokkan ke order yang sedang dibuka."},"patient_id":{"type":"integer","nullable":true,"description":"Snapshot, di-resolve server-side dari order_id -> orders.orderable."},"death_cause":{"type":"string","nullable":true},"death_place":{"type":"string","nullable":true},"death_datetime":{"type":"string","format":"date-time"},"doctor_id":{"type":"integer","nullable":true},"created_by_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"DoctorFinishEmrSaveRequest":{"type":"object","description":"Hanya key BARU yang ditambahkan modul ini. Key lain milik section `doctor_finish` yang sudah ada (`order_discharges`, `order_follow_up_plans`, dst.) tetap berlaku dan tidak diulang di sini.\n\n**REVISI v1.3.0**: `order_discharges[]`/`order_controll_plans[]`/ `order_follow_up_plans[]` bukan key baru — yang baru hanya field tambahan di dalam tiap baris, lihat `OrderDischargeNewFields`/ `OrderControllPlanNewFields`/`OrderFollowUpPlanNewFields`.\n\n**REVISI v1.3.1**: `patient_death` (key BARU, object nullable, bukan array) dikirim hanya saat discharge_status_type = Meninggal, disimpan pada transaksi PUT yang SAMA (bukan endpoint terpisah).","properties":{"order_discharges":{"type":"array","items":{"$ref":"#/components/schemas/OrderDischargeNewFields"},"description":"REVISI v1.3.0 — array existing, item schema di sini HANYA memuat field BARU (is_register_next_consultation). Field existing lain (discharge_status_type_id, dst.) tetap wajib dikirim FE sesuai kontrak lama, cukup di-merge oleh BE (allOf), tidak diulang di sini."},"order_controll_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderControllPlanNewFields"},"description":"REVISI v1.3.0 — array existing, item schema di sini HANYA memuat field BARU (control_plan_time). Dikirim hanya jika order_discharges.is_register_next_consultation = true."},"order_service_statuses":{"type":"array","items":{"type":"object"},"description":"Prognosis — TIDAK ADA perubahan kontrak (kolom existing: service_prognosis_type_id/_name/_concept/_notes), item schema tidak dimodelkan ulang di sini karena bukan bagian delta modul ini."},"order_follow_up_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderFollowUpPlanNewFields"},"description":"REVISI v1.3.0 — array existing, item schema di sini HANYA memuat 3 pasang field BARU. Dikirim hanya jika discharge_status_type = Rujuk Internal/Rujuk Eksternal."},"patient_death":{"allOf":[{"$ref":"#/components/schemas/UpsertPatientDeathRequest"}],"nullable":true,"description":"REVISI v1.3.1 — dikirim hanya jika order_discharges.discharge_status_type = Meninggal. Disimpan ke tabel patient_deaths existing dalam transaksi yang sama dgn field Pulang lainnya."},"order_nutrition_orders":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrderNutritionOrderRequest"}},"order_diet_plans":{"type":"array","items":{"$ref":"#/components/schemas/UpsertOrderDietPlanRequest"}},"order_educations":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrderEducationRequest"}},"deleted":{"type":"object","properties":{"order_nutrition_orders":{"type":"array","items":{"type":"integer"}},"order_diet_plans":{"type":"array","items":{"type":"integer"}},"order_educations":{"type":"array","items":{"type":"integer"}}}}}},"DoctorFinishEmrSaveResponse":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"object","properties":{"saved":{"type":"object","additionalProperties":{"type":"integer"}},"deleted":{"type":"object","additionalProperties":{"type":"integer"}}}}}},"DoctorFinishEmrViewResponse":{"type":"object","required":["success","message","data"],"description":"REVISI v1.3.0: response order_discharges[]/order_controll_plans[]/ order_follow_up_plans[] (entity EXISTING, tidak dimodelkan ulang di sini) sekarang menyertakan field tambahan — lihat OrderDischargeNewFields/OrderControllPlanNewFields/ OrderFollowUpPlanNewFields di atas. REVISI v1.3.1: response menyertakan `patient_death` (nullable) bila order terkait sudah tercatat meninggal.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"object","properties":{"order_discharges":{"type":"array","items":{"$ref":"#/components/schemas/OrderDischargeNewFields"},"description":"Item schema di sini HANYA field BARU — field existing lain tetap ada di response asli, tidak diulang."},"order_controll_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderControllPlanNewFields"},"description":"Item schema di sini HANYA field BARU."},"order_service_statuses":{"type":"array","items":{"type":"object"},"description":"Prognosis — TIDAK ADA perubahan kontrak, tidak dimodelkan ulang di sini."},"order_follow_up_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderFollowUpPlanNewFields"},"description":"Item schema di sini HANYA 3 pasang field BARU."},"order_nutrition_orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderNutritionOrder"}},"order_diet_plans":{"type":"array","items":{"$ref":"#/components/schemas/OrderDietPlan"}},"order_educations":{"type":"array","items":{"$ref":"#/components/schemas/OrderEducation"}},"patient_death":{"allOf":[{"$ref":"#/components/schemas/PatientDeath"}],"nullable":true,"description":"REVISI v1.3.1 — null bila order belum tercatat meninggal."}}}}}},"responses":{"BadRequestResponse":{"description":"Request tidak valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Parameter request tidak valid","data":null}}}},"UnauthorizedResponse":{"description":"Pengguna belum terautentikasi.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthenticated","data":null}}}},"ForbiddenResponse":{"description":"Pengguna tidak memiliki izin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Anda tidak memiliki izin untuk mengakses resource ini","data":null}}}},"VaccineNotFoundResponse":{"description":"Master vaksin tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Master vaksin tidak ditemukan","data":null}}}},"ValidationErrorResponse":{"description":"Validasi request gagal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"InternalServerErrorResponse":{"description":"Terjadi kesalahan pada server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Terjadi kesalahan pada server","data":null}}}},"PolyclinicNotFoundResponse":{"description":"Master poliklinik tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Master poliklinik tidak ditemukan","data":null}}}},"StaffScheduleNotFoundResponse":{"description":"Jadwal praktek dokter tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Jadwal praktek dokter tidak ditemukan","data":null}}}},"OrderNotFoundResponse":{"description":"Order tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Order tidak ditemukan","data":null}}}},"OrderInfectiousIllnessHistoryNotFoundResponse":{"description":"Riwayat penyakit menular tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Riwayat penyakit menular tidak ditemukan","data":null}}}},"OrderNaturalHistoryOfDiseaseNotFoundResponse":{"description":"Riwayat perjalanan penyakit tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Riwayat perjalanan penyakit tidak ditemukan","data":null}}}},"OrderGoalNotFoundResponse":{"description":"Tujuan perawatan tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Tujuan perawatan tidak ditemukan","data":null}}}},"OrderCarePlanNotFoundResponse":{"description":"Rencana rawat / instruksi medik tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rencana rawat / instruksi medik tidak ditemukan","data":null}}}},"OrderRiskAssessmentNotFoundResponse":{"description":"Penilaian risiko tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Penilaian risiko tidak ditemukan","data":null}}}},"OrderNutritionOrderNotFoundResponse":{"description":"Rekomendasi diet tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Rekomendasi diet tidak ditemukan","data":null}}}},"OrderEducationNotFoundResponse":{"description":"Data edukasi tidak ditemukan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Data edukasi tidak ditemukan","data":null}}}}}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/KUSWANDARU911/AdvomedApi/2"}]}