互联网医院接口部分新增跟修改,以及添加了体检缴费查询体检处方的功能

debug
李进才 2 years ago
parent 06da1ec6f7
commit bd58e7fbcd
  1. 6
      src/main/java/com/ynxbd/common/action/RecipeAction.java
  2. 4
      src/main/java/com/ynxbd/common/action/ReportAction.java
  3. 22
      src/main/java/com/ynxbd/common/action/TreatAction.java
  4. 26
      src/main/java/com/ynxbd/common/bean/xk/InquiryFee.java
  5. 3
      src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java
  6. 3
      src/main/java/com/ynxbd/common/dao/his/HisReportDao.java
  7. 72
      src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java
  8. 6
      src/main/java/com/ynxbd/common/helper/his/HisEnum.java
  9. 2
      src/main/java/com/ynxbd/wx/utils/DesEncryptHelper.java
  10. 3
      src/main/java/com/ynxbd/wx/wxfactory/utils/WxPassiveReplyHelper.java

@ -47,14 +47,14 @@ public class RecipeAction extends BaseAction {
* 获取未缴费项目 * 获取未缴费项目
*/ */
@Action("getUnPayList") @Action("getUnPayList")
public Result getUnPayList(String patientId, String begDate, String endDate ) { public Result getUnPayList(String patientId, String personNo, String begDate, String endDate ) {
log.info("[处方]未缴费项目查询 patientId={}, begDate={}, endDate={}", patientId, begDate, endDate); log.info("[处方]未缴费项目查询 patientId={},personNo-{}, begDate={}, endDate={}", patientId, personNo, begDate, endDate);
if (patientId == null || begDate == null || endDate == null) { if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); return Result.error(ResultEnum.PARAM_IS_DEFECT);
} }
int days = DateHelper.intervalDays(begDate, endDate, true); int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = new HisRecipeDao().getUnPayRecipe(patientId, days); List<HisRecipe> hisRecipes = new HisRecipeDao().getUnPayRecipe(patientId, personNo, days);
List<HisRecipe> resultList = new ArrayList<>(); List<HisRecipe> resultList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) { for (HisRecipe hisRecipe : hisRecipes) {

@ -90,14 +90,14 @@ public class ReportAction extends BaseAction {
* @param isLately 是否只查询最近一条记录 * @param isLately 是否只查询最近一条记录
*/ */
@Action("getTreatRecordList") @Action("getTreatRecordList")
public Result getTreatRecordList(String begDate, String endDate, String patientId, String patientType, String reportType, Boolean isLately) { public Result getTreatRecordList(String begDate, String endDate, String patientId, String patientType, String reportType, Boolean isLately,String deptCode) {
patientId = getDecodeString(patientId); patientId = getDecodeString(patientId);
// http://localhost:8081/wx/report/getTreatRecordList.do?patientId=406212&begDate=201801-01&endDate=2020-08-12&patientType=0&reportType=2 // http://localhost:8081/wx/report/getTreatRecordList.do?patientId=406212&begDate=201801-01&endDate=2020-08-12&patientType=0&reportType=2
if (patientId == null || begDate == null || endDate == null) { if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); return Result.error(ResultEnum.PARAM_IS_DEFECT);
} }
List<TreatRecord> records = new HisReportDao().getTreatRecordList(patientId, begDate, endDate, patientType, reportType); List<TreatRecord> records = new HisReportDao().getTreatRecordList(patientId, begDate, endDate, patientType, reportType,deptCode);
if (records.size() > 0 && isLately != null && isLately) { if (records.size() > 0 && isLately != null && isLately) {

@ -5,6 +5,7 @@ import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.bean.his.HisTreat; import com.ynxbd.common.bean.his.HisTreat;
import com.ynxbd.common.dao.his.HisTreatDao; import com.ynxbd.common.dao.his.HisTreatDao;
import com.ynxbd.common.helper.common.AesHelper; import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result; import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum; import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException; import com.ynxbd.common.result.ServiceException;
@ -83,4 +84,25 @@ public class TreatAction extends BaseAction {
} }
} }
@Action("getInquiryFee")
public Result getInquiryFee(String inquiryCode){
log.info("[互联网医院]查询问诊费用信息,inquiryCode-{}",inquiryCode);
return Result.success(new HisTreatDao().getInquiryFee(inquiryCode));
}
@Action("createInquiry")
public Result createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) {
log.info("[互联网医院]创建问诊记录,patientId-{},patientName-{},payMoney-{},payDate-{},payTime-{},transNo-{},payDeviceId-{},bankTransNo-{},deptCode-{},doctCode-{},feeCode-{},payWay-{},ID-{},begTime-{},endTime-{},IDCardNo-{},remark-{},doctTitleCode-{},hospitalArea-{},treatNum-{},firstTreatNum-{},openId-{}", patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
if (patientId == null || patientName == null || payMoney == null || payDate == null || payTime == null || transNo == null || deptCode == null || doctCode == null || feeCode == null || payWay == null || ID == null || begTime == null || endTime == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
JsonResult result = new HisTreatDao().createInquiry(patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
if (!result.success()) {
return Result.error(result.getMessage());
}
Map<String, String> response = new HashMap<>();
response.put("invoiceTransNo", result.getDataMapString("InvoiceTransNo"));
response.put("hisTransNo", result.getDataMapString("HISTransNo"));
return Result.success(response);
}
} }

@ -0,0 +1,26 @@
package com.ynxbd.common.bean.xk;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @author 李进才
* @ClassName 问诊费用
* @Description TODO
* @date 2023/09/28 09:41:00
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
public class InquiryFee implements Serializable {
private String code;
private String name;
private BigDecimal price;
}

@ -72,11 +72,12 @@ public class HisRecipeDao {
* @param patientId 患者id * @param patientId 患者id
* @return 待付费项目 * @return 待付费项目
*/ */
public List<HisRecipe> getUnPayRecipe(String patientId, int days) { public List<HisRecipe> getUnPayRecipe(String patientId, String personNo, int days) {
List<HisRecipe> resultList = new ArrayList<>(); List<HisRecipe> resultList = new ArrayList<>();
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.AP_Query_UnPay_Invoice, params -> { JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.AP_Query_UnPay_Invoice, params -> {
params.put("PatientID", patientId); params.put("PatientID", patientId);
params.put("PersonNo",personNo);
params.put("IsLastWeekFlag", days <= 7 ? "1" : ""); params.put("IsLastWeekFlag", days <= 7 ? "1" : "");
params.put("CallNo",HisHelper.CALL_NO); params.put("CallNo",HisHelper.CALL_NO);
}); });

@ -136,12 +136,13 @@ public class HisReportDao {
* *
* @return 就诊记录 * @return 就诊记录
*/ */
public List<TreatRecord> getTreatRecordList(String patientId, String begDate, String endDate, String patientType, String reportType) { public List<TreatRecord> getTreatRecordList(String patientId, String begDate, String endDate, String patientType, String reportType,String deptCode) {
List<TreatRecord> resultList = new ArrayList<>(); List<TreatRecord> resultList = new ArrayList<>();
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.Query_TreatRecords, params -> { JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.Query_TreatRecords, params -> {
params.put("PatientId", patientId); params.put("PatientId", patientId);
params.put("BegDate", begDate); params.put("BegDate", begDate);
params.put("EndDate", endDate); params.put("EndDate", endDate);
params.put("DeptCode",deptCode);
params.put("InOutState", patientType == null ? "0" : patientType); // 0:全部; 1:门诊号; 2:住院号 params.put("InOutState", patientType == null ? "0" : patientType); // 0:全部; 1:门诊号; 2:住院号
params.put("CheckOrInspection", reportType == null ? "0" : reportType); // 0:全部; 1:检查; 2:检验; 3:检查+检验 params.put("CheckOrInspection", reportType == null ? "0" : reportType); // 0:全部; 1:检查; 2:检验; 3:检查+检验
}); });

@ -2,6 +2,7 @@ package com.ynxbd.common.dao.his;
import com.ynxbd.common.bean.his.HisTreat; import com.ynxbd.common.bean.his.HisTreat;
import com.ynxbd.common.bean.report.CheckReport; import com.ynxbd.common.bean.report.CheckReport;
import com.ynxbd.common.bean.xk.InquiryFee;
import com.ynxbd.common.helper.common.Base64Helper; import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.JsonHelper; import com.ynxbd.common.helper.common.JsonHelper;
import com.ynxbd.common.helper.his.HisEnum; import com.ynxbd.common.helper.his.HisEnum;
@ -80,4 +81,75 @@ public class HisTreatDao {
} }
return data; return data;
} }
/**
* 查询问诊费用信息
* @param inquiryCode 收费项目代码
* @return 问诊费用信息
*/
public List<InquiryFee> getInquiryFee(String inquiryCode){
List<InquiryFee> dataList = new ArrayList<>();
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.XK_INQUIRY_FEE, params -> {
params.put("Code", inquiryCode);
});
if (jsonResult.success()) {
dataList = jsonResult.getDataMapList(InquiryFee.class, "Items", "Item");
}
return dataList;
}
/**
* 创建问诊订单
* @param patientId 患者id
* @param patientName 患者姓名
* @param payMoney 支付金额
* @param payDate 支付日期
* @param payTime 支付时间
* @param transNo 交易流水号
* @param payDeviceId 支付终端编号
* @param bankTransNo 银行流水号或微信支付订单号或微信医保支付订单号
* @param deptCode 科室代码
* @param doctCode 医师代码
* @param feeCode 13005中的收费项目代码
* @param payWay 支付方式
* @param ID 问诊订单ID
* @param begTime 接诊日期
* @param endTime 结束日期
* @param IDCardNo 身份证号
* @param remark 备注
* @param doctTitleCode 医生职称编码
* @param hospitalArea 院区
* @param treatNum 复诊门诊号
* @param firstTreatNum 初诊门诊号
* @param openId 微信OpenId
* @return 是否成功
*/
public JsonResult createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId){
return HisHelper.getJsonResult(HisEnum.XK_CREATE_INQUIRY,params->{
params.put("PatientId", patientId);
params.put("PatientName", patientName);
params.put("PayMoney", payMoney);
params.put("PayDate", payDate);
params.put("PayTime", payTime);
params.put("TransNo", transNo);
params.put("PayDeviceID", payDeviceId);
params.put("BankTransNo", bankTransNo);
params.put("DeptCode", deptCode);
params.put("DoctCode", doctCode);
params.put("FeeCode", feeCode);
params.put("PayWay", payWay);
params.put("ID", ID);
params.put("BegTime", begTime);
params.put("EndTime", endTime);
params.put("IDCardNo", IDCardNo);
params.put("Remark", remark);
params.put("DoctTitleCode", doctTitleCode);
params.put("HospitalArea", hospitalArea);
params.put("TreatNum", treatNum);
params.put("FirstTreatNum", firstTreatNum);
params.put("OpenId", openId);
});
}
} }

