protocol.go 615 B

1234567891011121314151617181920212223242526272829303132
  1. package v1
  2. import (
  3. "github.com/gin-gonic/gin"
  4. )
  5. import (
  6. "auth-server/common"
  7. "auth-server/service"
  8. )
  9. func GetPatientType(c *gin.Context) {
  10. res, err := service.ProtocolService.GetPatientType(common.GC2GM(c), common.IsEnabled(c))
  11. if err != nil {
  12. common.HttpErr(c, err)
  13. return
  14. }
  15. common.HttpSuccess(c, res)
  16. }
  17. func GetBodyPart(c *gin.Context) {
  18. res, err := service.ProtocolService.GetBodyPart(common.GC2GM(c),
  19. common.GetQueryString(c, "patient_type"),
  20. common.GetQueryString(c, "category"),
  21. common.IsEnabled(c))
  22. if err != nil {
  23. common.HttpErr(c, err)
  24. return
  25. }
  26. common.HttpSuccess(c, res)
  27. }