| 
					
				 | 
			
			
				@ -12,6 +12,7 @@ import com.yihu.jw.im.service.ImService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -632,4 +633,208 @@ public class HcyyPrescriptionCotroller extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return ObjEnvelop.getSuccess("ok",hcyyEntranceService.BrowseSingleEMR(bstrEmrID)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 合理用药审核 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctor 医生id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param diagnosisDOS 诊断json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param infos  药品json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "/hcyyCheckInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "合理用药审核") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hcyyCheckInfo( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "outpatient", value = "就诊表id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "outpatient", defaultValue = "") String outpatient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "payType", value = "付款方式0自费;1医保") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "payType", defaultValue = "") String payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "doctor", value = "医生id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "doctor", defaultValue = "") String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patient", defaultValue = "") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "diagnosisDOS", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "infos", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "infos", defaultValue = "") String infos) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray druginfos = JSONArray.parseArray(infos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < druginfos.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < diagnosis.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hcyyEntranceService.checkPrescriptions(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 处方在医生站系统成功保存后调用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctor 医生id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param diagnosisDOS 诊断json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param infos  药品json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "/hcyySaveCheckInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "处方在医生站系统成功保存后调用") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hcyySaveCheckInfo( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "outpatient", value = "就诊表id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "outpatient", defaultValue = "") String outpatient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "payType", value = "付款方式0自费;1医保") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "payType", defaultValue = "") String payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "doctor", value = "医生id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "doctor", defaultValue = "") String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patient", defaultValue = "") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "diagnosisDOS", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "infos", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "infos", defaultValue = "") String infos) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray druginfos = JSONArray.parseArray(infos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < druginfos.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < diagnosis.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hcyyEntranceService.saveCheck(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 处方保存成功后,发送给审方系统进行人工审方 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctor 医生id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param diagnosisDOS 诊断json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param infos  药品json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "/hcyyValidCheckInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "人工审方") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hcyyValidCheckInfo( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "outpatient", value = "就诊表id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "outpatient", defaultValue = "") String outpatient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "payType", value = "付款方式0自费;1医保") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "payType", defaultValue = "") String payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "doctor", value = "医生id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "doctor", defaultValue = "") String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patient", defaultValue = "") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "diagnosisDOS", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "infos", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "infos", defaultValue = "") String infos) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray druginfos = JSONArray.parseArray(infos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < druginfos.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < diagnosis.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hcyyEntranceService.validCheck(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 删除已保存处方 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctor 医生id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param diagnosisDOS 诊断json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param infos  药品json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "/hcyyDeleteInfo") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "删除已保存处方时调用") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hcyyDeleteInfo( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "outpatient", value = "就诊表id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "outpatient", defaultValue = "") String outpatient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "payType", value = "付款方式0自费;1医保") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "payType", defaultValue = "") String payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "doctor", value = "医生id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "doctor", defaultValue = "") String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patient", defaultValue = "") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "diagnosisDOS", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "infos", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "infos", defaultValue = "") String infos) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray druginfos = JSONArray.parseArray(infos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < druginfos.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < diagnosis.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hcyyEntranceService.deletePrescription(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 医生在对药师打回的处方进行双签处理后,医生站将双签信息推送给审方系统 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param patient 病人id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctor 医生id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param diagnosisDOS 诊断json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param infos  药品json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "/hcyyDoubleSign") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "医生在对药师打回的处方进行双签处理后,医生站将双签信息推送给审方系统") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop hcyyDoubleSign( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "outpatient", value = "就诊表id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "outpatient", defaultValue = "") String outpatient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "prescriptionOnly", value = "处方唯一标识") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "prescriptionOnly", defaultValue = "") String prescriptionOnly, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "payType", value = "付款方式0自费;1医保") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "payType", defaultValue = "") String payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "doctor", value = "医生id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "doctor", defaultValue = "") String doctor, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "patient", value = "病人id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "patient", defaultValue = "") String patient, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "diagnosisDOS", value = "诊断json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "diagnosisDOS", defaultValue = "") String diagnosisDOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "infos", value = "药品json") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "infos", defaultValue = "") String infos) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray druginfos = JSONArray.parseArray(infos); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < druginfos.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionInfoDO wlyyPrescriptionInfo = toEntity(druginfos.get(i).toString(), WlyyPrescriptionInfoDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionInfoDOS.add(wlyyPrescriptionInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray diagnosis = JSONArray.parseArray(diagnosisDOS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (int i = 0; i < diagnosis.size(); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyPrescriptionDiagnosisDO wlyyPrescriptionDiagnosisDO = toEntity(diagnosis.get(i).toString(), WlyyPrescriptionDiagnosisDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyPrescriptionDiagnosisDOS.add(wlyyPrescriptionDiagnosisDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hcyyEntranceService.doubleSign(outpatient,prescriptionOnly,payType,patient,doctor,wlyyPrescriptionInfoDOS,wlyyPrescriptionDiagnosisDOS)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |