|  | @ -1,14 +1,12 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.hospital.endpoint.prescription;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 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.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.hospital.service.SystemMessage.HospitalSystemMessageService;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.Envelop;
 | 
	
	
		
			
				|  | @ -21,8 +19,6 @@ 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;
 | 
	
	
		
			
				|  | @ -56,6 +52,9 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DoctorPreSignService doctorPreSignService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private HospitalSystemMessageService hospitalSystemMessageService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Value("${demo.flag}")
 | 
	
		
			
				|  |  |     private boolean demoFlag;
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -241,7 +240,15 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |                                          @RequestParam(value = "registerJson", required = false)String registerJson,
 | 
	
		
			
				|  |  |                                          @ApiParam(name = "chargeType", value = "预约实体json")
 | 
	
		
			
				|  |  |                                          @RequestParam(value = "chargeType", required = false)String chargeType)throws Exception {
 | 
	
		
			
				|  |  |         return success(BaseHospitalRequestMapping.Prescription.api_success,prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson,expressageJson,registerJson,chargeType);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //发送系统消息
 | 
	
		
			
				|  |  |         SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |         //发送IM消息
 | 
	
		
			
				|  |  |         hospitalSystemMessageService.sendImMessage(systemMessageDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return success(BaseHospitalRequestMapping.Prescription.api_success,wlyyOutpatientDO);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @GetMapping(value = BaseHospitalRequestMapping.Prescription.getICD10)
 | 
	
	
		
			
				|  | @ -563,7 +570,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |                                             @RequestParam(value = "registerJson", required = false)String registerJson,
 | 
	
		
			
				|  |  |                                             @ApiParam(name = "chargeType", value = "号别")
 | 
	
		
			
				|  |  |                                             @RequestParam(value = "chargeType", required = false)String chargeType)throws Exception {
 | 
	
		
			
				|  |  |         return success(prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType));
 | 
	
		
			
				|  |  |         WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.cooperativeOutpatient(outpatientJson,registerJson,chargeType);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //构建系统消息
 | 
	
		
			
				|  |  |         SystemMessageDO systemMessageDO = prescriptionService.sendOutPatientMes(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |         //发送系统消息
 | 
	
		
			
				|  |  |         hospitalSystemMessageService.sendImMessage(systemMessageDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return success(wlyyOutpatientDO);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = BaseHospitalRequestMapping.Prescription.saveOutpatientDoctor)
 |