You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					128 lines
				
				3.9 KiB
			
		
		
			
		
	
	
					128 lines
				
				3.9 KiB
			| 
											3 years ago
										 | package com.ynxbd.common.dao.his;
 | ||
|  | 
 | ||
|  | import com.ynxbd.common.bean.enums.MerchantEnum;
 | ||
|  | import com.ynxbd.common.helper.common.DateHelper;
 | ||
|  | import com.ynxbd.common.helper.his.HisEnum;
 | ||
|  | import com.ynxbd.common.helper.his.HisHelper;
 | ||
|  | import com.ynxbd.common.result.JsonResult;
 | ||
|  | 
 | ||
|  | import java.math.BigDecimal;
 | ||
|  | import java.util.HashMap;
 | ||
|  | import java.util.Map;
 | ||
|  | 
 | ||
|  | /**
 | ||
|  |  * 住院接口
 | ||
|  |  *
 | ||
|  |  * @Author wsq
 | ||
|  |  * @Date 2021/3/9 17:12
 | ||
|  |  * @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
 | ||
|  |  */
 | ||
|  | public class HisInHospDao {
 | ||
|  |     /**
 | ||
|  |      * 获取医院列表
 | ||
|  |      *
 | ||
|  |      * @return 医院列表
 | ||
|  |      */
 | ||
|  |     public JsonResult getHosList() {
 | ||
|  |         Map<String, Object> params = new HashMap<>();
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.AP_Query_Hospital, params);
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 查询预交金缴费记录
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @return 预交金缴费记录
 | ||
|  |      */
 | ||
|  |     public JsonResult getPreMoneyList(String patientId) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.AP_Query_Prepay, params -> {
 | ||
|  |             params.put("PatientID", patientId);
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 查询(今天)住院日费用汇总
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @return 住院日费用汇总
 | ||
|  |      */
 | ||
|  |     public JsonResult getTodayInHospSumFee(String patientId) {
 | ||
|  |         return getInHospSumFee(patientId, DateHelper.getCurDate());
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 查询住院日费用汇总
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @param date      查询日期
 | ||
|  |      * @return 住院日费用汇总
 | ||
|  |      */
 | ||
|  |     public JsonResult getInHospSumFee(String patientId, String date) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.AP_Query_InpatientSummaryFee, params -> {
 | ||
|  |             params.put("PatientID", patientId);
 | ||
|  |             params.put("FeeDate", date == null ? "" : date);
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 查询住院费用清单
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @return 住院费用清单
 | ||
|  |      */
 | ||
|  |     public JsonResult getInHospFee(String patientId, String date) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.AP_Query_InpatientFee, params -> {
 | ||
|  |             params.put("PatientID", patientId);
 | ||
|  |             params.put("FeeDate", date == null ? "" : date);
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * [住院]预交金缴费
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @return 预交金缴费记录
 | ||
|  |      */
 | ||
|  |     public JsonResult prepayPay(MerchantEnum payType, String patientId, String patientName, BigDecimal payMoney, String payDate, String payTime, String outTradeNo, String backTransNo, String treatNum) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.Query_InHospPrepay, params -> {
 | ||
|  |             params.put("PatientId", patientId);
 | ||
|  |             params.put("PatientName", patientName);
 | ||
|  |             params.put("ZYNum", treatNum);
 | ||
|  |             params.put("PayMoney", payMoney);
 | ||
|  |             params.put("PayDate", payDate);
 | ||
|  |             params.put("PayTime", payTime);
 | ||
|  |             params.put("TransNo", outTradeNo);
 | ||
|  |             params.put("BankTransNo", backTransNo);
 | ||
|  |             params.put("PayWay", payType.HIS_PAY_WAY);
 | ||
|  |             params.put("PayDeviceID", "mobile");
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 通过住院号查询患者信息(含预交金)
 | ||
|  |      *
 | ||
|  |      * @param treatNum 住院号
 | ||
|  |      * @return 住院费用清单
 | ||
|  |      */
 | ||
|  |     public JsonResult getInHospByTreatNum(String treatNum) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.Query_InHospByTreatNum, params -> {
 | ||
|  |             params.put("InpatientNum", treatNum);
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  |     /**
 | ||
|  |      * 通过患者ID查询在院患者信息
 | ||
|  |      *
 | ||
|  |      * @param patientId 患者id
 | ||
|  |      * @return 住院费用清单
 | ||
|  |      */
 | ||
|  |     public JsonResult getInHospByPatientId(String patientId) {
 | ||
|  |         return HisHelper.getJsonResult(HisEnum.Query_InHospByPatientId, params -> {
 | ||
|  |             params.put("PatientId", patientId);
 | ||
|  |         });
 | ||
|  |     }
 | ||
|  | 
 | ||
|  | 
 | ||
|  | }
 |