|
@ -0,0 +1,51 @@
|
|
|
package com.yihu.wlyy.web.doctor.prescription;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.reply.DoctorQuickReply;
|
|
|
import com.yihu.wlyy.entity.patient.prescription.PrescriptionLog;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by chenweida on 2017/7/27.
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/doctor/prescriptionlog")
|
|
|
@Api("医生端-处方日志")
|
|
|
public class PrescriptionLogController extends BaseController {
|
|
|
@Autowired
|
|
|
private PrescriptionLogService prescriptionLogService;
|
|
|
|
|
|
/**
|
|
|
* 根据处方code获取处方流程
|
|
|
*
|
|
|
* @param prescriptionCode
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getPrescriptionLogs", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取处方流程")
|
|
|
public String addReply(
|
|
|
@RequestParam(required = true) @ApiParam(value = "处方code", name = "prescriptionCode") String prescriptionCode) {
|
|
|
try {
|
|
|
Integer[] types = new Integer[]{12, 21, 31, 41, 100};
|
|
|
List<PrescriptionLog> prescriptionLogs = prescriptionLogService.findPrescriptionLogsByPrescriptionCode(prescriptionCode, types);
|
|
|
if (prescriptionLogs != null) {
|
|
|
return write(200, "获取处方流程成功", "data", prescriptionLogs);
|
|
|
} else {
|
|
|
return error(-1, "获取失败");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "获取失败");
|
|
|
}
|
|
|
}
|
|
|
}
|