You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB
Java

9 months ago
package com.example.duplicate.controller;
3 months ago
import com.example.duplicate.service.MedicalAdviceService;
9 months ago
import com.example.utils.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @ClassName TaskController
3 months ago
* @Description OFD
9 months ago
* @Author linjj
* @Date 2024/8/5 14:21
* @Version 1.0
*/
@RestController
3 months ago
@RequestMapping("/emr")
@Api(value = "佐医佑康OFD外部接口", tags = "佐医佑康OFD外部接口")
9 months ago
@Slf4j
public class TaskController {
@Autowired
3 months ago
private MedicalAdviceService medicalAdviceService;
@PostMapping("/patientInfoSync")
@ApiOperation("根据出院时间范围上传患者")
9 months ago
@ResponseBody
3 months ago
public CommonResult<?> patientInfoSync(@RequestParam @ApiParam(required = false, name = "startTime", value = "出院时间范围开始" ) String startTime,
@RequestParam @ApiParam(required = false, name = "endTime", value = "出院时间范围结束" ) String endTime) throws Exception {
if (StringUtils.isBlank(startTime)){
return CommonResult.failed("开始时间不能为空");
9 months ago
}
3 months ago
if (StringUtils.isBlank(endTime)){
return CommonResult.failed("结束时间不能为空");
9 months ago
}
3 months ago
return medicalAdviceService.medicalCompensate(startTime,endTime);
9 months ago
}
}