解决合并冲突
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前接口的主要用途和注意事项
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
|
||||
public interface IInpatientDischargeService extends IService<InpatientDischarge> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
import com.openhis.yb.domain.InpatientRegInfoUpdateRecorde;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前接口的主要用途和注意事项
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
|
||||
public interface IInpatientRegInfoUpdateRecordeService extends IService<InpatientRegInfoUpdateRecorde> {
|
||||
|
||||
}
|
||||
@@ -47,6 +47,7 @@ import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.domain.PaymentRecDetail;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.model.PaymentedItemModel;
|
||||
import com.openhis.financial.service.IContractService;
|
||||
import com.openhis.financial.service.IPaymentRecDetailService;
|
||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||
@@ -120,7 +121,11 @@ public class YbDao {
|
||||
@Autowired
|
||||
private IRegService iRegService;
|
||||
@Autowired
|
||||
private IInpatientRegService iInpatientRegService;
|
||||
private IInpatientRegService inpatientRegService;
|
||||
@Autowired
|
||||
private IInpatientDischargeService inpatientDischargeService;
|
||||
@Autowired
|
||||
private IInpatientRegInfoUpdateRecordeService inpatientRegInfoUpdateRecordeService;
|
||||
@Autowired
|
||||
private IInpatientSettleService inpatientSettleService;
|
||||
@Autowired
|
||||
@@ -247,13 +252,13 @@ public class YbDao {
|
||||
* 【2204】诊断信息上传
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param chargeItemIds 收费项id集合
|
||||
* @param paymentedItemList 收费项id集合
|
||||
* @return 【2204】参数
|
||||
*/
|
||||
|
||||
public Clinic2204OrderParam getClinicOrder2204Param(Integer tenantId, List<Long> chargeItemIds,
|
||||
public Clinic2204OrderParam getClinicOrder2204Param(Integer tenantId, List<PaymentedItemModel> paymentedItemList,
|
||||
ClinicReg2201Output reg2201Output) {
|
||||
return ybUtil.getClinicOrder2204Param(tenantId, chargeItemIds, reg2201Output);
|
||||
return ybUtil.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1998,7 +2003,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到就诊记录");
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = iInpatientRegService
|
||||
InpatientReg inpatientReg = inpatientRegService
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (inpatientReg == null) {
|
||||
@@ -2088,7 +2093,7 @@ public class YbDao {
|
||||
if (encounter == null) {
|
||||
throw new ServiceException("未查询到挂号信息");
|
||||
}
|
||||
InpatientReg inpatientReg = iInpatientRegService
|
||||
InpatientReg inpatientReg = inpatientRegService
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (inpatientReg == null) {
|
||||
@@ -2151,7 +2156,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到挂号信息");
|
||||
}
|
||||
// 查询挂号信息
|
||||
InpatientReg inpatientReg = iInpatientRegService
|
||||
InpatientReg inpatientReg = inpatientRegService
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (inpatientReg == null) {
|
||||
@@ -2341,7 +2346,7 @@ public class YbDao {
|
||||
* @param encounterId 就诊id
|
||||
* @return 2402参数
|
||||
*/
|
||||
public Yb2402InputParam getYb2402InputInpatientDscgInfo(Long encounterId) {
|
||||
public Yb2402InputParam getYb2402InputInpatientDscgInfo(Long encounterId,Contract contract) {
|
||||
|
||||
Yb2402InputParam yb2402InputParam = new Yb2402InputParam();
|
||||
Encounter encounter = iEncounterService.getById(encounterId);
|
||||
@@ -2349,7 +2354,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到就诊信息");
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = iInpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
@@ -2362,7 +2367,7 @@ public class YbDao {
|
||||
throw new ServiceException("挂号账户为自费账户,无法办理医保住院登记");
|
||||
}
|
||||
|
||||
Contract contract = iContractService.getContract(account.getContractNo());
|
||||
contract = iContractService.getContract(account.getContractNo());
|
||||
if (contract == null) {
|
||||
throw new ServiceException("未查询到对应合同信息");
|
||||
}
|
||||
@@ -2531,7 +2536,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到就诊信息");
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = iInpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
@@ -2719,8 +2724,8 @@ public class YbDao {
|
||||
}
|
||||
|
||||
// 拼装参数
|
||||
yb24032InputParam.setYb2403InputDiseInfo(yb2403InputDiseInfos);
|
||||
yb24032InputParam.setYb2403InputAdmInfo(yb2403InputAdmInfo);
|
||||
yb24032InputParam.setDiseinfo(yb2403InputDiseInfos);
|
||||
yb24032InputParam.setAdminfo(yb2403InputAdmInfo);
|
||||
|
||||
return yb24032InputParam;
|
||||
}
|
||||
@@ -2740,7 +2745,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到就诊信息");
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = iInpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
@@ -2764,7 +2769,7 @@ public class YbDao {
|
||||
throw new ServiceException("未查询到就诊信息");
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = iInpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
InpatientReg inpatientReg = inpatientRegService.getInpatientRegByIptNo(encounter.getBusNo());
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保挂号信息");
|
||||
}
|
||||
@@ -2797,4 +2802,62 @@ public class YbDao {
|
||||
|
||||
return yb5205InputSpecialDisease;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存入院办理信息
|
||||
* @param inpatientReg 参数
|
||||
*/
|
||||
public void save2401InpatientReg(InpatientReg inpatientReg) {
|
||||
inpatientRegService.save(inpatientReg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存出院办理信息
|
||||
* @param inpatientReg
|
||||
*/
|
||||
public void save2402InpatientDscg(InpatientDischarge inpatientReg) {
|
||||
inpatientDischargeService.save(inpatientReg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存2403住院信息变更记录
|
||||
* @param yb2403InputParam 参数
|
||||
*/
|
||||
public void save2403InputInpatient(Yb2403InputParam yb2403InputParam) {
|
||||
|
||||
InpatientRegInfoUpdateRecorde inpatientRegInfoUpdateRecorde = new InpatientRegInfoUpdateRecorde();
|
||||
|
||||
Yb2403InputMdtrtGrpContent yb2403InputMdtrtGrpContent = yb2403InputParam.getMdtrtGrpContent();
|
||||
Yb2403InputAdmInfo yb2403InputAdmInfo = yb2403InputParam.getAdminfo();
|
||||
List<Yb2403InputDiseInfo> yb2403InputDiseInfo = yb2403InputParam.getDiseinfo();
|
||||
|
||||
inpatientRegInfoUpdateRecorde.setMdtrtId(yb2403InputAdmInfo.getMdtrtId())
|
||||
.setAdmBed(yb2403InputAdmInfo.getAdmBed())
|
||||
.setPsnNo(yb2403InputAdmInfo.getPsnNo())
|
||||
.setConerName(yb2403InputAdmInfo.getConerName())
|
||||
.setTel(yb2403InputAdmInfo.getTel())
|
||||
.setBegntime(yb2403InputAdmInfo.getBegntime())
|
||||
.setEndtime(yb2403InputAdmInfo.getEndtime())
|
||||
.setDscgMaindiagCode(yb2403InputAdmInfo.getDscgMaindiagCode())
|
||||
.setDscgMaindiagName(yb2403InputAdmInfo.getDscgMaindiagName())
|
||||
.setMainCondDscr(yb2403InputAdmInfo.getMainCondDscr())
|
||||
.setDiseCodg(yb2403InputAdmInfo.getDiseCodg())
|
||||
.setDiseName(yb2403InputAdmInfo.getDiseName())
|
||||
.setOprnOprtName(yb2403InputAdmInfo.getOprnOprtName())
|
||||
.setOprnOprtCode(yb2403InputAdmInfo.getOprnOprtCode())
|
||||
.setFpscNo(yb2403InputAdmInfo.getFpscNo())
|
||||
.setMatnType(yb2403InputAdmInfo.getMatnType())
|
||||
.setBirctrlMatnDate(yb2403InputAdmInfo.getBirctrlMatnDate())
|
||||
.setLatechbFlag(yb2403InputAdmInfo.getLatechbFlag())
|
||||
.setBirctrlType(yb2403InputAdmInfo.getBirctrlType())
|
||||
.setEssoVal(yb2403InputAdmInfo.getEssoVal())
|
||||
.setFetts(yb2403InputAdmInfo.getFetts())
|
||||
.setFetusCnt(yb2403InputAdmInfo.getFetusCnt())
|
||||
.setPretFlag(yb2403InputAdmInfo.getPretFlag())
|
||||
.setDiseTypeCode(yb2403InputAdmInfo.getDiseTypeCode());
|
||||
|
||||
inpatientRegInfoUpdateRecorde.setInputParam(JSON.toJSONString(inpatientRegInfoUpdateRecorde));
|
||||
|
||||
inpatientRegInfoUpdateRecordeService.save(inpatientRegInfoUpdateRecorde);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,10 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.openhis.financial.service.impl.ContractServiceImpl;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@@ -49,6 +48,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.service.IContractService;
|
||||
import com.openhis.financial.service.impl.ContractServiceImpl;
|
||||
import com.openhis.yb.domain.ClinicReg;
|
||||
import com.openhis.yb.dto.*;
|
||||
import com.openhis.yb.model.Clinic2207OrderModel;
|
||||
@@ -400,13 +400,13 @@ public class YbHttpUtils {
|
||||
public Result reconcileGeneralLedger(Financial3201Param financial3201Param) {
|
||||
|
||||
// 此处先查询到合同并回填给入参对象
|
||||
Contract contract=iContractService.getContract(financial3201Param.getSetlOptins());
|
||||
if(contract==null){
|
||||
Contract contract = iContractService.getContract(financial3201Param.getSetlOptins());
|
||||
if (contract == null) {
|
||||
throw new ServiceException("未查询到合同信息");
|
||||
}
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/reconcile",
|
||||
financial3201Param,contract);
|
||||
financial3201Param, contract);
|
||||
|
||||
// 赋值(上述回填的两个参数医保不要,为了避免麻烦,在发送http后进行回填)
|
||||
financial3201Param.setFixmedinsCode(contract.getFixmedinsCode());
|
||||
@@ -662,7 +662,7 @@ public class YbHttpUtils {
|
||||
MedicalInventory3511Output medicalInventory3511Output = null;
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
} else if (result.getCode() == 401) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
medicalInventory3511Output =
|
||||
parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
@@ -1076,4 +1076,154 @@ public class YbHttpUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【目录下载】
|
||||
*
|
||||
* @param catalogFileInput
|
||||
* @return
|
||||
*/
|
||||
public FileResult queryCatalog(CatalogFileInput catalogFileInput) {
|
||||
String resultString = httpPost(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-catalog", catalogFileInput, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【" + catalogFileInput.getAddress() + "】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【" + catalogFileInput.getAddress() + "】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【文件下载】
|
||||
*
|
||||
* @param fileResult
|
||||
* @return
|
||||
*/
|
||||
public FileResult downLoadFile(FileResult fileResult) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/download", fileResult, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【9102】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【9102】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 【2401】住院办理
|
||||
*
|
||||
* @param yb2401InputInpatientMdtrtInfo 入參
|
||||
* @return 結果
|
||||
*/
|
||||
public InpatientReg inpatientReg(Yb2401InputInpatientMdtrtInfo yb2401InputInpatientMdtrtInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg",
|
||||
yb2401InputInpatientMdtrtInfo, contractServiceImpl.getContract(yb2401InputInpatientMdtrtInfo.getMdtrtareaAdmvs()));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2401】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2401】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseObject(result.getResult().toString(), InpatientReg.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public InpatientDischarge inpatientCheckOut(Contract contract,Yb2402InputParam yb2402InputInpatientDscgInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2402】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2402】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return JSON.parseObject(result.getResult().toString(), InpatientDischarge.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void updateInpatientInfo(Yb2403InputParam yb2405InputInpatient) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2405InputInpatient, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
System.out.println("【2405】返回参数:" + JSON.toJSONString(resultString));
|
||||
logger.info("【2405】返回参数:" + resultString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
if (result == null) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
return;
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.openhis.common.enums.ybenums.YbPsnSetlWay;
|
||||
import com.openhis.financial.domain.Contract;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.model.PaymentResult;
|
||||
import com.openhis.financial.model.PaymentedItemModel;
|
||||
import com.openhis.financial.service.IContractService;
|
||||
import com.openhis.financial.service.IPaymentRecDetailService;
|
||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||
@@ -237,32 +238,7 @@ public class YbManager {
|
||||
* @return 结果
|
||||
*/
|
||||
public R<?> cancelRegById(ClinicReg clinicReg) {
|
||||
Contract regContract = null;
|
||||
// ClinicReg clinicReg = iRegService.getById(clinicRegId);
|
||||
List<Contract> redisContractList = iContractService.getContractListByYb();
|
||||
for (Contract contract : redisContractList) {
|
||||
if (clinicReg.getInsuplcAdmdvs().equals(contract.getAdmVs())) {
|
||||
regContract = contract;
|
||||
}
|
||||
}
|
||||
if (regContract == null) {
|
||||
Optional<Contract> optional = redisContractList.stream().max(Comparator.comparingInt(Contract::getSort));
|
||||
if (optional.isPresent()) {
|
||||
regContract = optional.get();
|
||||
} else {
|
||||
throw new ServiceException("未設置合同順序");
|
||||
}
|
||||
}
|
||||
if (regContract == null) {
|
||||
throw new ServiceException("無法單獨取消醫保挂號,原因:當前醫保局已挂號源沒指定到業務系統的合同對象");
|
||||
}
|
||||
|
||||
ClinicReg2201Output regResult = ybHttpService.cancelReg(clinicReg, regContract);
|
||||
if (regResult != null) {
|
||||
ybBaseService.saveUnReg(regResult);
|
||||
return R.ok(regResult);
|
||||
}
|
||||
return R.fail(regResult, "医保退号失败");
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -353,12 +329,13 @@ public class YbManager {
|
||||
if (totalPrice == null) {
|
||||
throw new ServiceException("未查询到挂号费用金额");
|
||||
}
|
||||
|
||||
// 外购处方标志(文档上没有详细介绍) 2025/04/14经确认,暂定非处方流转传0,处方流转传1
|
||||
clinicFeedetail.setMedListCodg("001101000010000-100000002");
|
||||
clinicFeedetail.setMedListCodg(cancelRegPaymentModel.getYbNo());
|
||||
clinicFeedetail.setFeedetlSn(clinic2204OrderParam.getChrgBchno()).setMdtrtId(clinicReg2201Output.getMdtrtId())
|
||||
.setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date())
|
||||
.setMedinsListCodg("1922546598919725058").setDetItemFeeSumamt(totalPrice.doubleValue()).setCnt(1.0)
|
||||
.setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue())
|
||||
.setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName())
|
||||
.setBilgDrCodg(doctor.getYbNo())
|
||||
// 默认无需审批
|
||||
@@ -404,8 +381,8 @@ public class YbManager {
|
||||
}
|
||||
|
||||
public Clinic2206OrderOutput preSettle(Contract contract, Long encounterId, YbMdtrtCertType ybMdtrtCertType,
|
||||
String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay, List<Long> chargeItemIds,
|
||||
YbMedType ybMedType) {
|
||||
String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay,
|
||||
List<PaymentedItemModel> paymentedItemList, YbMedType ybMedType) {
|
||||
YbPsnSetlWay ybPsnSetlWay = YbPsnSetlWay.getByValue(payWay);
|
||||
if (ybPsnSetlWay == null) {
|
||||
ybPsnSetlWay = YbPsnSetlWay.PSN_SETLWAY01;
|
||||
@@ -422,7 +399,7 @@ public class YbManager {
|
||||
Result result = ybHttpService.upload2203Record(clinic2203MedicalParam, contract);
|
||||
|
||||
Clinic2204OrderParam clinic2204OrderParam =
|
||||
ybBaseService.getClinicOrder2204Param(tenantId, chargeItemIds, reg2201Output);
|
||||
ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
if (clinic2204OrderParam == null) {
|
||||
throw new ServiceException("未生成2204接口参数");
|
||||
}
|
||||
@@ -920,6 +897,8 @@ public class YbManager {
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtos =
|
||||
iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds());
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtosList = new ArrayList<>();
|
||||
|
||||
// 查询基础信息 todo:childrenJson里面村的内容相比较ChargeItemBaseInfoDto有些不够,需要确认一下类里面实际用到的值在children里存不存在
|
||||
for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) {
|
||||
if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) {
|
||||
continue;
|
||||
@@ -933,6 +912,7 @@ public class YbManager {
|
||||
chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto);
|
||||
}
|
||||
}
|
||||
|
||||
Yb2301InputFeeDetail yb2301InputFeeDetail;
|
||||
List<Yb2301InputFeeDetail> yb2301InputFeeDetailList = new ArrayList();
|
||||
// int i = 1;
|
||||
@@ -958,19 +938,19 @@ public class YbManager {
|
||||
List<Yb2301OutputResult> yb2301OutputResults = ybHttpService.upload2301FeeDetail(yb2301InputFeeDetailModel);
|
||||
// todo :数据保存
|
||||
|
||||
for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) {
|
||||
if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) {
|
||||
continue;
|
||||
}
|
||||
if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) {
|
||||
// 反序列化:将JSON数组字符串转为List<>
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoList =
|
||||
JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList);
|
||||
} else {
|
||||
chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto);
|
||||
}
|
||||
}
|
||||
// for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtos) {
|
||||
// if (chargeItemBaseInfoDto.getContractNo().equals(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO)) {
|
||||
// continue;
|
||||
// }
|
||||
// if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) {
|
||||
// // 反序列化:将JSON数组字符串转为List<>
|
||||
// List<ChargeItemBaseInfoDto> chargeItemBaseInfoList =
|
||||
// JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
// chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList);
|
||||
// } else {
|
||||
// chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto);
|
||||
// }
|
||||
// }
|
||||
// 计算医疗总费用
|
||||
BigDecimal medfeeSumamt = BigDecimal.ZERO;
|
||||
for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : chargeItemBaseInfoDtosList) {
|
||||
@@ -986,7 +966,7 @@ public class YbManager {
|
||||
.setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs())
|
||||
.setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs());
|
||||
|
||||
// todo:中如结算标志需要判断一下,待2304接口开发完成后编辑
|
||||
// todo:中途结算标志需要判断一下,待2304接口开发完成后编辑
|
||||
|
||||
Yb2303OutputSetInfo yb2303OutputSetInfo = ybHttpService.inpatientPreSettle(yb2303InputInpatient);
|
||||
|
||||
@@ -1031,4 +1011,7 @@ public class YbManager {
|
||||
|
||||
return yb2305OutputSetlInfo;
|
||||
}
|
||||
|
||||
public void hospitalAdmission() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
import com.openhis.yb.mapper.InpatientDischargeMapper;
|
||||
import com.openhis.yb.mapper.InpatientRegMapper;
|
||||
import com.openhis.yb.service.IInpatientDischargeService;
|
||||
import com.openhis.yb.service.IInpatientRegService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前类的主要用途和注意事项
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
@Service
|
||||
public class InpatientDischargeServiceImpl extends ServiceImpl<InpatientDischargeMapper, InpatientDischarge>
|
||||
implements IInpatientDischargeService {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.yb.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientRegInfoUpdateRecorde;
|
||||
import com.openhis.yb.mapper.InpatientDischargeMapper;
|
||||
import com.openhis.yb.mapper.InpatientRegInfoUpdateRecordeMapper;
|
||||
import com.openhis.yb.service.IInpatientDischargeService;
|
||||
import com.openhis.yb.service.IInpatientRegInfoUpdateRecordeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* TODO:请概括描述当前类的主要用途和注意事项
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
@Service
|
||||
public class InpatientRegInfoUpdateRecordeServiceImpl extends ServiceImpl<InpatientRegInfoUpdateRecordeMapper, InpatientRegInfoUpdateRecorde>
|
||||
implements IInpatientRegInfoUpdateRecordeService {
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user