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.
		
		
		
		
			
				
					65 lines
				
				2.1 KiB
			
		
		
			
		
	
	
					65 lines
				
				2.1 KiB
			| 
								 
											3 years ago
										 
									 | 
							
								package com.ynxbd.common.dao.his;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.bean.his.HisTreat;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.bean.report.CheckReport;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.helper.common.JsonHelper;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.helper.his.HisEnum;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.helper.his.HisHelper;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.result.JsonResult;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.result.ServiceException;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import java.util.ArrayList;
							 | 
						||
| 
								 | 
							
								import java.util.List;
							 | 
						||
| 
								 | 
							
								import java.util.Map;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public class HisTreatDao {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
								     * 根据患者id和科室编码查询就诊记录
							 | 
						||
| 
								 | 
							
								     *
							 | 
						||
| 
								 | 
							
								     * @param patientId 患者id
							 | 
						||
| 
								 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public List<HisTreat> getTreatList(String patientId, String deptCode) {
							 | 
						||
| 
								 | 
							
								        List<HisTreat> dataList = new ArrayList<>();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.XK_GET_TREAT_LIST, params -> {
							 | 
						||
| 
								 | 
							
								            params.put("PatientID", patientId);
							 | 
						||
| 
								 | 
							
								            params.put("DeptCode", deptCode);
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        if (jsonResult.success()) {
							 | 
						||
| 
								 | 
							
								            dataList = jsonResult.getDataMapList(HisTreat.class, "Items", "Item");
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        return dataList;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    /**
							 | 
						||
| 
								 | 
							
								     * 根据患者id查询检查报告
							 | 
						||
| 
								 | 
							
								     *
							 | 
						||
| 
								 | 
							
								     * @param treatNum 门诊号
							 | 
						||
| 
								 | 
							
								     */
							 | 
						||
| 
								 | 
							
								    public HisTreat createTreat(String treatNum) throws ServiceException {
							 | 
						||
| 
								 | 
							
								        JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.XK_CREATE_TREAT, params -> {
							 | 
						||
| 
								 | 
							
								            params.put("MZNum", treatNum);
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        if (jsonResult.success()) {
							 | 
						||
| 
								 | 
							
								            return JsonHelper.parseObject(JsonHelper.toJsonString(jsonResult.getDataMap()), HisTreat.class);
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        throw new ServiceException(jsonResult.getMessage());
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public HisTreat getInfoByTreatNum(String treatNum) throws ServiceException {
							 | 
						||
| 
								 | 
							
								        JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.XK_QUERY_TREAT, params -> {
							 | 
						||
| 
								 | 
							
								            params.put("MZNum", treatNum);
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        if (jsonResult.success()) {
							 | 
						||
| 
								 | 
							
								            return JsonHelper.parseObject(JsonHelper.toJsonString(jsonResult.getDataMap()), HisTreat.class);
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        throw new ServiceException(jsonResult.getMessage());
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |