feat (chemo): add handler, use case, and handle in encounter

This commit is contained in:
dpurbosakti
2025-10-05 14:38:33 +07:00
parent 0c2ad54b58
commit 854143ef42
10 changed files with 831 additions and 5 deletions
@@ -6,6 +6,7 @@ import (
/******************** main / transaction ********************/
adime "simrs-vx/internal/interface/main-handler/adime"
auth "simrs-vx/internal/interface/main-handler/authentication"
chemo "simrs-vx/internal/interface/main-handler/chemo"
consultation "simrs-vx/internal/interface/main-handler/consultation"
counter "simrs-vx/internal/interface/main-handler/counter"
deviceorder "simrs-vx/internal/interface/main-handler/device-order"
@@ -220,6 +221,16 @@ func SetRoutes() http.Handler {
"PATCH /{id}/reply": consultation.O.Reply,
})
hk.GroupRoutes("/v1/chemo", r, auth.GuardMW, hk.MapHandlerFunc{
"GET /": chemo.O.GetList,
"GET /{id}": chemo.O.GetDetail,
"POST /": chemo.O.Create,
"PATCH /{id}": chemo.O.Update,
"DELETE /{id}": chemo.O.Delete,
"PATCH /{id}/verify": chemo.O.Verify,
"PATCH /{id}/reject": chemo.O.Reject,
})
/******************** actor ********************/
hc.RegCrud(r, "/v1/person", person.O)
hc.RegCrud(r, "/v1/person-address", personaddress.O)