package com.ruoyi.web.work.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.web.work.api.config.BaseController;
import com.ruoyi.web.work.api.util.AppUtil;
import com.ruoyi.web.work.domain.Dg;
import com.ruoyi.web.work.service.IDgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "小程序就诊信息管理")
@RestController
@RequestMapping("/app/dg")
public class Api_DgController extends BaseController {

    @Autowired
    private IDgService dgService;

    @ApiOperation(value = "根据就诊卡号获取用户诊断信息(如主要诊断，次要诊断)")
    @GetMapping("/diagnosis/{card}")
    public TableDataInfo getDgByCard(@PathVariable("card") String card){
        startPage();
        List<Dg> dgList=dgService.getDgByCard(card);
        return getDataTable(dgList);
    }


}
