package com.ynxbd.common.dao.his; import com.ynxbd.common.bean.HisRecipe; import com.ynxbd.common.helper.his.HisEnum; import com.ynxbd.common.helper.his.HisHelper; import com.ynxbd.common.result.JsonResult; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class HisMedicalTestDao { /** * [测试]查询处方 * * @param patientId 患者id * @return 待付费项目 */ public static List devUnPayList(String patientId, int days) { List resultList = new ArrayList<>(); JsonResult jsonResult = HisHelper.getMdJsonResult(HisEnum.AP_Query_UnPay_Invoice, params -> { params.put("PatientID", patientId); params.put("IsLastWeekFlag", days <= 7 ? "1" : ""); params.put("CallNo",HisHelper.CALL_NO); }); if (!jsonResult.success()) { // 失败 return resultList; } List hisRecipeList = jsonResult.getDataMapList(HisRecipe.class, "Recipe"); if (hisRecipeList != null) { resultList = hisRecipeList; } return resultList; } /** * 根据患者id查询已缴费项目 * * @param patientId 患者id * @param begDate 开始日期 * @param endDate 结束日期 * @return 已缴费项目 */ public static List devPaidRecipeList(String patientId, String begDate, String endDate) { List resultList = new ArrayList<>(); Map params = new HashMap<>(); params.put("PatientID", patientId); params.put("RecipeID", ""); params.put("StartTime", begDate); params.put("EndTime", endDate); JsonResult jsonResult = HisHelper.getMdJsonResult(HisEnum.AP_Query_OutpatientFee, params); if (!jsonResult.success()) { // 请求失败 return resultList; } List hisRecipe = jsonResult.getDataMapList(HisRecipe.class, "Recipe"); if (hisRecipe != null) { resultList = hisRecipe; } return resultList; } }