@ -87,6 +87,12 @@ public enum HisEnum {
XK_CREATE_TREAT("[互联网医院]创建就诊记录", "13002", "UniversalInterface", true), XK_CREATE_TREAT("[互联网医院]创建就诊记录", "13002", "UniversalInterface", true),
XK_QUERY_TREAT("[互联网医院]查询就诊记录诊断信息", "13003", "UniversalInterface", true), XK_QUERY_TREAT("[互联网医院]查询就诊记录诊断信息", "13003", "UniversalInterface", true),
XK_DOC_CA("[互联网医院]查询医生电子签名", "13004", "UniversalInterface", true), XK_DOC_CA("[互联网医院]查询医生电子签名", "13004", "UniversalInterface", true),
XK_INQUIRY_FEE("[互联网医院]查询问诊费用信息","13005","UniversalInterface", true),
XK_CREATE_INQUIRY("[互联网医院]创建问诊记录","13006","UniversalInterface",true),
; ;
public final String NAME; public final String NAME;

@ -20,7 +20,7 @@ public class DesEncryptHelper {
public static void main(String[] args) { public static void main(String[] args) {
String s = enCode("oeso-t62kkoRwLVVkSkwmmjPfUXk"); String s = enCode("oeso-t62kkoRwLVVkSkwmmjPfUXk");
String a= deCode("35BDCFC53E24D9FE2D0D4F7E54FE6C0F4C04947CD8B09F5E400B08EA174E9D37453C0454FBAA001C1E4AFBD94E0D194EA84AC87003AC5CCCAFBAD8B72B7FC47B02C0448B2F850986C396612EE0796D914FBD35F762DE9A2262A75D82E60B4512A7C8C4286BA45F2359918D80AA642965DF49BF8C9B23D3047DCF154FD28259EB3B858E32FF01A025"); String a= deCode("CF9810D012B475160230870349C6CE4D2AC51B0337640E0607DE6D536EBF9B7793FB12F6871356772FC721D2DE4BCF5E6B182EEFD24EC126D2BDA7639A3777A6E37D2699575F23F0645B81DE2224E1342F5C65AEFE133B3DED63CEF161F1772CEB46D1D447D194ACAF7103055F9C4F12FEFF8750524AC698E0E06CF7829216A59C43992E5BD876FC");
System.out.println(a); System.out.println(a);
} }

@ -370,7 +370,8 @@ public class WxPassiveReplyHelper {
"超声医学科:0888-5116254\n" + "超声医学科:0888-5116254\n" +
"医学影像科:0888-5187393\n" + "医学影像科:0888-5187393\n" +
"药学部:0888-5122672\n" + "药学部:0888-5122672\n" +
"内镜中心:0888-5304137\n"; "内镜中心:0888-5304137\n" +
"临床营养科:0888-5135525\n";
} else if (content.contains("体检")) { } else if (content.contains("体检")) {
respInfo = "您好,您可以拨打体检科电话:0888-5182024进行详细咨询"; respInfo = "您好,您可以拨打体检科电话:0888-5182024进行详细咨询";

Loading…
Cancel
Save