Admin — Case coordinators
Maps each speciality (must equal disease_categories.dc_id) to a list of doctor employee ids. At most one active row per speciality_id. Edit only updates doctor_ids (not speciality_id).
POST /admin/save-case-coordinators
Section titled “POST /admin/save-case-coordinators”Creates the coordinator assignment for a disease category. Fails if speciality_id is not an active dc_id, or if an active row already exists for that speciality.
Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
speciality_id | string | yes | Same as disease_categories.dc_id |
doctor_ids | string[] | yes | Non-empty; e.g. ["EMP1","EMP2"] |
Example request
Section titled “Example request”{ "speciality_id": "550e8400-e29b-41d4-a716-446655440000", "doctor_ids": ["EMP1", "EMP2"]}Response — success (200)
Section titled “Response — success (200)”{ "status": 1000, "message": "Case coordinators saved", "data": { "cc_id": "660e8400-e29b-41d4-a716-446655440001" }}Response — invalid speciality (400)
Section titled “Response — invalid speciality (400)”{ "status": 1002, "message": "speciality_id is not a valid active disease category (dc_id)"}Response — duplicate (409)
Section titled “Response — duplicate (409)”{ "status": 1002, "message": "Case coordinators already exist for this speciality"}POST /admin/list-case-coordinators
Section titled “POST /admin/list-case-coordinators”Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
page | number | no | default 1 |
size | number | no | default 15, max 100 |
q | string | no | Search speciality_id / doctor_ids text |
Example request
Section titled “Example request”{ "page": 1, "size": 10, "q": "EMP1"}Response — success (200)
Section titled “Response — success (200)”{ "status": 1000, "message": "ok", "data": [ { "cc_id": "uuid", "speciality_id": "dc-uuid", "doctor_ids": ["EMP1", "EMP2"], "created_date": "2026-05-08T12:00:00.000Z" } ], "pagination": { "total": 1, "page": 1, "size": 10 }}POST /admin/case-coordinator-details
Section titled “POST /admin/case-coordinator-details”Request body
Section titled “Request body”| Field | Type | Required |
|---|---|---|
cc_id | string | yes |
Example request
Section titled “Example request”{ "cc_id": "660e8400-e29b-41d4-a716-446655440001"}Response — success (200)
Section titled “Response — success (200)”{ "status": 1000, "message": "ok", "data": { "cc_id": "uuid", "speciality_id": "dc-uuid", "doctor_ids": ["EMP1", "EMP2"], "created_by": "user-id", "created_date": "2026-05-08T12:00:00.000Z", "updated_by": null, "updated_date": null }}Response — not found (404)
Section titled “Response — not found (404)”{ "status": 1002, "message": "Case coordinator record not found"}POST /admin/edit-case-coordinators
Section titled “POST /admin/edit-case-coordinators”Updates only doctor_ids. speciality_id cannot be changed (create a new flow would require a new row after deactivating the old one — not implemented here).
Request body
Section titled “Request body”| Field | Type | Required | Notes |
|---|---|---|---|
cc_id | string | yes | Row to update |
doctor_ids | string[] | yes | Array of non-empty strings; empty array [] is allowed (clears all ids) |
Example request
Section titled “Example request”{ "cc_id": "660e8400-e29b-41d4-a716-446655440001", "doctor_ids": ["EMP1", "EMP3"]}Response — success (200)
Section titled “Response — success (200)”{ "status": 1000, "message": "Case coordinators updated"}Response — not found (404)
Section titled “Response — not found (404)”{ "status": 1002, "message": "Case coordinator record not found"}