wip
This commit is contained in:
@@ -138,6 +138,50 @@ func SetRoutes() http.Handler {
|
||||
"DELETE /{id}": encounter.O.Delete,
|
||||
"PATCH /{id}/checkout": encounter.O.CheckOut,
|
||||
})
|
||||
hk.GroupRoutes("/v1/medication", r, auth.GuardMW, hk.MapHandlerFunc{
|
||||
"GET /": medication.O.GetList,
|
||||
"GET /{id}": medication.O.GetDetail,
|
||||
"POST /": medication.O.Create,
|
||||
"PATCH /{id}": medication.O.Update,
|
||||
"DELETE /{id}": medication.O.Delete,
|
||||
"PATCH /{id}/complete": medication.O.Complete,
|
||||
})
|
||||
|
||||
hk.GroupRoutes("/v1/medication-item", r, hk.MapHandlerFunc{
|
||||
"GET /": medicationitem.O.GetList,
|
||||
"GET /{id}": medicationitem.O.GetDetail,
|
||||
"POST /": medicationitem.O.Create,
|
||||
"PATCH /{id}": medicationitem.O.Update,
|
||||
"DELETE /{id}": medicationitem.O.Delete,
|
||||
"PATCH /{id}/redeem": medicationitem.O.Redeem,
|
||||
})
|
||||
|
||||
hk.GroupRoutes("/v1/medication-item-dist", r, auth.GuardMW, hk.MapHandlerFunc{
|
||||
"GET /": medicationitemdist.O.GetList,
|
||||
"GET /{id}": medicationitemdist.O.GetDetail,
|
||||
"POST /": medicationitemdist.O.Create,
|
||||
"PATCH /{id}": medicationitemdist.O.Update,
|
||||
"DELETE /{id}": medicationitemdist.O.Delete,
|
||||
"PATCH /{id}/consume": medicationitemdist.O.Consume,
|
||||
})
|
||||
|
||||
hk.GroupRoutes("/v1/device-order", r, hk.MapHandlerFunc{
|
||||
"GET /": deviceorder.O.GetList,
|
||||
"GET /{id}": deviceorder.O.GetDetail,
|
||||
"POST /": deviceorder.O.Create,
|
||||
"PATCH /{id}": deviceorder.O.Update,
|
||||
"DELETE /{id}": deviceorder.O.Delete,
|
||||
"PATCH /{id}/complete": deviceorder.O.Complete,
|
||||
})
|
||||
|
||||
hk.GroupRoutes("/v1/material-order", r, hk.MapHandlerFunc{
|
||||
"GET /": materialorder.O.GetList,
|
||||
"GET /{id}": materialorder.O.GetDetail,
|
||||
"POST /": materialorder.O.Create,
|
||||
"PATCH /{id}": materialorder.O.Update,
|
||||
"DELETE /{id}": materialorder.O.Delete,
|
||||
"PATCH /{id}/complete": materialorder.O.Complete,
|
||||
})
|
||||
|
||||
hc.RegCrud(r, "/v1/soapi", auth.GuardMW, soapi.O)
|
||||
hc.RegCrud(r, "/v1/adime", auth.GuardMW, adime.O)
|
||||
@@ -152,12 +196,7 @@ func SetRoutes() http.Handler {
|
||||
hc.RegCrud(r, "/v1/pharmacist", pharmacist.O)
|
||||
hc.RegCrud(r, "/v1/prescription", prescription.O)
|
||||
hc.RegCrud(r, "/v1/prescription-item", prescriptionitem.O)
|
||||
hc.RegCrud(r, "/v1/medication", medication.O)
|
||||
hc.RegCrud(r, "/v1/medication-item", medicationitem.O)
|
||||
hc.RegCrud(r, "/v1/medication-item-dist", medicationitemdist.O)
|
||||
hc.RegCrud(r, "/v1/device-order", deviceorder.O)
|
||||
hc.RegCrud(r, "/v1/device-order-item", deviceorderitem.O)
|
||||
hc.RegCrud(r, "/v1/material-order", materialorder.O)
|
||||
hc.RegCrud(r, "/v1/material-order-item", materialorderitem.O)
|
||||
hc.RegCrud(r, "/v1/mcu-order", mcuorder.O)
|
||||
hc.RegCrud(r, "/v1/mcu-order-item", mcuorderitem.O)
|
||||
|
||||
Reference in New Issue
Block a user