1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package v1
- import (
- "github.com/gin-gonic/gin"
- )
- import (
- "auth-server/common"
- "auth-server/service"
- )
- func GetPatientTypeList(c *gin.Context) {
- res, err := service.ProtocolClient.GetPatientTypeList(common.GC2GM(c), common.IsEnabled(c))
- if err != nil {
- common.HttpErr(c, err)
- return
- }
- common.HttpSuccess(c, res)
- }
- func GetBodyPartList(c *gin.Context) {
- res, err := service.ProtocolClient.GetBodyPartList(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 GetProcedureList(c *gin.Context) {
- res, err := service.ProtocolClient.GetProcedureList(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 GetViewList(c *gin.Context) {
- res, err := service.ProtocolClient.GetViewList(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)
- }
- func GetView(c *gin.Context) {
- id := c.Param("id")
- res, err := service.ProtocolClient.GetView(common.GC2GM(c), &id)
- if err != nil {
- common.HttpErr(c, err)
- return
- }
- common.HttpSuccess(c, res)
- }
- func GetAprByView(c *gin.Context) {
- id := c.Param("id")
- res, err := service.ProtocolClient.GetApr(common.GC2GM(c), &id, nil, common.IsEnabled(c))
- if err != nil {
- common.HttpErr(c, err)
- return
- }
- common.HttpSuccess(c, res)
- }
- func GetApr(c *gin.Context) {
- id := c.Param("id")
- res, err := service.ProtocolClient.GetApr(common.GC2GM(c), nil, &id, common.IsEnabled(c))
- if err != nil {
- common.HttpErr(c, err)
- return
- }
- common.HttpSuccess(c, res)
- }
|