merge branch 'migration into feat/vehicle-src-75

.
This commit is contained in:
vanilia
2025-10-20 08:54:30 +07:00
102 changed files with 4661 additions and 276 deletions
@@ -39,6 +39,7 @@ import (
person "simrs-vx/internal/interface/main-handler/person"
personaddress "simrs-vx/internal/interface/main-handler/person-address"
personcontact "simrs-vx/internal/interface/main-handler/person-contact"
personinsurance "simrs-vx/internal/interface/main-handler/person-insurance"
pharmacist "simrs-vx/internal/interface/main-handler/pharmacist"
user "simrs-vx/internal/interface/main-handler/user"
@@ -116,7 +117,6 @@ func SetRoutes() http.Handler {
r.HandleFunc("/", home.Home)
r.HandleFunc("POST /v1/authentication/login", auth.Login)
// r.HandleFunc("POST /v1/authentication/logout", auth.Logout)
hk.Route("POST /v1/authentication/logout", r, auth.GuardMW, auth.Logout)
hc.RegCrud(r, "/v1/practice-schedule", practiceschedule.O)
hc.RegCrud(r, "/v1/counter", counter.O)
@@ -162,7 +162,7 @@ func SetRoutes() http.Handler {
"DELETE /{id}": mcuordersubitem.O.Delete,
"PATCH /{id}/complete": mcuordersubitem.O.Complete,
})
hk.GroupRoutes("/v1/encounter", r, hk.MapHandlerFunc{
hk.GroupRoutes("/v1/encounter", r, auth.GuardMW, hk.MapHandlerFunc{
"GET /": encounter.O.GetList,
"GET /{id}": encounter.O.GetDetail,
"POST /": encounter.O.Create,
@@ -244,6 +244,7 @@ func SetRoutes() http.Handler {
hc.RegCrud(r, "/v1/person", person.O)
hc.RegCrud(r, "/v1/person-address", personaddress.O)
hc.RegCrud(r, "/v1/person-contact", personcontact.O)
hc.RegCrud(r, "/v1/person-insurance", personinsurance.O)
hc.RegCrud(r, "/v1/employee", employee.O)
hc.RegCrud(r, "/v1/doctor", doctor.O)
hc.RegCrud(r, "/v1/nurse", nurse.O)
@@ -259,13 +260,14 @@ func SetRoutes() http.Handler {
"PATCH /{id}/active": user.O.Active,
})
hk.GroupRoutes("/v1/patient", r, hk.MapHandlerFunc{
"GET /": patient.O.GetList,
"GET /{id}": patient.O.GetDetail,
"POST /": patient.O.Create,
"PATCH /{id}": patient.O.Update,
"DELETE /{id}": patient.O.Delete,
"GET /by-identifier": patient.O.Search,
"POST /{id}/upload": patient.O.Upload,
"GET /": patient.O.GetList,
"GET /{id}": patient.O.GetDetail,
"POST /": patient.O.Create,
"PATCH /{id}": patient.O.Update,
"DELETE /{id}": patient.O.Delete,
"GET /search/{keyword}": patient.O.Search,
"GET /by-resident-identity": patient.O.SearchByResidentIdentity,
"POST /{id}/upload": patient.O.Upload,
})
/******************** sources ********************/