package v1 import ( "github.com/gin-gonic/gin" ) import ( "auth-server/common" "auth-server/service" ) func GetPatientType(c *gin.Context) { res, err := service.ProtocolService.GetPatientType(common.GC2GM(c), common.IsEnabled(c)) if err != nil { common.HttpErr(c, err) return } common.HttpSuccess(c, res) } func GetBodyPart(c *gin.Context) { res, err := service.ProtocolService.GetBodyPart(common.GC2GM(c), common.GetQueryString(c, "patient_type"), common.GetQueryString(c, "modality"), common.IsEnabled(c)) if err != nil { common.HttpErr(c, err) return } common.HttpSuccess(c, res) } func GetProcedure(c *gin.Context) { res, err := service.ProtocolService.GetProcedure(common.GC2GM(c), common.GetQueryString(c, "patient_type"), common.GetQueryString(c, "body_part"), common.IsEnabled(c)) if err != nil { common.HttpErr(c, err) return } common.HttpSuccess(c, res) } func GetView(c *gin.Context) { res, err := service.ProtocolService.GetView(common.GC2GM(c), common.GetQueryString(c, "patient_type"), common.GetQueryString(c, "body_part"), common.GetQueryString(c, "procedure_id"), common.IsEnabled(c)) if err != nil { common.HttpErr(c, err) return } common.HttpSuccess(c, res) }