| 
					
				 | 
			
			
				@ -1,947 +0,0 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.hospital.endpoint.prescription; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.message.SystemMessageDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.InspectionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.PrescriptionLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.PrescriptionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.prescription.service.entrance.DoctorPreSignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.service.SystemMessage.HospitalSystemMessageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.im.service.ImService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.org.BaseOrgVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.doctor.WlyyDoctorWorkTimeVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.im.ConsultVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ListEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.MixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.wlyy.service.WlyyBusinessService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import net.sf.json.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import net.sf.json.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import javax.servlet.http.HttpServletResponse; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.io.OutputStream; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * Created by Trick on 2019/5/16. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RequestMapping(value = BaseHospitalRequestMapping.Prescription.PREFIX) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Api(value = "在线复诊", description = "在线复诊接口", tags = {"在线复诊接口"}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class PrescriptionEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PrescriptionService prescriptionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private WlyyBusinessService wlyyBusinessService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PrescriptionLogService prescriptionLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private InspectionService inspectionService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DoctorPreSignService doctorPreSignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private HospitalSystemMessageService hospitalSystemMessageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ImService imService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Value("${demo.flag}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private boolean demoFlag; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = " 查询某个时间段的患者门诊就诊记录") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findOutpatientList(@ApiParam(name = "patient", value = "居民id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "patient",required = false) String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "startTime", value = "开始时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "startTime",required = false) String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "endTime", value = "结束时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "endTime",required = false) String endTime) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyOutpatientVO> vos = prescriptionService.findOutpatientList(patient, startTime, endTime, demoFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(vos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOutpatientInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = " 查询单条门诊就诊记录") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findOutpatientInfo(@ApiParam(name = "patient", value = "居民id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "patient",required = false) String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "conNo", value = "就诊次数") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "conNo",required = false) String conNo)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyOutpatientVO obj = prescriptionService.findOutpatientInfo(patient,conNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOriginPrescriptionList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "门诊下所有处方信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findOriginPrescriptionList( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "registerSn", value = "流水号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "registerSn",required = false) String registerSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patNo", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patNo",required = false) String patNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "admNo", value = "住院唯一号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "admNo",required = false) String admNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "realOrder", value = "处方号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "realOrder",required = false) String realOrder) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionVO> obj = prescriptionService.findOriginPrescriptionList(registerSn, patNo, realOrder, admNo,demoFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findOriginPrescription) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "历史处方信息(单条)") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findOriginPrescription( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "registerSn", value = "流水号", required = false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "registerSn",required = false) String registerSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patNo", value = "病人id", required = false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patNo",required = false) String patNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "admNo", value = "住院唯一号", required = false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "admNo",required = false) String admNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "realOrder", value = "处方号", required = false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "realOrder",required = false) String realOrder) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyPrescriptionVO obj = prescriptionService.findOriginPrescription(registerSn, patNo, admNo,realOrder, demoFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPrescriptionList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取续方记录列表", notes = "获取续方记录列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop<WlyyPrescriptionVO,WlyyPrescriptionVO> findPrescriptionList(@ApiParam(name = "patient", value = "居民code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "patient", required = false) String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @ApiParam(name = "status", value = "状态,多状态‘,’分割,例如‘1,2’,‘1,2,3’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "status", required = false)String status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @ApiParam(name = "startTime", value = "开始时间,‘yyyy-MM-dd’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "startTime", required = false)String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "endTime", required = false)String endTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @ApiParam(name = "page", value = "第几页,1开始’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "page", required = false)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                                  @RequestParam(value = "size", required = true) Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.findPrescriptionList(patient,status,startTime,endTime,page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findReOutpatientList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询复诊记录列表", notes = "查询复诊记录列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop<WlyyOutpatientVO,WlyyOutpatientVO> findReOutpatientList(@ApiParam(name = "patient", value = "居民code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "patient", required = true) String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @ApiParam(name = "status", value = "状态:-1取消,0候诊中,1就诊中,2已完成") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "status", required = false) Integer status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @ApiParam(name = "startTime", value = "开始时间,‘yyyy-MM-dd’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "startTime", required = false)String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "endTime", required = false)String endTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @ApiParam(name = "page", value = "第几页,1开始’") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "page", required = false)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                              @RequestParam(value = "size", required = true) Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.findReOutpatientList(patient,status,startTime,endTime,page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findReOutpatientInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询复诊记录,处方,居民信息,物流(单条)", notes = "查询复诊记录,处方,居民信息,物流(单条)") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findReOutpatientInfo(@ApiParam(name = "outpatientId", value = "复诊ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "outpatientId", required = true) String outpatientId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "prescriptionId", value = "处方ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "prescriptionId", required = false) String prescriptionId)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        com.alibaba.fastjson.JSONObject obj =  prescriptionService.findReOutpatientInfo(outpatientId,prescriptionId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPrescriptionInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取所有居民相关信息,续方信息,物流信息,药品信息(单条)", notes = "获取所有居民相关信息,续方信息,物流信息,药品信息(单条)") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop<Map<String,Object>> findPrescriptionInfo(@ApiParam(name = "prescriptionId", value = "续方明细") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                               @RequestParam(value = "prescriptionId", required = false) String prescriptionId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.findPrescriptionInfo(prescriptionId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.checkPrescription) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "判断是否可续方,true 可以,false不可以", notes = "判断是否可续方,true 可以,false不可以") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop<Boolean> checkPrescription(@ApiParam(name = "patient", value = "续方明细") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                               @RequestParam(value = "patient", required = false) String patient) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.checkPrescription(patient)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.cancelPrescription) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "居民取消续方", notes = "居民取消续方") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop<Boolean> cancelPrescription(@ApiParam(name = "prescriptionId", value = "续方ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                      @RequestParam(value = "prescriptionId", required = false) String prescriptionId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.cancelPrescription(prescriptionId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientCard) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询患者就诊卡", notes = "查询患者就诊卡") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findPatientCard(@ApiParam(name = "patient", value = "居民Code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "patient", required = true)String patient)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findPatientCard(patient)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOutpatient) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "判断是否可用发起门诊", notes = "判断是否可用发起门诊") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop checkOutpatient(@ApiParam(name = "patient", value = "续方明细") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "patient", required = true)String patient)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.checkOutpatient(patient)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findAllHospital) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询所有机构", notes = "查询所有机构") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findAllHospital(@ApiParam(name = "level", value = "医院等级") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "level", required = false)Integer level) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findAllHospital(level)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDeptByHospital) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询机构底下部门", notes = "查询机构底下部门") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDeptByHospital(@ApiParam(name = "orgCode", value = "机构code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(value = "orgCode", required = true)String orgCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "dept", value = "需要置顶部门") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(value = "dept", required = false)String dept, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "consultDeptFlag", value = "1为查询开通服务部门") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(value = "consultDeptFlag", required = false)String consultDeptFlag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDeptByHospital(orgCode,dept,consultDeptFlag)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorByHospitalAndDept) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询部门下医生", notes = "查询部门下医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDoctorByHospitalAndDept(@ApiParam(name = "orgCode", value = "机构code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "orgCode", required = false)String orgCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "dept", value = "部门code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "dept", required = false)String dept, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "chargeType", required = false)String chargeType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "doctorCode", value = "需要置顶医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "doctorCode", required = false)String doctorCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "outpatientType", value = "1图文,2视频") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "outpatientType", required = false)String outpatientType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "startDate", value = "开始时间,yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "startDate", required = false)String startDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "endDate", value = "结束时间,yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "endDate", required = false)String endDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "key", value = "关键字搜索,医生名字/科室名称/专长") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "key", required = false)String key, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @ApiParam(name = "consultStatus", value = "是否在线") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                   @RequestParam(value = "consultStatus", required = false)String consultStatus) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorByHospitalAndDept(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.appointmentRevisit) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "居民发起复诊", notes = "居民发起复诊") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop appointmentRevisit(@ApiParam(name = "outpatientJson", value = "居民门诊json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "outpatientJson", required = false)String outpatientJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "expressageJson", value = "居民物流json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "expressageJson", required = false)String expressageJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "registerJson", value = "预约时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "registerJson", required = false)String registerJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "chargeType", value = "预约实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "chargeType", required = false)String chargeType)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //发送系统消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //发送IM消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        hospitalSystemMessageService.sendImMessage(systemMessageDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //发送医生抢单消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取ICD10诊断编码", notes = "获取ICD10诊断编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getICD10(@ApiParam(name = "pyKey", value = "拼音关键字") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                @RequestParam(value = "pyKey", required = false)String pyKey)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getICD10(pyKey)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDrugDictionary) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取药品字典", notes = "获取药品字典") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getDrugDictionary(@ApiParam(name = "drugNo", value = "药品编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "drugNo", required = false)String drugNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "pyKey", value = "拼音关键字") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "pyKey", required = false)String pyKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "winNo", value = "分部编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "winNo", required = false)String winNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "groupNo", value = "药房编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "groupNo", required = false)String groupNo)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getDrugDictionary(drugNo,pyKey,winNo,groupNo)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDrugUse) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取用法", notes = "获取用法") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getDrugUse(@ApiParam(name = "pyKey", value = "拼音关键字") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "pyKey", required = false)String pyKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @ApiParam(name = "drugNo", value = "药品编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "drugNo", required = false)String drugNo)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getDrugUse(drugNo,pyKey)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDrugFrequency) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取用药频次", notes = "获取用药频次") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getDrugFrequency()throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getDrugFrequency()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.makeDiagnosis) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "下诊断", notes = "下诊断接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop makeDiagnosis(@ApiParam(name = "outPatientId", value = "门诊编号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "outPatientId", required = true)String outPatientId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "advice", value = "医嘱") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "advice", required = false)String advice, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "type", value = "1需要提交his,2不提交只下诊断") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "type", required = true)String type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "infoJsons", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "infoJsons", required = false)String infoJsons, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "diagnosisJson", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "diagnosisJson", required = true)String diagnosisJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "inspectionJson", value = "检查检验") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "inspectionJson", required = false)String inspectionJson)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.makeDiagnosis(outPatientId,advice,type,infoJsons,diagnosisJson,inspectionJson)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findExpressageList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取订单列表", notes = "获取订单列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop findExpressageList(@ApiParam(name = "status", value = "流程状态,多状态用‘,’分割") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "status", required = false)String status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "oneselfPickupFlg", value = "是否自取 1是 0否") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "oneselfPickupFlg", required = false)String oneselfPickupFlg, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "nameKey", value = "配送员名称") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "nameKey", required = false)String nameKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "startTime", required = false)String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "endTime", required = false)String endTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "page", value = "第几页,1开始") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "page", required = false)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "size", required = false)Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.setMailno) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "设置订单编号", notes = "设置订单编号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop setMailno(@ApiParam(name = "mailno", value = "订单号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                @RequestParam(value = "mailno", required = false)String mailno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                @ApiParam(name = "expressageId", value = "订单id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                @RequestParam(value = "expressageId", required = false)String expressageId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.setMailno(mailno,expressageId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.pushListWrite) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "订单导出", notes = "订单导出") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public void pushListWrite(@ApiParam(name = "status", value = "流程状态,多状态用‘,’分割") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "status", required = false)String status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @ApiParam(name = "oneselfPickupFlg", value = "是否自取 1是 0否") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "oneselfPickupFlg", required = false)String oneselfPickupFlg, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @ApiParam(name = "nameKey", value = "配送员名称") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "nameKey", required = false)String nameKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @ApiParam(name = "startTime", value = "开始时间,yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "startTime", required = false)String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "endTime", required = false)String endTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    HttpServletResponse response) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        MixEnvelop expressages = prescriptionService.findExpressageList(status,oneselfPickupFlg,nameKey,startTime,endTime,1,10000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> list = expressages.getDetailModelList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        response.setContentType("octets/stream"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        response.setHeader("Content-Disposition", "attachment; filename="+ new String( "pushDataList.xls")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        OutputStream os = response.getOutputStream(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        prescriptionService.pushListWrite(os,list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByDeptTypeCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "就诊费用查询", notes = "就诊费用查询") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findByDeptTypeCode(@ApiParam(name = "deptTypeCode", value = "6总部7金榜8夏禾") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                @RequestParam(value = "deptTypeCode", required = false)String deptTypeCode) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findByDeptTypeCode(deptTypeCode)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getCardInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取卡信息", notes = "获取卡信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getCardInfo(@ApiParam(name = "cardNo", value = "卡号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "cardNo", required = false)String cardNo) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getCardInfo(cardNo,demoFlag)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorWithWork) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询医生带排班", notes = "查询医生带排班") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findDoctorWithWork(@ApiParam(name = "orgCode", value = "机构code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "orgCode", required = false)String orgCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "dept", value = "部门code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "dept", required = false)String dept, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "doctorCode", value = "需要置顶医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "doctorCode", required = false)String doctorCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "chargeType", required = false)String chargeType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "outpatientType", value = "1图文,2视频") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "outpatientType", required = false)String outpatientType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "startDate", value = "开始时间,yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "startDate", required = false)String startDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "endDate", value = "结束时间,yyyy-MM-dd HH:mm:ss") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "endDate", required = false)String endDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "key", value = "关键字搜索,医生名字/科室名称/专长") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "key", required = false)String key, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "consultStatus", value = "是否在线") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "consultStatus", required = false)String consultStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "page", value = "第几页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "page", required = true)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "size", required = true)Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorWithWork(orgCode,dept,chargeType,doctorCode,outpatientType,startDate,endDate,key,consultStatus,page,size)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorWithMouthWork) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询医生列表带月份排班状态", notes = "查询医生列表带月份排班状态") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findDoctorWithMouthWork(@ApiParam(name = "orgCode", value = "机构code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "orgCode", required = true)String orgCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "dept", value = "部门code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "dept", required = false)String dept, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "date", value = "yyyy-MM") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "date", required = true)String date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "chargeType", required = false)String chargeType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "nameKey", value = "名字关键字") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "nameKey", required = false)String nameKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "page", value = "第几页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "page", required = true)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "size", required = true)Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorWithMouthWork(orgCode,dept,chargeType,date,nameKey,page,size)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWorkTimeInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取具体号源", notes = "获取具体号源") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findWorkTimeInfo(@ApiParam(name = "id", value = "排班id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @RequestParam(value = "id", required = false)String id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findWorkTimeInfo(id)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生信息", notes = "获取医生信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findDoctorInfo(@ApiParam(name = "doctor", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "doctor", required = true)String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @ApiParam(name = "withWork", value = "传1带排班,其他不带") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "withWork", required = false)String withWork){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorInfo(doctor,withWork)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorBaseInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生基本信息信息", notes = "获取医生基本信息信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findDoctorBaseInfo(@ApiParam(name = "doctor", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "doctor", required = true)String doctor){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorBaseInfo(doctor)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.cancelOutPatient) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "取消复诊", notes = "取消复诊") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop cancelOutPatient(@ApiParam(name = "outPatientId", value = "门诊记录") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "outPatientId", required = false)String outPatientId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name = "cancelType", value = "取消原因类型") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "cancelType", required = false)String cancelType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name = "cancelValue", value = "取消原因名称") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "cancelValue", required = false)String cancelValue, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name = "cancelRemark", value = "取消原因详细说明") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "cancelRemark", required = false)String cancelRemark) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.cancelOutPatient(outPatientId,cancelType,cancelValue,cancelRemark,1)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findCancelReasonList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取居民取消原因字典", notes = "获取居民取消原因字典") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findCancelReasonList(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findCancelReasonList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findFastRegisterDate) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "獲取快速咨詢時間", notes = "獲取快速咨詢時間") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findFastRegisterDate(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findFastRegisterDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByTimeSlot) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取快速咨询时间分段", notes = "获取快速咨询时间分段") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findByTimeSlot(@ApiParam(name = "startTime", value = "开始时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "startTime", required = false)String startTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "endTime", value = "结束时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "endTime", required = false)String endTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findByTimeSlot(startTime,endTime)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorWorkTimeByMonth) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询某个医生某个月份排班记录", notes = "查询某个医生某个月份排班记录") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDoctorWorkTimeByMonth(@ApiParam(name = "doctor", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @RequestParam(value = "doctor", required = true)String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @ApiParam(name = "date", value = "年份和月份,yyyy-MM") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @RequestParam(value = "date", required = false)String date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @ApiParam(name = "startDate", value = "yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @RequestParam(value = "startDate", required = false)String startDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @ApiParam(name = "endDate", value = "yyyy-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 @RequestParam(value = "endDate", required = false)String endDate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorWorkTimeByMonth(doctor,date,startDate,endDate)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWorkRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询排班规则", notes = "查询排班规则") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findWorkRule(@ApiParam(name = "hospital", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "hospital", required = true)String hospital) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findWorkRule("Scheduling",hospital)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.updateWorkRule) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "保存排班规则", notes = "保存排班规则") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop updateWorkRule(@ApiParam(name = "workRoleJsons", value = "排班规则json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "workRoleJsons", required = true)String workRoleJsons) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.updateWorkRule(workRoleJsons)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.saveDoctorWorkTimeJson) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "排班批量保存接口", notes = "排班批量保存接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop saveDoctorWorkTimeJson(@ApiParam(name = "type", value = "1.全医院,2.科室,3.医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "type", required = true)String type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @ApiParam(name = "codes", value = "1.医院code,2.科室code,‘,’分割,3.医生code,‘,’分割") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "codes", required = true)String codes, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @ApiParam(name = "workTimeJson", value = "排班列表json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "workTimeJson", required = true)String workTimeJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @ApiParam(name = "date", value = "yyyy-MM,支持‘,’分割") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "date", required = false)String date)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.saveDoctorWorkTimeJson(type,codes,workTimeJson,date)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "test") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "test", notes = "test") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop test()throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.test()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "test2") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "test2", notes = "test2") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop test(String no)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.test2(no)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取居民信息接口", notes = "获取居民信息接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findPatientInfo(@ApiParam(name = "patient", value = "居民ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "patient", required = true)String patient){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findPatientInfo(patient)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.saveDoctorOnlineWork) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "保存在线排班", notes = "保存在线排班") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop saveDoctorOnlineWork(@ApiParam(name = "onlineWorkJson", value = "保存在线排班json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @RequestParam(value = "onlineWorkJson", required = true)String onlineWorkJson)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.saveDoctorOnlineWork(onlineWorkJson); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.delDoctorOnlineWork) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "删除在线排班", notes = "删除在线排班") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop delDoctorOnlineWork(@ApiParam(name = "id", value = "保存在线排班ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "id", required = true)String id)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.delDoctorOnlineWork(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorOnlineWorkList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询医生在线排班", notes = "查询医生在线排班") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDoctorOnlineWorkList(@ApiParam(name = "doctor", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @RequestParam(value = "doctor", required = true)String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @ApiParam(name = "startDate", value = "开始时间,YYYY-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @RequestParam(value = "startDate", required = true)String startDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @ApiParam(name = "endDate", value = "结束时间,YYYY-MM-dd") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @RequestParam(value = "endDate", required = true)String endDate)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorOnlineWorkList(doctor,startDate,endDate)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.cooperativeOutpatient) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "发起协同门诊", notes = "发起协同门诊") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop cooperativeOutpatient(@ApiParam(name = "outpatientJson", value = "复诊实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "outpatientJson", required = true)String outpatientJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "registerJson", value = "预约实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "registerJson", required = false)String registerJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "chargeType", required = false)String chargeType)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //构建系统消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //发送系统消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        hospitalSystemMessageService.sendImMessage(systemMessageDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //发送医生抢单消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isBlank(wlyyOutpatientDO.getDoctor())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            hospitalSystemMessageService.sendImPichCheckMessage(wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyOutpatientDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.saveOutpatientDoctor) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "设置门诊医生", notes = "设置门诊医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop saveOutpatientDoctor(@ApiParam(name = "outpatientJson", value = "复诊实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "outpatientJson", required = true)String outpatientJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @ApiParam(name = "registerJson", value = "预约实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "registerJson", required = false)String registerJson, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             @RequestParam(value = "chargeType", required = false)String chargeType)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.saveOutpatientDoctor(outpatientJson,registerJson,chargeType)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.checkOauthQRCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "验证授权", notes = "验证授权") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop checkOauthQRCode(@ApiParam(name = "authorizeNo", value = "流水编号") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "authorizeNo", required = true)String authorizeNo)throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.checkOauthQRCode(authorizeNo)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByGeneralDoctor) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "全科医生协同门诊列表", notes = "全科医生协同门诊列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop findByGeneralDoctor(@ApiParam(name = "generalDoctor", value = "全科医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "generalDoctor", required = true)String generalDoctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "startDate", value = "开始时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "startDate", required = false)String startDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "endDate", value = "结束时间") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "endDate", required = false)String endDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "status", value = "状态") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "status", required = false)String status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "sort", value = "排序") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "sort", required = false)String sort, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "page", value = "第几页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "page", required = true)Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @ApiParam(name = "size", value = "每页大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                           @RequestParam(value = "size", required = true)Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return prescriptionService.findByGeneralDoctor(generalDoctor,startDate,endDate,status,sort,page,size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findGeneralDoctorInfo) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "全科医生首页统计信息", notes = "全科医生首页统计信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop findGeneralDoctorInfo(@ApiParam(name = "generalDoctor", value = "全科医生") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "generalDoctor", required = true)String generalDoctor) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findGeneralDoctorInfo(generalDoctor)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.sendWlyyOutpatientMes) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "发送i健康系统消息", notes = "发送i健康系统消息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop sendWlyyOutpatientMes(@ApiParam(name = "doctor", value = "全科医生Id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "doctor", required = true)String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @ApiParam(name = "outPatientId", value = "门诊id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "outPatientId", required = true)String outPatientId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyBusinessService.sendWlyyOutpatientMes(doctor,outPatientId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.readWlyyOutpatientMes) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "设置I健康消息已读", notes = "设置I健康消息已读") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop readWlyyOutpatientMes(@ApiParam(name = "outPatientId", value = "门诊id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "outPatientId", required = true)String outPatientId){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyBusinessService.readWlyyOutpatientMes(outPatientId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    //=========== 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getTodayOutpatinetList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "居民获取当日就诊列表", notes = "居民获取当日就诊列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getTodayOutpatinetList(@ApiParam(name = "patient", value = "居民ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                  @RequestParam(value = "patient", required = true) String patient){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getTodayOutpatinetList(patient)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorMapping) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生mappingcode", notes = "获取医生mappingcode") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getDoctorMapping(@ApiParam(name = "doctor", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "doctor", required = true)String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @ApiParam(name = "orgCode", value = "机构code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "orgCode", required = true)String orgCode){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getDoctorMapping(doctor,orgCode)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getInspectionDictionary) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取检查检验", notes = "获取检查检验") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getInspectionDictionary(@ApiParam(name = "pyKey", value = "拼音码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              @RequestParam(value = "pyKey", required = false)String pyKey, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              @ApiParam(name = "winNo", value = "6总部7金榜8夏禾") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              @RequestParam(value = "winNo", required = true)String winNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              @ApiParam(name = "codes", value = "检查检验收费码codes,用逗号分割") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                              @RequestParam(value = "codes", required = false)String codes)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getInspectionDictionary(pyKey,codes,winNo)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPrescriptionLogByPreId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询处方日志", notes = "查询处方日志") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findPrescriptionLogByPreId(@ApiParam(name = "prescriptionCode", value = "处方code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                               @RequestParam(value = "prescriptionCode", required = true)String prescriptionCode)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionLogService.findPrescriptionLogByPreId(prescriptionCode)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByPartsCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询部位字典", notes = "查询部位字典") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findByPartsCode(@ApiParam(name = "parentCode", value = "父节点ID,第一层为0") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                  @RequestParam(value = "parentCode", required = true)String parentCode)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(inspectionService.findByPartsCode(parentCode)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDictByName) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询检查检验字典", notes = "查询检查检验字典") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDictByName(@ApiParam(name = "hospital", value = "医院") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "hospital", required = true)String hospital, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "name", value = "字典名称,类型:InspectionType;固定液体 :InspectionFixativeType") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "name", required = true)String name)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(inspectionService.findDictByName(hospital,name)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getJymb) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "检验模板接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getJymb(@ApiParam(name = "bz_code", value = "入参条件为第一节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "bz_code",defaultValue = "") String bz_code, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "tc_no", value = "二级节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "tc_no",defaultValue = "") String tc_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @ApiParam(name = "flag", value = "入参条件为第一节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                               @RequestParam(value = "flag",defaultValue = "1") String flag) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getJymb(bz_code,tc_no,flag)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getJcmb) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "检查模板接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getJcmb( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "bz_code", value = "入参条件为第一节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "bz_code",defaultValue = "") String bz_code, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "tc_no", value = "二级节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "tc_no",defaultValue = "") String tc_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "flag", value = "入参条件为第一节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "flag",defaultValue = "1") String flag) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getJcmb(bz_code,tc_no,flag)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getTcChild) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "套餐子项目字典接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getTcChild( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "parent_code", value = "入参条件为子项目编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "parent_code",defaultValue = "") String parent_code) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getTcChild(parent_code)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getInsChild) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "主项目绑定子项目字典接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getInsChild( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "zd_charge_code", value = "入参条件为项目代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "zd_charge_code",defaultValue = "") String zd_charge_code) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getInsChild(zd_charge_code)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getTcxz) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "套餐选择接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop getTcxz( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "bz_code", value = "入参条件为收费项目代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "bz_code",defaultValue = "") String charge_code, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "tc_no", value = "二级节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "tc_no",defaultValue = "") String tc_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "flag", value = "入参条件为第一节点代码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "flag",defaultValue = "1") String flag) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getTcxz(charge_code,tc_no,flag)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorPreSign) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生签名") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getDoctorPreSign(@ApiParam(name = "doctor", value = "医生编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         @RequestParam(value = "doctor",required = false) String doctor)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(doctorPreSignService.getDoctorSign(doctor)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getDoctorIntroduction) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生简介") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop getDoctorIntroduction(@ApiParam(name = "doctor", value = "医生编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(value = "doctor",required = false) String doctor)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.getDoctorIntroduction(doctor)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findByDict) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "查询医院字典", notes = "查询医院字典") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findByDict(@ApiParam(name = "name", value = "字典名称") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "name", required = true)String name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @ApiParam(name = "hospital", value = "医生code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                  @RequestParam(value = "hospital", required = true)String hospital) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findByDict(name,hospital)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.getPatientAccetokenByIdcard) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "根据居民CODE换取居民请求秘钥") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop getPatientAccetokenByIdcard(@ApiParam(name = "patientCode", value = "居民CODE") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(value = "patientCode",required = true) String patientCode)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWlyyPatient) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取居民信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop findWlyyPatient(@ApiParam(name = "idcard", value = "idcard") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                               @RequestParam(value = "idcard",required = true) String idcard)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(wlyyBusinessService.findWlyyPatient(idcard)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientListBySscOrIdCard) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取居民身份证信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop findPatientListBySscOrIdCard(@ApiParam(name = "idcard", value = "idcard") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @RequestParam(value = "idcard",required = false) String idcard, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @ApiParam(name = "ssc", value = "社保卡") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                @RequestParam(value = "ssc",required = false) String ssc)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(idcard)&&idcard.length()>=6){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(wlyyBusinessService.findPatientListBySscOrIdCard(idcard,null)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(ssc)&&ssc.length()>=6){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return success(wlyyBusinessService.findPatientListBySscOrIdCard(null,ssc)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return failed("身份证或医保卡格式有误"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.makeBase64Qrcode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生二维码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop makeBase64Qrcode(@ApiParam(name = "doctor", value = "医生ID") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    @RequestParam(value = "doctor",required = true) String doctor)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success("获取医生二维码成功",wlyyBusinessService.makeBase64Qrcode(doctor)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.doctorUpcomingList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "医生待办事项列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop doctorUpcomingList(@ApiParam(name = "doctorCode", value = "医生CODE") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "doctorCode",required = true) String doctorCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @ApiParam(name = "type", value = "类型:1.视频复诊(16)、2.专科协同(12)、3.图文复诊(9)、4.专家咨询(1,15)") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                      @RequestParam(value = "type",required = true) String type)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        com.alibaba.fastjson.JSONArray array = new com.alibaba.fastjson.JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<ConsultVO> data = imService.doctorUpcomingList(doctorCode, type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (data != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (ConsultVO consult : data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (consult == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("id", consult.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置咨询类型:1专家咨询,9在线复诊,待扩展,13协同门诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("type", consult.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				// 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                //如果是协同门诊,多返回全科医生的详细信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                if(13 == consult.getType() && StringUtils.isNoneBlank(consult.getGeneralDoctor())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(consult.getGeneralDoctor()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                    json.put("generalDoctorName", baseDoctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置显示标题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("title", consult.getTitle()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置主诉 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("symptoms", consult.getSymptoms()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 咨询状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("status", consult.getStatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置咨询日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("czrq", DateUtil.dateToStrLong(consult.getCzrq())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //是否评价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("evaluate", consult.getEvaluate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //患者ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("patientId", consult.getPatientId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //患者性别 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("patientsex", consult.getPatientsex()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //患者姓名 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("patientName", consult.getPatientName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //患者年龄 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("patientAge", DateUtil.getAgeForIdcard(consult.getPatientIdcard())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //就诊记录ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("outpatientId", consult.getOutpatientid()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //就诊记录状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("outpatientstatus", consult.getOutpatientstatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 设置咨询日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("registerDate", DateUtil.dateToStrLong(consult.getRegisterDate())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //图文或者视频类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("consultType", consult.getConsultType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //诊断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("icd10Name", consult.getIcd10Name()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if("1,15".equals(type)){//专家咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if(1 == consult.getType()){//专家咨询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        json.put("session_id", consult.getPatientId()+"_"+ consult.getDoctorCode()+"_1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else if(15 == consult.getType()){//家医求助 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        json.put("session_id", consult.getPatientId()+"_"+ consult.getGeneralDoctor()+"_"+ consult.getDoctorCode()+"_15"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else{} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else if("9".equals(type)){//图文复诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("session_id", consult.getPatientId()+"_"+ consult.getOutpatientid()+"_9"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("type",type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else if("16".equals(type)){//视频复诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("session_id", consult.getPatientId()+"_"+ consult.getOutpatientid()+"_16"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("type",type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else if("12".equals(type)){//协同门诊 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("session_id", consult.getPatientId()+"_"+ consult.getOutpatientid()+"_12"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("type",type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else{} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                array.add(json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(array); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.Prescription.setRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "his建立档案与互联网医院账户同步") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop setRecord(@ApiParam(name = "json", value = "档案实体json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             @RequestParam(value = "json",required = true) String json, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             @ApiParam(name = "type", value = "1.需要his建档,2.仅同步互联网医院账户") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             @RequestParam(value = "type",required = true)String type)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.setRecord(json,type)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findPatientRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取HIIS居民档案信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop findPatientRecord(@ApiParam(name = "idcard", value = "居民身份证") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "idcard",required = false) String idcard, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @ApiParam(name = "patient", value = "居民code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "patient",required = false)String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @ApiParam(name = "admitNum", value = "就诊次数") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "admitNum",required = false)String admitNum, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @ApiParam(name = "ybcard", value = "医保卡") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     @RequestParam(value = "ybcard",required = false)String ybcard)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findPatientRecord(idcard,patient,admitNum,ybcard)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorByName) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取医生信息") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop findDoctorByName(@ApiParam(name = "hospital", value = "医院code") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @RequestParam(value = "hospital",required = false)String hospital, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @ApiParam(name = "name", value = "医生名称") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @RequestParam(value = "name",required = false)String name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @ApiParam(name = "chargeType", value = "号别") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                        @RequestParam(value = "chargeType",required = false)String chargeType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(prescriptionService.findDoctorByName(hospital,name,chargeType)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |