Compare commits
5 Commits
09f29f299e
...
619cb7c488
Author | SHA1 | Date |
---|---|---|
|
619cb7c488 | 11 months ago |
|
004a744094 | 11 months ago |
|
92d8b6c981 | 11 months ago |
|
09e7735f40 | 11 months ago |
|
82271f5de5 | 11 months ago |
20 changed files with 829 additions and 94 deletions
@ -0,0 +1,96 @@ |
||||
package com.ynxbd.common.action; |
||||
|
||||
import com.ynxbd.common.action.base.BaseAction; |
||||
import com.ynxbd.common.result.Result; |
||||
import com.ynxbd.wx.config.MeTechnologyReConfig; |
||||
import org.apache.struts2.convention.annotation.Action; |
||||
import org.apache.struts2.convention.annotation.Namespace; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName MeTechnologyReAction |
||||
* @Description TODO |
||||
* @date 2024/06/18 14:53:00 |
||||
*/ |
||||
|
||||
@Namespace("/meTechnologyRe") |
||||
public class MeTechnologyReAction extends BaseAction { |
||||
|
||||
/** |
||||
* 获取可预约的订单 |
||||
* |
||||
* @param patientId 患者ID |
||||
* @param startDate 开始日期 |
||||
* @param endDate 结束日期 |
||||
* @return 结果 |
||||
*/ |
||||
@Action("getCanBookOrders") |
||||
public Result getCanBookOrders(String patientId, String startDate, String endDate) { |
||||
patientId = getDecodeString(patientId); |
||||
return Result.success(MeTechnologyReConfig.getCanBookOrders(patientId, startDate, endDate)); |
||||
} |
||||
|
||||
/** |
||||
* 获取号源统计信息 |
||||
* |
||||
* @param patientId 患者ID |
||||
* @param startDate 开始日期 |
||||
* @param endDate 结束日期 |
||||
* @param docDetailedNo 详细单号 |
||||
* @param intervalTimeType 时间间隔类型 |
||||
* @return 结果 |
||||
*/ |
||||
@Action("getNumberSourceStatistics") |
||||
public Result getNumberSourceStatistics(String patientId, String startDate, String endDate, String docDetailedNo, String intervalTimeType) { |
||||
patientId = getDecodeString(patientId); |
||||
return Result.success(MeTechnologyReConfig.getNumberSourceStatistics(patientId, startDate, endDate, docDetailedNo, intervalTimeType)); |
||||
} |
||||
|
||||
/** |
||||
* 获取号源详细信息 |
||||
* |
||||
* @param examRoomOrQueue 检查队列 |
||||
* @param startDate 开始日期 |
||||
* @param endDate 结束日期 |
||||
* @param appFromID 申请表ID |
||||
* @return 结果 |
||||
*/ |
||||
@Action("getNumberSourceDetails") |
||||
public Result getNumberSourceDetails(String examRoomOrQueue, String startDate, String endDate, String appFromID) { |
||||
return Result.success(MeTechnologyReConfig.getNumberSourceDetails(examRoomOrQueue, startDate, endDate, appFromID)); |
||||
} |
||||
|
||||
/** |
||||
* 锁定预约号 |
||||
* |
||||
* @param appFormID 申请表ID |
||||
* @param examRoomOrQueue 检查队列 |
||||
* @param beginDateTime 开始时间 |
||||
* @param endDateTime 结束时间 |
||||
* @param lockStatus 锁定状态 |
||||
* @return 结果 |
||||
*/ |
||||
@Action("lockedBookNo") |
||||
public Result lockedBookNo(String appFormID, String examRoomOrQueue, String beginDateTime, String endDateTime, Boolean lockStatus) { |
||||
Boolean result = MeTechnologyReConfig.lockedBookNo(appFormID, examRoomOrQueue, beginDateTime, endDateTime, lockStatus); |
||||
return result?Result.success():Result.error(); |
||||
} |
||||
|
||||
/** |
||||
* 获取预约信息 |
||||
* |
||||
* @param appFormID 申请表ID |
||||
* @param examRoomOrQueue 检查队列 |
||||
* @param beginDateTime 开始时间 |
||||
* @param endDateTime 结束时间 |
||||
* @param patientId 患者ID |
||||
* @param patientName 患者姓名 |
||||
* @return 结果 |
||||
*/ |
||||
@Action("getBookedDateTime") |
||||
public Result getBookedDateTime(String appFormID, String examRoomOrQueue, String beginDateTime, String endDateTime, String patientId, String patientName) { |
||||
patientId = getDecodeString(patientId); |
||||
return Result.success(MeTechnologyReConfig.getBookedDateTime(appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,139 @@ |
||||
package com.ynxbd.common.bean.me_technology; |
||||
import lombok.Getter; |
||||
import lombok.NoArgsConstructor; |
||||
import lombok.Setter; |
||||
import lombok.ToString; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName BookOrder |
||||
* @Description TODO |
||||
* @date 2024/06/18 10:32:00 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@ToString |
||||
@NoArgsConstructor |
||||
public class BookOrder implements Serializable { |
||||
/** 患者ID */ |
||||
private String patientID; |
||||
|
||||
/** 预约时间*/ |
||||
private String scheduleDateTime; |
||||
|
||||
/** 患者来源(I:住院,O:门诊) */ |
||||
private String patientSource; |
||||
|
||||
/** 身份证号 */ |
||||
private String sfzh; |
||||
|
||||
/** 设备号 */ |
||||
private String treatmentNo; |
||||
|
||||
/** 病历号 */ |
||||
private String blh; |
||||
|
||||
/** 病人卡号 */ |
||||
private String brkh; |
||||
|
||||
/** 患者姓名 */ |
||||
private String patientName; |
||||
|
||||
/** 性别 */ |
||||
private String sex; |
||||
|
||||
/** 年龄 */ |
||||
private String age; |
||||
|
||||
/** 出生日期 */ |
||||
private String birthDay; |
||||
|
||||
/** 电话号码 */ |
||||
private String telephone; |
||||
|
||||
/** 民族 */ |
||||
private String nation; |
||||
|
||||
/** 地址 */ |
||||
private String adress; |
||||
|
||||
/** 开单次数 */ |
||||
private String orderTimes; |
||||
|
||||
/** 检查项目名称 */ |
||||
private String appFormName; |
||||
|
||||
/** 院区代码 */ |
||||
private String admType; |
||||
|
||||
/** 申请单号 */ |
||||
private String appFormNo; |
||||
|
||||
/** 合单号 */ |
||||
private String combinedCode; |
||||
|
||||
/** 检查项目编号 */ |
||||
private String projectNo; |
||||
|
||||
/** 申请单内容 */ |
||||
private String aplicationForm; |
||||
|
||||
/** 检查项目类别 */ |
||||
private String examClass; |
||||
|
||||
/** 病区代码 */ |
||||
private String inpatientAreaNo; |
||||
|
||||
/** 病区名称 */ |
||||
private String inpatientArea; |
||||
|
||||
/** 床号 */ |
||||
private String bedNumber; |
||||
|
||||
/** 收费类别 */ |
||||
private String chargeType; |
||||
|
||||
/** 诊断名称 */ |
||||
private String diagnosis; |
||||
|
||||
/** 申请科室名称 */ |
||||
private String applyDep; |
||||
|
||||
/** 申请医生代码 */ |
||||
private String applyDocNo; |
||||
|
||||
/** 申请医生 */ |
||||
private String applyDoc; |
||||
|
||||
/** 申请时间 */ |
||||
private String ordDateTime; |
||||
|
||||
/** 执行科室代码 */ |
||||
private String executiveDepNo; |
||||
|
||||
/** 执行科室名称 */ |
||||
private String executiveDepName; |
||||
|
||||
/** 申请单状态(空:未预约,0:已预约,1:已到检) */ |
||||
private String studyStatus; |
||||
|
||||
/** 号池类型(A:混合号,I:住院号,O:门诊号) */ |
||||
private String patientSourceType; |
||||
|
||||
/** 预约开始时间 */ |
||||
private String scheduleStartTime; |
||||
|
||||
/** 预约结束时间 */ |
||||
private String scheduleEndTime; |
||||
|
||||
/** 预约检查地址 */ |
||||
private String scheduleLocation; |
||||
|
||||
/** 执行科室名称 */ |
||||
private String scheduleRoomOrQueue; |
||||
|
||||
/** 排队号 */ |
||||
private String scheduleNumber; |
||||
} |
@ -0,0 +1,161 @@ |
||||
package com.ynxbd.common.bean.me_technology; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import lombok.ToString; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName BookedInfo |
||||
* @Description TODO |
||||
* @date 2024/06/18 14:30:00 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@ToString |
||||
@NoArgsConstructor |
||||
public class BookedInfo implements Serializable { |
||||
/** 身份证号 */ |
||||
private String sfzh; |
||||
|
||||
/** 号池类型 (I:住院,O:门诊) */ |
||||
private String numberType; |
||||
|
||||
/** 详细单号 */ |
||||
private String docDetailedNo; |
||||
|
||||
/** 详细单号 (重复字段) */ |
||||
private String docDetailedNos; |
||||
|
||||
/** 结果代码 */ |
||||
private int resultCode; |
||||
|
||||
/** 结果内容 */ |
||||
private String resultContent; |
||||
|
||||
/** 检查室ID */ |
||||
private String examRoomID; |
||||
|
||||
/** 检查室名称 */ |
||||
private String examRoomName; |
||||
|
||||
/** 预约日期 */ |
||||
private String bookedDate; |
||||
|
||||
/** 预约时间 */ |
||||
private String bookedTime; |
||||
|
||||
/** 排队号 */ |
||||
private String scheduleNumber; |
||||
|
||||
/** 预约地址 */ |
||||
private String bookedAddress; |
||||
|
||||
/** 其他信息 */ |
||||
private String otherInfo; |
||||
|
||||
/** 执行科室代码 */ |
||||
private String executiveDepNo; |
||||
|
||||
/** 执行科室名称 */ |
||||
private String executiveDepName; |
||||
|
||||
/** 病人卡号 */ |
||||
private String brkh; |
||||
|
||||
/** 患者姓名 */ |
||||
private String patientName; |
||||
|
||||
/** 患者ID */ |
||||
private String patientID; |
||||
|
||||
/** 检查部位 */ |
||||
private String jcbw; |
||||
|
||||
/** 检查号 */ |
||||
private String studyNo; |
||||
|
||||
/** 取片时长 */ |
||||
private String qpsc; |
||||
|
||||
/** 病史资料 */ |
||||
private String bszl; |
||||
|
||||
/** 临床诊断 */ |
||||
private String clinicalDiagnosis; |
||||
|
||||
/** 项目费用 */ |
||||
private Double projectCost; |
||||
|
||||
/** 性别 */ |
||||
private String sex; |
||||
|
||||
/** 预约方式 */ |
||||
private String ysfs; |
||||
|
||||
/** 年龄 */ |
||||
private String age; |
||||
|
||||
/** 床号 */ |
||||
private String bedNumber; |
||||
|
||||
/** 排序 */ |
||||
private int orderBy; |
||||
|
||||
/** 设备号 */ |
||||
private String equipmentNo; |
||||
|
||||
/** 项目名称 */ |
||||
private String projectName; |
||||
|
||||
/** 项目编号 */ |
||||
private String projectNo; |
||||
|
||||
/** 预检查注意事项 */ |
||||
private String preCheckCautions; |
||||
|
||||
/** 检查注意事项 */ |
||||
private String checkCautions; |
||||
|
||||
/** 检查号 */ |
||||
private String acessionNo; |
||||
|
||||
/** 附加信息 */ |
||||
private String appendMessage; |
||||
|
||||
/** 患者身份 */ |
||||
private String patientIdentity; |
||||
|
||||
/** 病区 */ |
||||
private String inpatientArea; |
||||
|
||||
/** 申请科室 */ |
||||
private String applyDep; |
||||
|
||||
/** 病历号 */ |
||||
private String blh; |
||||
|
||||
/** 申请单内容 */ |
||||
private String aplicationForm; |
||||
|
||||
/** 病史 */ |
||||
private String medicalHistory; |
||||
|
||||
/** 体征 */ |
||||
private String physSign; |
||||
|
||||
/** 医生姓名 */ |
||||
private String docInputName; |
||||
|
||||
/** 费用类型 */ |
||||
private String chargeType; |
||||
|
||||
/** 其他备注 */ |
||||
private String otherBZ; |
||||
|
||||
/** 申请科室代码 */ |
||||
private String applyDepNo; |
||||
} |
@ -0,0 +1,40 @@ |
||||
package com.ynxbd.common.bean.me_technology; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import lombok.ToString; |
||||
import lombok.NoArgsConstructor; |
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName NumPoolStatistics |
||||
* @Description TODO |
||||
* @date 2024/06/18 13:40:00 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@ToString |
||||
@NoArgsConstructor |
||||
public class NumPoolStatistics implements Serializable { |
||||
/** 检查室或排队队列 */ |
||||
private String examRoomOrQueue; |
||||
|
||||
/** 检查日期 */ |
||||
private String checkDate; |
||||
|
||||
/** 上下午 */ |
||||
private String timeType; |
||||
|
||||
/** 总号池数 */ |
||||
private String totalNum; |
||||
|
||||
/** 剩余号池数 */ |
||||
private String residualNum; |
||||
|
||||
/** 到检数 */ |
||||
private String getBookedCount; |
||||
|
||||
/** 患者来源(I:住院,O:门诊) */ |
||||
private String patientSourceType; |
||||
} |
@ -0,0 +1,34 @@ |
||||
package com.ynxbd.common.bean.me_technology; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import lombok.ToString; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName NumberSourceDetails |
||||
* @Description TODO |
||||
* @date 2024/06/18 13:51:00 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@ToString |
||||
@NoArgsConstructor |
||||
public class NumberSourceDetails implements Serializable { |
||||
/** 检查队列名称 */ |
||||
private String examRoomOrQueue; |
||||
|
||||
/** 检查开始时间 */ |
||||
private String beginDateTime; |
||||
|
||||
/** 检查结束时间 */ |
||||
private String endDateTime; |
||||
|
||||
/** 总号池数 */ |
||||
private String totalNum; |
||||
|
||||
/** 剩余号池数 */ |
||||
private String residualNum; |
||||
} |
@ -0,0 +1,33 @@ |
||||
package com.ynxbd.common.bean.me_technology; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
import lombok.ToString; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.util.List; |
||||
|
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName NumberSourceStatistics |
||||
* @Description TODO |
||||
* @date 2024/06/18 13:38:00 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@ToString |
||||
@NoArgsConstructor |
||||
public class NumberSourceStatistics implements Serializable { |
||||
/** 检查项目名称 */ |
||||
private String projectName; |
||||
|
||||
/** 冲突时间 */ |
||||
private String conflictTime; |
||||
|
||||
/** 号池统计信息列表 */ |
||||
private List<NumPoolStatistics> numPoolStatisticsDTOList; |
||||
|
||||
private String applyInfoDTO; |
||||
} |
@ -0,0 +1,246 @@ |
||||
package com.ynxbd.wx.config; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.ynxbd.common.bean.me_technology.BookOrder; |
||||
import com.ynxbd.common.bean.me_technology.BookedInfo; |
||||
import com.ynxbd.common.bean.me_technology.NumberSourceDetails; |
||||
import com.ynxbd.common.bean.me_technology.NumberSourceStatistics; |
||||
import com.ynxbd.common.helper.ProperHelper; |
||||
import com.ynxbd.common.helper.common.JsonHelper; |
||||
import com.ynxbd.common.helper.http.OkHttpHelper; |
||||
import com.ynxbd.common.result.JsonResult; |
||||
import com.ynxbd.common.result.JsonResultEnum; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import okhttp3.MediaType; |
||||
import okhttp3.RequestBody; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
|
||||
/** |
||||
* @author 李进才 |
||||
* @ClassName MeTechnologyReConfig |
||||
* @Description TODO |
||||
* @date 2024/06/14 09:27:00 |
||||
*/ |
||||
@Slf4j |
||||
public class MeTechnologyReConfig { |
||||
private MeTechnologyReConfig() {} |
||||
|
||||
public static final String MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL; |
||||
public static final String MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO; |
||||
public static final String MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID; |
||||
public static final String MEDICAL_TECHNOLOGY_RESERVE_JSON_URL; |
||||
public static final MediaType JSON |
||||
= MediaType.parse("application/json; charset=utf-8"); |
||||
static { |
||||
|
||||
ProperHelper config = new ProperHelper().read("medical-technology-reserve.properties"); |
||||
MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL = config.getString("medical_technology_reserve_webservice_url"); |
||||
MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO = config.getString("medical_technology_reserve_terminal_no"); |
||||
MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID = config.getString("medical_technology_reserve_test_patientId"); |
||||
MEDICAL_TECHNOLOGY_RESERVE_JSON_URL = config.getString("medical_technology_reserve_json_url"); |
||||
} |
||||
|
||||
public static void reserveRun(String patientId){ |
||||
try { |
||||
if(MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL==null){ |
||||
return; |
||||
} |
||||
if(MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID!=null){ |
||||
if(!patientId.equals(MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID)){ |
||||
log.info("[天助预约平台] 不是测试账号,不允许调用接口 patientId-{}", patientId); |
||||
return; |
||||
} |
||||
} |
||||
String result = OkHttpHelper.get(MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL, params->{ |
||||
params.put("patientID",patientId); |
||||
params.put("terminalNo",MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO); |
||||
}); |
||||
JsonResult jsonResult = JsonResult.xmlToBean(result, JsonResultEnum.SYS_RESERVE); |
||||
if(jsonResult==null){ |
||||
log.info("[天助预约平台] xml转换出错,result-{}",result); |
||||
return; |
||||
} |
||||
if(jsonResult.success()){ |
||||
log.info("[天助预约平台] 预约成功 message-{}",jsonResult.getMessage()); |
||||
// MessagePushConfig.businessPush("天助预约平台",patientId,jsonResult.getMessage(),null);
|
||||
} |
||||
} |
||||
catch (Exception e) { |
||||
log.error("[天助预约平台] 调用医技预约出错,error-{}", e.toString()); |
||||
} |
||||
} |
||||
|
||||
public static String getToken(){ |
||||
String result = OkHttpHelper.get(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/Tools/Tool/GetToken",params-> { |
||||
params.put("clientName","WXAPP"); |
||||
params.put("clientCode","wxapp"); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] token获取失败,result-{}",result); |
||||
return null; |
||||
} |
||||
String token = jsonObject.getString("token"); |
||||
log.info("[天助预约平台] token获取成功,token={}",token); |
||||
return token; |
||||
} |
||||
|
||||
/** |
||||
* 预约平台提供,终端调用,主要用来获取患者申请单列表,用于预约改约 |
||||
* @return 根据患者身份获得开立检查单情况 |
||||
*/ |
||||
public static List<BookOrder> getCanBookOrders(String patientId,String startDate,String endDate){ |
||||
Map<String, String> params = new HashMap<>(); |
||||
params.put("PatientId", patientId); |
||||
params.put("StartDate", startDate); |
||||
params.put("EndDate", endDate); |
||||
params.put("TerminalNo", MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO); |
||||
params.put("IsBooked", "2"); |
||||
RequestBody requestBody = RequestBody.create(JSON,JsonHelper.toJsonString(params)); |
||||
|
||||
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL+"/BookDetails/BookDetails/GetCanBookOrders",requestBody,headers -> { |
||||
headers.add("token",getToken()); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] patientId-{},startDate-{},endDate-{} 获取患者申请信息失败,result-{}",patientId,startDate,endDate,result); |
||||
return null; |
||||
} |
||||
if(!"0".equals(jsonObject.getString("ResultCode"))){ |
||||
log.info("[天助预约平台] 获取患者申请信息失败,失败原因-{}",jsonObject.getString("ResultContent")); |
||||
return null; |
||||
} |
||||
return jsonObject.getJSONArray("OrderLists").toJavaList(BookOrder.class); |
||||
} |
||||
|
||||
/** |
||||
* 根据日期范围获得可使用资源概况 |
||||
* @param patientId 患者id |
||||
* @param startDate 开始时间 |
||||
* @param endDate 结束时间 |
||||
* @param docDetailedNo 申请单编号 |
||||
* @param intervalTimeType 上午或者下午 |
||||
* @return 日期范围获得可使用资源概况 |
||||
*/ |
||||
public static List<NumberSourceStatistics> getNumberSourceStatistics(String patientId, String startDate, String endDate, String docDetailedNo, String intervalTimeType){ |
||||
Map<String, String> params = new HashMap<>(); |
||||
params.put("PatientId", patientId); |
||||
params.put("StartDate", startDate); |
||||
params.put("EndDate", endDate); |
||||
params.put("DocDetailedNo", docDetailedNo); |
||||
params.put("IntervalTimeType", intervalTimeType); |
||||
|
||||
String json = JsonHelper.toJsonString(params); |
||||
RequestBody requestBody = RequestBody.create(JSON, json); |
||||
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL+"/BookDetails/BookDetails/GetNumberSourceStatistics",requestBody,headers -> { |
||||
headers.add("token",getToken()); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] patientId-{},startDate-{},endDate-{},docDetailedNo-{},intervalTimeType-{} 根据日期范围获得可使用资源概况失败,result-{}",patientId,startDate,endDate,docDetailedNo,intervalTimeType,result); |
||||
return null; |
||||
} |
||||
if(!"0".equals(jsonObject.getString("resultCode"))){ |
||||
log.info("[天助预约平台] 根据日期范围获得可使用资源概况失败,失败原因-{}",jsonObject.getString("resultContent")); |
||||
return null; |
||||
} |
||||
return jsonObject.getJSONArray("numberSourceStatisticsApplyDTO").toJavaList(NumberSourceStatistics.class); |
||||
} |
||||
|
||||
/** |
||||
* 预约平台提供,终端调用,主要用来获取号池明细信息 |
||||
* @param examRoomOrQueue 检查室或队列 |
||||
* @param startDate 开始时间 |
||||
* @param endDate 结束时间 |
||||
* @param appFromID 医嘱申请单号 |
||||
* @return 号池明细信息 |
||||
*/ |
||||
public static List<NumberSourceDetails> getNumberSourceDetails(String examRoomOrQueue, String startDate, String endDate, String appFromID){ |
||||
|
||||
JSONObject jsonParams = new JSONObject(); |
||||
jsonParams.put("examRoomOrQueue",examRoomOrQueue); |
||||
jsonParams.put("StartDate",startDate); |
||||
jsonParams.put("EndDate",endDate); |
||||
jsonParams.put("appFromID",appFromID); |
||||
RequestBody requestBody = RequestBody.create(JSON, jsonParams.toJSONString()); |
||||
|
||||
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL+"/BookDetails/BookDetails/GetNumberSourceDetails",requestBody,headers -> { |
||||
headers.add("token",getToken()); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] examRoomOrQueue-{},startDate-{},endDate-{},appFromID-{}, 获取号池明细失败,result-{}",examRoomOrQueue,startDate,endDate,appFromID,result); |
||||
return null; |
||||
} |
||||
if(!"0".equals(jsonObject.getString("resultCode"))){ |
||||
log.info("[天助预约平台] 获取号池明细失败,失败原因-{}",jsonObject.getString("resultContent")); |
||||
return null; |
||||
} |
||||
return jsonObject.getJSONArray("numPoolDetailsDTOList").toJavaList(NumberSourceDetails.class); |
||||
} |
||||
|
||||
/** |
||||
* 根据提交时段锁定号池资源 |
||||
* @param appFormID 检查室或队列 |
||||
* @param examRoomOrQueue 检查室或队列 |
||||
* @param beginDateTime 开始时间 |
||||
* @param endDateTime 结束时间 |
||||
* @param lockStatus 锁定状态 |
||||
* @return 是否锁定成功 |
||||
*/ |
||||
public static Boolean lockedBookNo(String appFormID,String examRoomOrQueue,String beginDateTime,String endDateTime,Boolean lockStatus){ |
||||
Map<String, Object> params = new HashMap<>(); |
||||
params.put("appFormID", appFormID); |
||||
params.put("examRoomOrQueue", examRoomOrQueue); |
||||
params.put("beginDateTime", beginDateTime); |
||||
params.put("endDateTime", endDateTime); |
||||
params.put("lockStatus", lockStatus); |
||||
RequestBody requestBody = RequestBody.create(JSON, JsonHelper.toJsonString(params)); |
||||
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL+"/BookDetails/BookDetails/LockedBookNo",requestBody,headers -> { |
||||
headers.add("token",getToken()); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] examRoomOrQueue-{},beginDateTime-{},endDateTime-{},lockStatus-{}, 根据提交时段锁定号池资源失败,result-{}",examRoomOrQueue,beginDateTime,endDateTime,lockStatus,result); |
||||
return false; |
||||
} |
||||
if(!"0".equals(jsonObject.getString("resultCode"))){ |
||||
log.info("[天助预约平台] 根据提交时段锁定号池资源失败,失败原因-{}",jsonObject.getString("resultContent")); |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public static BookedInfo getBookedDateTime(String appFormID,String examRoomOrQueue,String beginDateTime,String endDateTime,String patientId,String patientName){ |
||||
Map<String,String> param = new HashMap<>(); |
||||
param.put("AppFormID",appFormID); |
||||
param.put("ExamRoomOrQueue",examRoomOrQueue); |
||||
param.put("BeginDateTime",beginDateTime); |
||||
param.put("EndDateTime",endDateTime); |
||||
Map<String,Object> params = new HashMap<>(); |
||||
params.put("BookedDateTimeDTOList",param); |
||||
params.put("ScheduleUserId",patientId); |
||||
params.put("ScheduleUser",patientName); |
||||
RequestBody requestBody = RequestBody.create(JSON, JsonHelper.toJsonString(params)); |
||||
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL+"/BookDetails/BookDetails/GetBookedDateTime",requestBody,headers -> { |
||||
headers.add("token",getToken()); |
||||
}); |
||||
JSONObject jsonObject = JsonHelper.parseObject(result); |
||||
if(jsonObject==null){ |
||||
log.info("[天助预约平台] examRoomOrQueue-{},startDate-{},endDate-{},appFromID-{}, patientId-{},patientName-{}, 提交预约具体时间失败,result-{}",examRoomOrQueue,beginDateTime,endDateTime,appFormID,patientId,patientName,result); |
||||
return null; |
||||
} |
||||
if(!"0".equals(jsonObject.getString("resultCode"))){ |
||||
log.info("[天助预约平台] 提交预约具体时间失败,失败原因-{}",jsonObject.getString("resultContent")); |
||||
return null; |
||||
} |
||||
return jsonObject.getJSONArray("bookedInfos").toJavaList(BookedInfo.class).get(0); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,5 @@ |
||||
medical_technology_reserve_webservice_url = http://10.255.248.155:8003/WebService1.asmx/SlipPrint |
||||
medical_technology_reserve_terminal_no = SelfMa |
||||
medical_technology_reserve_test_patientId = 11747214 |
||||
|
||||
medical_technology_reserve_json_url = http://10.255.248.155:8001 |
@ -1,6 +1,3 @@ |
||||
middle_office_url= http://10.255.248.20:9095/proxy/ |
||||
middle_office_hospital = 红河州第一人民医院 |
||||
middle_office_item_name = 嘉和美康 |
||||
|
||||
reserve_cloud_url = http://10.255.248.155:8003/WebService1.asmx/SlipPrint |
||||
reserve_cloud_terminal_no = SelfMa |
@ -1,67 +1 @@ |
||||
# 开启处方预结算(第2开关)(注意该配置需联系his开发者确认支持才能开启,否则存在风险!) |
||||
his.is_recipe_prepay=false |
||||
lis.url= 192.168.1.185:8090 |
||||
lis.unifiedEntrance = true |
||||
# 本地 |
||||
#his.url=127.0.0.1:8888 |
||||
# 测试环境 |
||||
|
||||
|
||||
# 是否强制打印webservice的xml返回数据 |
||||
his.is_log_resp=true |
||||
# 是否传递openid给his推送消息 |
||||
his.is_push_msg=false |
||||
#------------------------------------------------------------- |
||||
#本地 |
||||
his.md_url=127.0.0.1:7777 |
||||
his.dev_url=127.0.0.1:7777 |
||||
his.url=192.168.1.131:8888 |
||||
ali_code = 675448357 |
||||
|
||||
# 公司测试 |
||||
#his.url=192.168.12.10:8888 |
||||
# 红河 |
||||
#his.url=10.20.10.6:8888 |
||||
# 红河医保 |
||||
#his.url=10.20.10.6:8888 |
||||
#his.url=192.168.12.10:8888 |
||||
#his.md_url=192.168.1.128:7885 |
||||
#his.dev_url=10.20.10.6:9988 |
||||
# 永胜 |
||||
#his.url=200.200.200.20:8888 |
||||
# 德宏中医 |
||||
#his.url=200.200.200.60:8888 |
||||
# 华坪 |
||||
#his.url=192.168.1.115:8888 |
||||
# 蒙自中医 |
||||
#his.url=192.168.0.228:8888 |
||||
# 玉龙 |
||||
#his.url=192.168.0.17:8888 |
||||
# 云龙 |
||||
#his.url=200.200.200.69:8888 |
||||
# |
||||
#his.url=172.16.10.15:8888 |
||||
# 禄劝钟爱 |
||||
#his.url=200.200.200.5:8888 |
||||
# 蒙自市人民医院 |
||||
#his.url=200.200.200.174:8080 |
||||
# 元谋 |
||||
#his.url=200.200.200.29:8888 |
||||
# 元谋医保 |
||||
#his.dev_url=200.200.200.36:9999 |
||||
# 芒市 |
||||
#his.url=192.168.100.8:8888 |
||||
# 红河妇幼保健院 |
||||
#his.url=192.168.1.204:8888 |
||||
# 芒市妇幼 |
||||
#his.url=192.168.11.7:8888 |
||||
# |
||||
#his.url=10.10.11.23:8888 |
||||
# 石林 |
||||
#his.url=192.168.10.10:8888 |
||||
# 富民 |
||||
#his.url=200.200.201.27:8888 |
||||
# 西双版纳 |
||||
#his.url=10.10.11.23:8888 |
||||
|
||||
#wx.password=ynxbd@6910 |
||||
# 开启处方预结算(第2开关)(注意该配置需联系his开发者确认支持才能开启,否则存在风险!)
his.is_recipe_prepay=false
lis.url= 192.168.1.185:8090
lis.unifiedEntrance = true
# 本地
#his.url=127.0.0.1:8888
# 测试环境
# 是否强制打印webservice的xml返回数据
his.is_log_resp=true
# 是否传递openid给his推送消息
his.is_push_msg=false
#-------------------------------------------------------------
#本地
his.md_url=127.0.0.1:7777
his.dev_url=127.0.0.1:7777
his.url=192.168.1.131:8888
ali_code = 675448357
# 公司测试
#his.url=192.168.12.10:8888
# 红河
#his.url=10.20.10.6:8888
# 红河医保
#his.url=10.20.10.6:8888
#his.url=192.168.12.10:8888
#his.md_url=192.168.1.128:7885
#his.dev_url=10.20.10.6:9988
# 永胜
#his.url=200.200.200.20:8888
# 德宏中医
#his.url=200.200.200.60:8888
# 华坪
#his.url=192.168.1.115:8888
# 蒙自中医
#his.url=192.168.0.228:8888
# 玉龙
#his.url=192.168.0.17:8888
# 云龙
#his.url=200.200.200.69:8888
#
#his.url=172.16.10.15:8888
# 禄劝钟爱
#his.url=200.200.200.5:8888
# 蒙自市人民医院
#his.url=200.200.200.174:8080
# 元谋
#his.url=200.200.200.29:8888
# 元谋医保
#his.dev_url=200.200.200.36:9999
# 芒市
#his.url=192.168.100.8:8888
# 红河妇幼保健院
#his.url=192.168.1.204:8888
# 芒市妇幼
#his.url=192.168.11.7:8888
#
#his.url=10.10.11.23:8888
# 石林
#his.url=192.168.10.10:8888
# 富民
#his.url=200.200.201.27:8888
# 西双版纳
#his.url=10.10.11.23:8888
#wx.password=ynxbd@6910 |
Loading…
Reference in new issue