Browse Source

Merge branch 'dev' of huangwenjie/patient-co-management into dev

chenweida 7 years ago
parent
commit
989547584b

+ 10 - 4
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java

@ -208,7 +208,7 @@ public class PrescriptionController extends BaseController{
			@RequestParam(value = "prescriptionCode",required = true) String prescriptionCode)
			@RequestParam(value = "prescriptionCode",required = true) String prescriptionCode)
	{
	{
		try {
		try {
			String re = prescriptionService.executeSickSettle(prescriptionCode,null,null);
			String re = prescriptionService.executeSickSettle(prescriptionCode);
			return Result.success("院内结算确认接口!",re);
			return Result.success("院内结算确认接口!",re);
		} catch (Exception ex) {
		} catch (Exception ex) {
			ex.printStackTrace();
			ex.printStackTrace();
@ -218,10 +218,16 @@ public class PrescriptionController extends BaseController{
	@RequestMapping(value = "fadeRecipe",method = RequestMethod.POST)
	@RequestMapping(value = "fadeRecipe",method = RequestMethod.POST)
	@ApiOperation("挂号作废处方接口")
	@ApiOperation("挂号作废处方接口")
	public Result fadeRecipe(@ApiParam(name="json",value="json",defaultValue = "{}")
								 @RequestParam(value = "json",required = true) String json){
	public Result fadeRecipe(
			@ApiParam(name="visitNo",value="挂号号",defaultValue = "")
			@RequestParam(value = "visitNo",required = true) String visitNo,
			@ApiParam(name="fadeDept",value="科室编码",defaultValue = "")
			@RequestParam(value = "fadeDept",required = true) String fadeDept,
			@ApiParam(name="fadeOperator",value="医生编码",defaultValue = "")
			@RequestParam(value = "fadeOperator",required = true) String fadeOperator
	){
		try {
		try {
			String re = prescriptionService.fadeRecipe(JSONObject.parseObject(json),null,null);
			String re = prescriptionService.fadeRecipe(visitNo,fadeDept,fadeOperator);
			return Result.success("挂号作废处方接口!",re);
			return Result.success("挂号作废处方接口!",re);
		} catch (Exception ex) {
		} catch (Exception ex) {
			ex.printStackTrace();
			ex.printStackTrace();

+ 29 - 29
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -646,13 +646,15 @@ public class PrescriptionService extends ZysoftBaseService{
     */
     */
    public String getDispUnSettleFeeInfoList(String cardNo, String visitNo)  throws Exception
    public String getDispUnSettleFeeInfoList(String cardNo, String visitNo)  throws Exception
    {
    {
        String[] hospitalMapping = getHospitalMapping(null); //获取机构映射
        Prescription prescription = prescriptionDao.findByVisitNo(visitNo);
        String[] hospitalMapping = getHospitalMapping(prescription.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
        String licence = hospitalMapping[1];
        Map<String,String> header = new HashMap<>();
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE","350211A1025");
        header.put("LICENCE","5YGl5bq35LmL6Lev");
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        Map<String,String> params = new HashMap<>();
        Map<String,String> params = new HashMap<>();
        params.put("cardNo",cardNo);
        params.put("cardNo",cardNo);
@ -665,24 +667,21 @@ public class PrescriptionService extends ZysoftBaseService{
    /**
    /**
     * 7.6 院内结算确认接口
     * 7.6 院内结算确认接口
     * @param hospital
     * @param licence
     * @return
     * @param  prescriptionCode 处方号
     * @throws Exception
     * @throws Exception
     */
     */
    public String executeSickSettle(String prescriptionCode, String hospital, String licence)  throws Exception
    public String executeSickSettle(String prescriptionCode)  throws Exception
    {
    {
        if(hospital==null){
            String[] hospitalMapping = getHospitalMapping(null); //获取机构映射
            hospital = hospitalMapping[0];
            licence = hospitalMapping[1];
        }
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        String[] hospitalMapping = getHospitalMapping(prescription.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
        Map<String,String> header = new HashMap<>();
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        header.put("LICENCE",licence);
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        if(prescription == null){
        if(prescription == null){
            throw new Exception("未找到该处方!");
            throw new Exception("未找到该处方!");
        }
        }
@ -697,12 +696,8 @@ public class PrescriptionService extends ZysoftBaseService{
        //拼接结算参数
        //拼接结算参数
        JSONObject json = new JSONObject();
        JSONObject json = new JSONObject();
        json.put("cardNo",prescription.getSsc());// "cardNo": "病人卡号",
        json.put("cardNo",prescription.getSsc());// "cardNo": "病人卡号",
//            "saveDept": "开单科室编码",
//            "REGISTER_TYPE": "挂号类型编码",
//            "RATE_TYPE": "费别类型编码",
        json.put("settleDept","结算科室编码");//结算科室编码--------待处理
        String jwdoctor = doctorMappingDao.findByDocotrCodeAndJwDoctorHospital(prescription.getDoctor(),hospital);
        json.put("saveOperator",jwdoctor);// "saveOperator": "开单人员编码",
        json.put("settleDept",prescription.getJwDeptCode());//结算科室编码
        json.put("saveOperator",prescription.getJwDoctorCode());// "saveOperator": "开单人员编码",
        json.put("visitNo",prescription.getVisitNo());// "院内挂号号,取费用列表中最小的院内挂号号
        json.put("visitNo",prescription.getVisitNo());// "院内挂号号,取费用列表中最小的院内挂号号
        //医保支付需要组装以下参数
        //医保支付需要组装以下参数
@ -741,22 +736,27 @@ public class PrescriptionService extends ZysoftBaseService{
    /**
    /**
     * 挂号作废处方接口
     * 挂号作废处方接口
     * @param json
     * @param hospital
     * @param licence @return
     * @param visitNo 挂号号
     * @param fadeDept  科室编码
     * @param fadeOperator 医生编码
     */
     */
    public String fadeRecipe(JSONObject json, String hospital, String licence) throws Exception{
        if(hospital==null){
            String[] hospitalMapping = getHospitalMapping(null); //获取机构映射
            hospital = hospitalMapping[0];
            licence = hospitalMapping[1];
        }
    public String fadeRecipe(String visitNo, String fadeDept, String fadeOperator) throws Exception{
        Prescription prescription = prescriptionDao.findByVisitNo(visitNo);
        String[] hospitalMapping = getHospitalMapping(prescription.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
        Map<String,String> header = new HashMap<>();
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);
        header.put("ORGCODE",hospital);
        header.put("LICENCE",licence);
        header.put("LICENCE",licence);
        String response = postSecond("fadeRecipe","挂号作废处方接口",null,json,header,false,2);
        Map<String,String> params = new HashMap<>();
        params.put("visitNo",visitNo);
        params.put("fadeDept",fadeDept);
        params.put("fadeOperator",fadeOperator);
        String response = postSecond("fadeRecipe","挂号作废处方接口",params,null,header,false,2);
        return response;
        return response;
    }
    }

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -329,7 +329,6 @@ public class PrescriptionService extends BaseService {
            //根据医保卡号和挂号号从基卫获取待结算明细
            //根据医保卡号和挂号号从基卫获取待结算明细
            String result = jwPrescriptionService.getDispUnSettleFeeInfoList(prescription.getSsc(),prescription.getVisitNo());
            String result = jwPrescriptionService.getDispUnSettleFeeInfoList(prescription.getSsc(),prescription.getVisitNo());
            JSONObject json = new JSONObject();
            if(StringUtils.isNotBlank(result)){
            if(StringUtils.isNotBlank(result)){
                JSONObject jwobj =  JSON.parseObject(result);
                JSONObject jwobj =  JSON.parseObject(result);
@ -360,6 +359,8 @@ public class PrescriptionService extends BaseService {
                    String errormessage = zyCfinfo.getString("MESSAGE");
                    String errormessage = zyCfinfo.getString("MESSAGE");
                    throw new Exception(errormessage);
                    throw new Exception(errormessage);
                }
                }
            }else {
                throw new Exception("请求基卫接口报错,无数据返回!");
            }
            }
            if(!zyInfoCodeAndCost.keySet().isEmpty()){
            if(!zyInfoCodeAndCost.keySet().isEmpty()){