提交merge1.3
This commit is contained in:
@@ -8,21 +8,12 @@ import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* TODO:请概括描述当前接口的主要用途和注意事项
|
||||
=======
|
||||
* 出院办理服务接口
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
|
||||
public interface IInpatientDischargeService extends IService<InpatientDischarge> {
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
InpatientDischarge getByMdtrtId(String mdtrtId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,11 +11,6 @@ import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
import com.openhis.yb.domain.InpatientReg;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
@@ -82,8 +77,8 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
Info1101Output perinfo = null;
|
||||
// 发送请求
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getPatinfo", readcard, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getPatinfo", readcard, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -143,8 +138,8 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
ClinicReg2201Output clinicReg2201Output = new ClinicReg2201Output();
|
||||
// 发送请求
|
||||
String s =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelReg", reg, contract);
|
||||
String s
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelReg", reg, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -174,7 +169,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload2204-record",
|
||||
clinic2204OrderParam, contract);
|
||||
clinic2204OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -208,7 +203,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/preSetl",
|
||||
clinic2206OrderParam, contract);
|
||||
clinic2206OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -241,7 +236,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl", clinicOrder2207,
|
||||
contract);
|
||||
contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -269,8 +264,8 @@ public class YbHttpUtils {
|
||||
|
||||
public Sign9001Result sign(Sign signParam, Contract contract) {
|
||||
Sign9001Result sign = null;
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/signIn", signParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/signIn", signParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -303,7 +298,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/unPreSettle",
|
||||
clinic2205OrderParam, contract);
|
||||
clinic2205OrderParam, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -333,7 +328,7 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancelSetl",
|
||||
clinicOrder2208, contract);
|
||||
clinicOrder2208, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -351,8 +346,8 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
clinicOrder2206Result =
|
||||
parseObject(JSON.toJSONString(result.getResult()), Clinic2208UnSetlInfoOutput.class);
|
||||
clinicOrder2206Result
|
||||
= parseObject(JSON.toJSONString(result.getResult()), Clinic2208UnSetlInfoOutput.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -364,7 +359,7 @@ public class YbHttpUtils {
|
||||
Clinic2208UnSetlInfoResult clinicOrder2206Result = new Clinic2208UnSetlInfoResult();
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/directoryCheck",
|
||||
medicalDirectory3301ListParam, null);
|
||||
medicalDirectory3301ListParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -384,7 +379,7 @@ public class YbHttpUtils {
|
||||
public Result directoryUnCheck(MedicalDirectory3302Param medicalDirectory3302Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/directoryUnCheck",
|
||||
medicalDirectory3302Param, null);
|
||||
medicalDirectory3302Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -410,7 +405,7 @@ public class YbHttpUtils {
|
||||
}
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/reconcile",
|
||||
financial3201Param, contract);
|
||||
financial3201Param, contract);
|
||||
|
||||
// 赋值(上述回填的两个参数医保不要,为了避免麻烦,在发送http后进行回填)
|
||||
financial3201Param.setFixmedinsCode(contract.getFixmedinsCode());
|
||||
@@ -436,7 +431,7 @@ public class YbHttpUtils {
|
||||
public FinancialSettlement3202Result reconcileGeneralLedgerDetail(FinancialSettlement3202Param financial3202Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/reconcile-detail",
|
||||
financial3202Param, null);
|
||||
financial3202Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -454,10 +449,10 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public List<FinancialSettlement3209AResult>
|
||||
threePartSearch(FinancialSettlement3209AParam financialSettlement3209AParam) {
|
||||
threePartSearch(FinancialSettlement3209AParam financialSettlement3209AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/three-part-search-err",
|
||||
financialSettlement3209AParam, null);
|
||||
financialSettlement3209AParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -477,7 +472,7 @@ public class YbHttpUtils {
|
||||
public String applyFinancialClearing(Financial3203AParam financial3203AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/apply-clearing",
|
||||
financial3203AParam, iContractService.getContract(financial3203AParam.getClrOptins()));
|
||||
financial3203AParam, iContractService.getContract(financial3203AParam.getClrOptins()));
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -488,7 +483,7 @@ public class YbHttpUtils {
|
||||
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-clearing",
|
||||
financial3204Param, null);
|
||||
financial3204Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -506,7 +501,7 @@ public class YbHttpUtils {
|
||||
public Clearing3205AResult getFinancialClearingStatus(Clearing3205AParma clearing3205AParma) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/get-clearing-status",
|
||||
clearing3205AParma, null);
|
||||
clearing3205AParma, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -524,7 +519,7 @@ public class YbHttpUtils {
|
||||
public Result uploadInventoryCount(MedicalInventory3501Param medicalInventory3501Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-inventory-count",
|
||||
medicalInventory3501Param, null);
|
||||
medicalInventory3501Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -542,7 +537,7 @@ public class YbHttpUtils {
|
||||
public Result updateInventoryCount(MedicalInventory3502Param medicalInventory3502Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/update-inventory",
|
||||
medicalInventory3502Param, null);
|
||||
medicalInventory3502Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -560,7 +555,7 @@ public class YbHttpUtils {
|
||||
public Result procurement(Medical3503Param medical3503Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/procurement",
|
||||
medical3503Param, null);
|
||||
medical3503Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -578,7 +573,7 @@ public class YbHttpUtils {
|
||||
public Result cancelProcurement(MedicalPurchase3504Param medicalPurchase3504Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/procurement-cancel",
|
||||
medicalPurchase3504Param, null);
|
||||
medicalPurchase3504Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -596,7 +591,7 @@ public class YbHttpUtils {
|
||||
public Result merchandise(Medical3505Param medical3505Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/merchandise",
|
||||
medical3505Param, contract);
|
||||
medical3505Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -614,7 +609,7 @@ public class YbHttpUtils {
|
||||
public Result cancelMerchandise(Medical3506Param medical3506Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-merchandise",
|
||||
medical3506Param, contract);
|
||||
medical3506Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -632,7 +627,7 @@ public class YbHttpUtils {
|
||||
public Result deleteGoodsInfo(Medical3507Param medical3507Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/del-goods",
|
||||
medical3507Param, null);
|
||||
medical3507Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -650,7 +645,7 @@ public class YbHttpUtils {
|
||||
public MedicalInventory3511Output querySalesInfo(MedicalInventory3511Param medicalInventory3511Param) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3511-info",
|
||||
medicalInventory3511Param, null);
|
||||
medicalInventory3511Param, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -668,8 +663,8 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 401) {
|
||||
System.out.println(JSON.toJSONString(result.getResult()));
|
||||
medicalInventory3511Output =
|
||||
parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
medicalInventory3511Output
|
||||
= parseObject(JSON.toJSONString(result.getResult()), MedicalInventory3511Output.class);
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -679,7 +674,7 @@ public class YbHttpUtils {
|
||||
public Result getClrOptins(Clearing3206AParam clearing3206AParam) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/getclroptins",
|
||||
clearing3206AParam, null);
|
||||
clearing3206AParam, null);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -697,7 +692,7 @@ public class YbHttpUtils {
|
||||
public Result upload2203Record(Clinic2203MedicalParam medical2203Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload2203-record",
|
||||
medical2203Param, contract);
|
||||
medical2203Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -715,7 +710,7 @@ public class YbHttpUtils {
|
||||
public Result query3512(MedicalInventory3512Param inventory3512Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3512-info",
|
||||
inventory3512Param, contract);
|
||||
inventory3512Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -733,7 +728,7 @@ public class YbHttpUtils {
|
||||
public Result query3513(MedicalInventory3513Param inventory3513Param, Contract contract) {
|
||||
// 发送请求
|
||||
String s = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-3513-info",
|
||||
inventory3513Param, contract);
|
||||
inventory3513Param, contract);
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -763,7 +758,7 @@ public class YbHttpUtils {
|
||||
logger.info("【请求路径】:" + url + ";【入参】: " + JSON.toJSONString(baseParam));
|
||||
// 创建Http请求
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(300000)
|
||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
||||
.setConnectionRequestTimeout(300000).setSocketTimeout(300000).build();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
// 发送请求
|
||||
@@ -797,9 +792,9 @@ public class YbHttpUtils {
|
||||
List<Catalogue1312Output> outputList = new ArrayList<>();
|
||||
try {
|
||||
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/queryYbCatalogue",
|
||||
catalogue1312QueryParam, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/queryYbCatalogue",
|
||||
catalogue1312QueryParam, null);
|
||||
// System.out.println("--------1312resultString-------------" + resultString);
|
||||
// 1. 解析外层 JSON
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -808,7 +803,8 @@ public class YbHttpUtils {
|
||||
String resultStr = rootNode.get("result").asText();
|
||||
|
||||
// 2. 解析 result 中的 JSON 数组
|
||||
outputList = mapper.readValue(resultStr, new TypeReference<List<Catalogue1312Output>>() {});
|
||||
outputList = mapper.readValue(resultStr, new TypeReference<List<Catalogue1312Output>>() {
|
||||
});
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -849,8 +845,8 @@ public class YbHttpUtils {
|
||||
// 3. 转发并删除临时文件
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
response = restTemplate.postForEntity(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
new HttpEntity<>(body, headers), String.class);
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/file-up2",
|
||||
new HttpEntity<>(body, headers), String.class);
|
||||
System.out.println(JSON.toJSONString(response));
|
||||
// 清理临时文件
|
||||
// Files.deleteIfExists(tempFile);
|
||||
@@ -871,7 +867,9 @@ public class YbHttpUtils {
|
||||
// }
|
||||
// });
|
||||
//
|
||||
//// 3. 发送请求到目标服务
|
||||
|
||||
|
||||
//// 3. 发送请求到目标服务
|
||||
// RestTemplate restTemplate = new RestTemplate();
|
||||
// HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, headers);
|
||||
// ResponseEntity<String> response =
|
||||
@@ -914,8 +912,8 @@ public class YbHttpUtils {
|
||||
* @return 违规信息
|
||||
*/
|
||||
public Yb3101OutputResult yb3101PreMidAnalysis(Yb3101InputData data) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-analysis", data, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-analysis", data, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -944,8 +942,8 @@ public class YbHttpUtils {
|
||||
* @param data 输入
|
||||
*/
|
||||
public void yb3103PreMidFeedback(Yb3103InputData data) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-feedback", data, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/pre-mid-feedback", data, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -968,9 +966,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public List<Yb2301OutputResult> upload2301FeeDetail(Yb2301InputFeeDetailModel yb2301InputFeeDetailModel) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-2301-fee-detail",
|
||||
yb2301InputFeeDetailModel, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/upload-2301-fee-detail",
|
||||
yb2301InputFeeDetailModel, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1000,9 +998,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public Yb2303OutputSetInfo inpatientPreSettle(Yb2303InputInpatient yb2303InputInpatient) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-pre-setl",
|
||||
yb2303InputInpatient, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-pre-setl",
|
||||
yb2303InputInpatient, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1027,7 +1025,7 @@ public class YbHttpUtils {
|
||||
|
||||
public Yb2304OutputSetlInfo inpatientSettle(Contract contract, Yb2304InputInpatient yb2304InpatientParam) {
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-setl",
|
||||
yb2304InpatientParam, contract);
|
||||
yb2304InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1052,15 +1050,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【取消住院结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param yb2305InpatientParam 2305参数
|
||||
* @return 医保结果
|
||||
*/
|
||||
public Yb2305OutputSetlInfo inpatientUnSettle(Contract contract, Yb2305InputInpatient yb2305InpatientParam) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-un-setl",
|
||||
yb2305InpatientParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpa-un-setl",
|
||||
yb2305InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1085,15 +1083,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【5205】人员慢特病用药记录查询
|
||||
*
|
||||
*
|
||||
* @param yb5205InputSpecialDisease
|
||||
* @return
|
||||
*/
|
||||
public List<Yb5205OutputSpecialDisease>
|
||||
yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/spe-disease-record-search",
|
||||
yb5205InputSpecialDisease, null);
|
||||
yb5205SpecialDiseaseDrugRecordSearch(Yb5205InputSpecialDisease yb5205InputSpecialDisease) {
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/spe-disease-record-search",
|
||||
yb5205InputSpecialDisease, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1125,7 +1123,7 @@ public class YbHttpUtils {
|
||||
*/
|
||||
public FileResult queryCatalog(CatalogFileInput catalogFileInput) {
|
||||
String resultString = httpPost(
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-catalog", catalogFileInput, null);
|
||||
SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/query-catalog", catalogFileInput, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1135,20 +1133,6 @@ public class YbHttpUtils {
|
||||
Result result = null;
|
||||
try {
|
||||
result = mapper.readValue(resultString, Result.class);
|
||||
<<<<<<< HEAD
|
||||
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;
|
||||
=======
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
@@ -1161,7 +1145,6 @@ public class YbHttpUtils {
|
||||
} else {
|
||||
return new FileResult().setErrMsg(result.getMessage());
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1170,13 +1153,9 @@ public class YbHttpUtils {
|
||||
* @param fileResult
|
||||
* @return
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
public FileResult downLoadFile(FileResult fileResult) {
|
||||
=======
|
||||
public String downLoadFile(FileResult fileResult) {
|
||||
>>>>>>> v1.3
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/download", fileResult, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/download", fileResult, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1190,11 +1169,7 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
<<<<<<< HEAD
|
||||
return JSON.parseObject(JSON.toJSONString(result.getResult()), FileResult.class);
|
||||
=======
|
||||
return result.getResult().toString();
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1207,23 +1182,13 @@ public class YbHttpUtils {
|
||||
/**
|
||||
* 【2401】住院办理
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
* @param yb2401InputInpatientMdtrtInfo 入參
|
||||
* @return 結果
|
||||
*/
|
||||
public InpatientReg inpatientReg(Yb2401InputInpatientMdtrtInfo yb2401InputInpatientMdtrtInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg",
|
||||
yb2401InputInpatientMdtrtInfo, contractServiceImpl.getContract(yb2401InputInpatientMdtrtInfo.getMdtrtareaAdmvs()));
|
||||
=======
|
||||
* @param jsonObject 入參
|
||||
* @return 結果
|
||||
*/
|
||||
public InpatientReg inpatientReg(JSONObject jsonObject, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg", jsonObject,
|
||||
contractServiceImpl.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/inpatient-reg", jsonObject,
|
||||
contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1247,12 +1212,6 @@ public class YbHttpUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public InpatientDischarge inpatientCheckOut(Contract contract,Yb2402InputParam yb2402InputInpatientDscgInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, contract);
|
||||
=======
|
||||
/**
|
||||
* 【2404】住院办理撤销
|
||||
*
|
||||
@@ -1260,9 +1219,9 @@ public class YbHttpUtils {
|
||||
* @return 結果
|
||||
*/
|
||||
public void cancelInpatientReg(Yb2404InputInpatient yb2404InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-inpatient-reg",
|
||||
yb2404InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-inpatient-reg",
|
||||
yb2404InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1287,16 +1246,15 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2402】出院办理
|
||||
*
|
||||
*
|
||||
* @param yb2402InputInpatientDscgInfo 参数
|
||||
* @param contractNo 合同编号
|
||||
* @return 结果
|
||||
*/
|
||||
public Yb2402InputParam inpatientCheckOut(Yb2402InputParam yb2402InputInpatientDscgInfo, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, iContractService.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/discharge-patient",
|
||||
yb2402InputInpatientDscgInfo, iContractService.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1310,11 +1268,7 @@ public class YbHttpUtils {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
} else if (result.getCode() == 200) {
|
||||
System.out.println(result.getResult().toString());
|
||||
<<<<<<< HEAD
|
||||
return JSON.parseObject(result.getResult().toString(), InpatientDischarge.class);
|
||||
=======
|
||||
return JSON.parseObject(result.getResult().toString(), Yb2402InputParam.class);
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
throw new ServiceException(result.getMessage());
|
||||
}
|
||||
@@ -1324,12 +1278,6 @@ public class YbHttpUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void updateInpatientInfo(Yb2403InputParam yb2405InputInpatient) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2405InputInpatient, null);
|
||||
=======
|
||||
/**
|
||||
* 【2405】出院办理撤销
|
||||
*
|
||||
@@ -1337,9 +1285,9 @@ public class YbHttpUtils {
|
||||
* @return 結果
|
||||
*/
|
||||
public void cancelInpatientCheckOut(Yb2405InputInpatient yb2405InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-discharge-patient",
|
||||
yb2405InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-discharge-patient",
|
||||
yb2405InputInpatient, contractServiceImpl.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1364,15 +1312,14 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2403】 更改住院信息
|
||||
*
|
||||
*
|
||||
* @param yb2403InputInpatient 参数
|
||||
* @param contractNo 结果
|
||||
*/
|
||||
public void updateInpatientInfo(Yb2403InputParam yb2403InputInpatient, String contractNo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2403InputInpatient, iContractService.getContract(contractNo));
|
||||
>>>>>>> v1.3
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/change-inpatient-info",
|
||||
yb2403InputInpatient, iContractService.getContract(contractNo));
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1392,17 +1339,13 @@ public class YbHttpUtils {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
}
|
||||
=======
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void emrUp(Yb4401InputDto yb4401InputDto) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/emr-up", yb4401InputDto, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/emr-up", yb4401InputDto, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1428,13 +1371,13 @@ public class YbHttpUtils {
|
||||
|
||||
/**
|
||||
* 【2601】冲正交易
|
||||
*
|
||||
*
|
||||
* @param toReverse 冲正参数
|
||||
* @param contract 省市医保
|
||||
*/
|
||||
public void ybToReverse(Yb2601InputParam toReverse, Contract contract) {
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/to-reverse",
|
||||
toReverse, contract);
|
||||
toReverse, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1461,7 +1404,7 @@ public class YbHttpUtils {
|
||||
public void yb4101Up(Yb4101AInputData yb4101AInputData, Contract contract) {
|
||||
|
||||
String resultString = httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-up",
|
||||
yb4101AInputData, contract);
|
||||
yb4101AInputData, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1486,9 +1429,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public void yb4102Up(Yb4102InputStastInfo yb4102InputStastInfo) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-status-up",
|
||||
yb4102InputStastInfo, null);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/setl-status-up",
|
||||
yb4102InputStastInfo, null);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1514,9 +1457,9 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
public void cancel2302FeeDetailUp(Yb2302InpatientParam yb2302InpatientParam, Contract contract) {
|
||||
String resultString =
|
||||
httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-2302-fee-detail",
|
||||
yb2302InpatientParam, contract);
|
||||
String resultString
|
||||
= httpPost(SecurityUtils.getLoginUser().getOptionJson().getString("ybUrl") + "/cancel-2302-fee-detail",
|
||||
yb2302InpatientParam, contract);
|
||||
if (StringUtils.isEmpty(resultString)) {
|
||||
throw new ServiceException("未接收到医保返回参数");
|
||||
}
|
||||
@@ -1540,5 +1483,4 @@ public class YbHttpUtils {
|
||||
}
|
||||
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -82,7 +82,9 @@ public class YbManager {
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
/******************************** 业务服务 ***********************************/
|
||||
/**
|
||||
* ****************************** 业务服务 **********************************
|
||||
*/
|
||||
@Autowired
|
||||
private IPaymentRecDetailService iPaymentRecDetailService;
|
||||
@Autowired
|
||||
@@ -107,7 +109,9 @@ public class YbManager {
|
||||
private IOrganizationService iOrganizationService;
|
||||
@Autowired
|
||||
private IInventoryItemService inventoryItemService;
|
||||
/****************************** 基础医保服务 *********************************/
|
||||
/**
|
||||
* **************************** 基础医保服务 ********************************
|
||||
*/
|
||||
|
||||
@Autowired
|
||||
private IPerinfoService iPerinfoService;
|
||||
@@ -170,14 +174,14 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【2201】 为了慢特病自动挂号封装
|
||||
*
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
public ClinicReg2201Output createRegWithMedType(Contract contract, YbMdtrtCertType ybMdtrtCertTypeLong,
|
||||
String busiCardInfo, Long encounterId, YbMedType medType) {
|
||||
String busiCardInfo, Long encounterId, YbMedType medType) {
|
||||
ClinicReg reg = ybBaseService.getReg(ybMdtrtCertTypeLong, busiCardInfo, encounterId, medType,
|
||||
SecurityUtils.getLoginUser().getTenantId());
|
||||
SecurityUtils.getLoginUser().getTenantId());
|
||||
reg.setMedType(medType.getValue());
|
||||
ClinicReg2201Output regResult = ybHttpService.reg(reg, contract);
|
||||
if (regResult != null) {
|
||||
@@ -197,8 +201,8 @@ public class YbManager {
|
||||
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
|
||||
PaymentReconciliation paymentReconciliation =
|
||||
iPaymentReconciliationService.getById(cancelRegPaymentDto.getId());
|
||||
PaymentReconciliation paymentReconciliation
|
||||
= iPaymentReconciliationService.getById(cancelRegPaymentDto.getId());
|
||||
|
||||
if (paymentReconciliation == null) {
|
||||
throw new ServiceException("未查询到付款信息");
|
||||
@@ -216,8 +220,8 @@ public class YbManager {
|
||||
|
||||
Contract contractByInsuplcAdmdvs = iContractService.getContract(cancelRegPaymentDto.getContractNo());
|
||||
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput =
|
||||
ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoOutput
|
||||
= ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
if (clinic2208UnSetlInfoOutput == null) {
|
||||
throw new ServiceException("未查询到医保返回信息");
|
||||
}
|
||||
@@ -227,8 +231,8 @@ public class YbManager {
|
||||
|
||||
ClinicReg reg = ybBaseService.getUnReg(cancelRegPaymentDto.getEncounterId(), tenantId);
|
||||
|
||||
ClinicReg2201Output regResult =
|
||||
ybHttpService.cancelReg(reg, iContractService.getContract(cancelRegPaymentDto.getContractNo()));
|
||||
ClinicReg2201Output regResult
|
||||
= ybHttpService.cancelReg(reg, iContractService.getContract(cancelRegPaymentDto.getContractNo()));
|
||||
if (regResult != null) {
|
||||
ybBaseService.saveUnReg(regResult);
|
||||
}
|
||||
@@ -252,14 +256,14 @@ public class YbManager {
|
||||
* @return 结果
|
||||
*/
|
||||
public Clinic2206OrderOutput getPreSettleInfo(OutpatientRegistrationModel cancelRegPaymentModel, Patient patient,
|
||||
Organization organization, Practitioner doctor) {
|
||||
Organization organization, Practitioner doctor) {
|
||||
if (patient == null || organization == null || doctor == null) {
|
||||
throw new ServiceException("未查询到相关信息");
|
||||
}
|
||||
|
||||
InfoPerson perinfo = iPerinfoService.getOne(new LambdaQueryWrapper<InfoPerson>()
|
||||
.eq(InfoPerson::getCertno, patient.getIdCard()).eq(InfoPerson::getTenantId, patient.getTenantId())
|
||||
.orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.eq(InfoPerson::getCertno, patient.getIdCard()).eq(InfoPerson::getTenantId, patient.getTenantId())
|
||||
.orderByDesc(InfoPerson::getCreateTime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (perinfo == null) {
|
||||
throw new ServiceException("未查询到身份信息");
|
||||
}
|
||||
@@ -276,16 +280,15 @@ public class YbManager {
|
||||
// 拼接医保挂号参数
|
||||
ClinicReg reg = new ClinicReg();
|
||||
reg.setPsnNo(perinfo.getPsnNo()).setInsutype(perinfo.getInsutype()).setBegntime(new Date())
|
||||
.setMdtrtCertType(mdtrtCertType.getValue()).setMdtrtCertNo(cancelRegPaymentModel.getBusiCardInfo())
|
||||
.setIptOtpNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4))
|
||||
.setAtddrNo(doctor.getYbNo()).setDrName(doctor.getName()).setDeptCode(organization.getYbNo())
|
||||
.setDeptName(organization.getName())
|
||||
.setCaty(organization.getCaty() == null ? organization.getYbNo() : organization.getCaty())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setAtddrNo(doctor.getYbNo()).setPsnType("11")
|
||||
.setPsnCertType("01").setCertno(perinfo.getCertno()).setPsnName(perinfo.getPsnName());
|
||||
.setMdtrtCertType(mdtrtCertType.getValue()).setMdtrtCertNo(cancelRegPaymentModel.getBusiCardInfo())
|
||||
.setIptOtpNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4))
|
||||
.setAtddrNo(doctor.getYbNo()).setDrName(doctor.getName()).setDeptCode(organization.getYbNo())
|
||||
.setDeptName(organization.getName())
|
||||
.setCaty(organization.getCaty() == null ? organization.getYbNo() : organization.getCaty())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setAtddrNo(doctor.getYbNo()).setPsnType("11")
|
||||
.setPsnCertType("01").setCertno(perinfo.getCertno()).setPsnName(perinfo.getPsnName());
|
||||
|
||||
// reg.setAtddrNo("D220172023129").setDrName("郭建林").setCaty("B19").setDeptCode("B19");
|
||||
|
||||
// 发送医保挂号请求
|
||||
ClinicReg2201Output clinicReg2201Output = ybHttpService.reg(reg, contract);
|
||||
if (clinicReg2201Output == null) {
|
||||
@@ -303,17 +306,17 @@ public class YbManager {
|
||||
// 拼接2203参数
|
||||
Clinic2203DiseInfoParam diseinfo = new Clinic2203DiseInfoParam();
|
||||
diseinfo.setDiagDept(organization.getYbNo()).setDiseDorName(doctor.getName()).setDiseDorNo(doctor.getYbNo())
|
||||
.setDiagTime(new Date()).setValiFlag(Whether.YES.getValue().toString()).setDiagType("1").setDiagSrtNo("1")
|
||||
.setDiagCode("Z00.001").setDiagName("健康查体").setMdtrtId(clinicReg2201Output.getMdtrtId());
|
||||
.setDiagTime(new Date()).setValiFlag(Whether.YES.getValue().toString()).setDiagType("1").setDiagSrtNo("1")
|
||||
.setDiagCode("Z00.001").setDiagName("健康查体").setMdtrtId(clinicReg2201Output.getMdtrtId());
|
||||
// .setDiseDorNo("D220172023129").setDiseDorName("郭建林").setDiagDept("B19");
|
||||
|
||||
diseinfos.add(diseinfo);
|
||||
|
||||
Clinic2203MedicalParam medical2203Param = new Clinic2203MedicalParam();
|
||||
medical2203Param.setMdtrtId(clinicReg2201Output.getMdtrtId()).setPsnNo(reg.getPsnNo())
|
||||
.setBegntime(reg.getBegntime()).setMedType(medType.getValue()).setMainCondDscr("")
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setDiseCodg("Z00.001").setDiseName("健康查体")
|
||||
.setDiseinfoList(diseinfos).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
.setBegntime(reg.getBegntime()).setMedType(medType.getValue()).setMainCondDscr("")
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs()).setDiseCodg("Z00.001").setDiseName("健康查体")
|
||||
.setDiseinfoList(diseinfos).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
|
||||
// 2203接口上传就诊信息
|
||||
ybHttpService.upload2203Record(medical2203Param, contract);
|
||||
@@ -337,14 +340,14 @@ public class YbManager {
|
||||
// 外购处方标志(文档上没有详细介绍) 2025/04/14经确认,暂定非处方流转传0,处方流转传1
|
||||
clinicFeedetail.setMedListCodg(cancelRegPaymentModel.getYbNo());
|
||||
clinicFeedetail.setFeedetlSn(clinic2204OrderParam.getChrgBchno()).setMdtrtId(clinicReg2201Output.getMdtrtId())
|
||||
.setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date())
|
||||
.setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue())
|
||||
.setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName())
|
||||
.setBilgDrCodg(doctor.getYbNo())
|
||||
// 默认无需审批
|
||||
.setBilgDrName(doctor.getName()).setHospApprFlag(YbHospApprFlag.NO_APPROVAL_REQUIRED.getValue())
|
||||
.setRxCircFlag("0").setBilgDrCodg(doctor.getYbNo());
|
||||
.setPsnNo(reg.getPsnNo()).setChrgBchno(clinic2204OrderParam.getChrgBchno()).setFeeOcurTime(new Date())
|
||||
.setMedinsListCodg(cancelRegPaymentModel.getBusNo()).setDetItemFeeSumamt(totalPrice.doubleValue())
|
||||
.setCnt(1.0).setPric(totalPrice.doubleValue()).setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs())
|
||||
.setBilgDeptCodg(organization.getYbNo()).setBilgDeptName(organization.getName())
|
||||
.setBilgDrCodg(doctor.getYbNo())
|
||||
// 默认无需审批
|
||||
.setBilgDrName(doctor.getName()).setHospApprFlag(YbHospApprFlag.NO_APPROVAL_REQUIRED.getValue())
|
||||
.setRxCircFlag("0").setBilgDrCodg(doctor.getYbNo());
|
||||
// .setBilgDrName("郭建林").setBilgDrCodg("D220172023129")
|
||||
// .setBilgDeptCodg("B19").setBilgDeptName(organization.getName());
|
||||
|
||||
@@ -362,11 +365,11 @@ public class YbManager {
|
||||
// 拼接2206预结算参数
|
||||
Clinic2206OrderParam clinicOrder = new Clinic2206OrderParam();
|
||||
clinicOrder.setPsnNo(clinicReg2201Output.getPsnNo()).setMdtrtCertType(clinicReg2201Output.getMdtrtCertType())
|
||||
.setMdtrtCertNo(clinicReg2201Output.getMdtrtCertNo()).setMedType(medType.getValue())
|
||||
.setMedfeeSumamt(totalPrice.doubleValue()).setPsnSetlway(setlWay.getValue())
|
||||
.setMdtrtId(clinicReg2201Output.getMdtrtId()).setChrgBchno(clinic2204OrderParam.getChrgBchno())
|
||||
.setAcctUsedFlag(String.valueOf(Whether.YES.getValue())).setInsutype(clinicReg2201Output.getInsutype())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
.setMdtrtCertNo(clinicReg2201Output.getMdtrtCertNo()).setMedType(medType.getValue())
|
||||
.setMedfeeSumamt(totalPrice.doubleValue()).setPsnSetlway(setlWay.getValue())
|
||||
.setMdtrtId(clinicReg2201Output.getMdtrtId()).setChrgBchno(clinic2204OrderParam.getChrgBchno())
|
||||
.setAcctUsedFlag(String.valueOf(Whether.YES.getValue())).setInsutype(clinicReg2201Output.getInsutype())
|
||||
.setInsuplcAdmdvs(perinfo.getInsuplcAdmdvs());
|
||||
|
||||
// 接收2206接口返回参数
|
||||
Clinic2206OrderOutput clinic2206OrderResult = ybHttpService.upload2206Record(clinicOrder, contract);
|
||||
@@ -375,18 +378,18 @@ public class YbManager {
|
||||
}
|
||||
// 保存预结算参数
|
||||
ybBaseService.saveClinicOrder2206Param(clinicOrder, clinic2206OrderResult, medical2203Param,
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
// 缓存预结算结果
|
||||
redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2204OrderParam.getChrgBchno(),
|
||||
clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
clinic2206OrderResult.setChrgBchno(clinic2204OrderParam.getChrgBchno()).setBusNo(reg.getIptOtpNo());
|
||||
// 返回预结算结果
|
||||
return clinic2206OrderResult;
|
||||
}
|
||||
|
||||
public Clinic2206OrderOutput preSettle(Contract contract, Long encounterId, YbMdtrtCertType ybMdtrtCertType,
|
||||
String busiCardInfo, ClinicReg2201Output reg2201Output, String payWay,
|
||||
List<PaymentedItemModel> paymentedItemList, 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;
|
||||
@@ -394,16 +397,16 @@ public class YbManager {
|
||||
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// 获取2203接口和2204接口参数
|
||||
Clinic2203MedicalParam clinic2203MedicalParam =
|
||||
ybBaseService.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType);
|
||||
Clinic2203MedicalParam clinic2203MedicalParam
|
||||
= ybBaseService.getClinicMedical2203Param(encounterId, tenantId, reg2201Output, ybMedType);
|
||||
if (clinic2203MedicalParam == null) {
|
||||
throw new ServiceException("未生成2203接口参数");
|
||||
}
|
||||
|
||||
Result result = ybHttpService.upload2203Record(clinic2203MedicalParam, contract);
|
||||
|
||||
Clinic2204OrderParam clinic2204OrderParam =
|
||||
ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
Clinic2204OrderParam clinic2204OrderParam
|
||||
= ybBaseService.getClinicOrder2204Param(tenantId, paymentedItemList, reg2201Output);
|
||||
if (clinic2204OrderParam == null) {
|
||||
throw new ServiceException("未生成2204接口参数");
|
||||
}
|
||||
@@ -421,7 +424,7 @@ public class YbManager {
|
||||
|
||||
// 获取2206参数
|
||||
Clinic2206OrderParam clinic2206OrderParam = ybBaseService.getClinicOrder2206Param(sum, reg2201Output,
|
||||
clinic2204OrderParam.getChrgBchno(), busiCardInfo);
|
||||
clinic2204OrderParam.getChrgBchno(), busiCardInfo);
|
||||
if (clinic2206OrderParam == null) {
|
||||
throw new ServiceException("未生成2206接口参数");
|
||||
}
|
||||
@@ -432,7 +435,7 @@ public class YbManager {
|
||||
}
|
||||
// 保存预结算参数
|
||||
ybBaseService.saveClinicOrder2206Param(clinic2206OrderParam, clinic2206OrderResult, clinic2203MedicalParam,
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
clinic2204OrderParam, clinic2204OrderResult);
|
||||
// 缓存预结算结果
|
||||
// redisCache.setCacheObject("PRE-SETTLE:PRE_SETTLE_:" + clinic2206OrderParam.getChrgBchno(),
|
||||
// clinic2206OrderResult, 1800, TimeUnit.SECONDS);
|
||||
@@ -453,10 +456,10 @@ public class YbManager {
|
||||
if (clinicOrder2208 == null) {
|
||||
throw new ServiceException("未生成2208接口参数");
|
||||
}
|
||||
Contract contractByInsuplcAdmdvs =
|
||||
iContractService.getContractByInsuplcAdmdvs(clinicOrder2208.getInsuplcAdmdvs());
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoResult =
|
||||
ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
Contract contractByInsuplcAdmdvs
|
||||
= iContractService.getContractByInsuplcAdmdvs(clinicOrder2208.getInsuplcAdmdvs());
|
||||
Clinic2208UnSetlInfoOutput clinic2208UnSetlInfoResult
|
||||
= ybHttpService.unSettle(clinicOrder2208, contractByInsuplcAdmdvs);
|
||||
// 业务表中进行操作
|
||||
ybBaseService.saveUnSettleRecord(settleId, clinicOrder2208, clinic2208UnSetlInfoResult);
|
||||
return R.ok(clinic2208UnSetlInfoResult);
|
||||
@@ -500,14 +503,14 @@ public class YbManager {
|
||||
* @param ybNo 医保编码
|
||||
*/
|
||||
public R<?> directoryCheckMedication(String categoryCode, String busNo, String name, String ybNo) {
|
||||
MedicalDirectory3302Param medicalDirectory3302Param =
|
||||
ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
MedicalDirectory3302Param medicalDirectory3302Param
|
||||
= ybBaseService.getMedicalDirectory3302ParamMedication(categoryCode, busNo, ybNo);
|
||||
Result result3302Info = ybHttpService.directoryUnCheck(medicalDirectory3302Param);
|
||||
if (!result3302Info.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||
return R.fail("目录对照前,撤销对照失败");
|
||||
}
|
||||
MedicalDirectory3301Param medicalDirectory3301Param =
|
||||
ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
MedicalDirectory3301Param medicalDirectory3301Param
|
||||
= ybBaseService.getMedicalDirectory3301ParamMedication(categoryCode, busNo, name, ybNo);
|
||||
ArrayList<MedicalDirectory3301Param> list = new ArrayList<>();
|
||||
list.add(medicalDirectory3301Param);
|
||||
MedicalDirectory3301ListParam medicalDirectory3301ListParam = new MedicalDirectory3301ListParam();
|
||||
@@ -565,8 +568,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> reconcileGeneralLedgerDetail(Settlement3202WebParam settlement3202WebParam) {
|
||||
|
||||
FinancialSettlement3202Param financial3202Param =
|
||||
ybBaseService.getFinancialSettlement3202Param(settlement3202WebParam);
|
||||
FinancialSettlement3202Param financial3202Param
|
||||
= ybBaseService.getFinancialSettlement3202Param(settlement3202WebParam);
|
||||
FinancialSettlement3202Result resultInfo = ybHttpService.reconcileGeneralLedgerDetail(financial3202Param);
|
||||
|
||||
return R.ok(resultInfo);
|
||||
@@ -580,8 +583,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> threePartSearch(Settlement3209AWebParam settlement3209AWebParam) {
|
||||
|
||||
FinancialSettlement3209AParam financialSettlement3209AParam =
|
||||
ybBaseService.getFinancialSettlement3209AParam(settlement3209AWebParam);
|
||||
FinancialSettlement3209AParam financialSettlement3209AParam
|
||||
= ybBaseService.getFinancialSettlement3209AParam(settlement3209AWebParam);
|
||||
List<FinancialSettlement3209AResult> list = ybHttpService.threePartSearch(financialSettlement3209AParam);
|
||||
|
||||
return R.ok();
|
||||
@@ -707,8 +710,8 @@ public class YbManager {
|
||||
public R<?> merchandise(Medical3505Param medical3505Param, Contract contract) {
|
||||
|
||||
Result result = ybHttpService.merchandise(medical3505Param, contract);
|
||||
Medical3505Result medical3505Result =
|
||||
JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
Medical3505Result medical3505Result
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
if ("1".equals(medical3505Result.getRetRslt())) {
|
||||
ybBaseService.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt());
|
||||
return R.ok();
|
||||
@@ -726,8 +729,8 @@ public class YbManager {
|
||||
*/
|
||||
public R<?> cancelMerchandise(Medical3506Param medical3506Param, Contract contract) {
|
||||
Result result = ybHttpService.cancelMerchandise(medical3506Param, contract);
|
||||
Medical3505Result medical3505Result =
|
||||
JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
Medical3505Result medical3505Result
|
||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Medical3505Result.class);
|
||||
if ("1".equals(medical3505Result.getRetRslt())) {
|
||||
ybBaseService.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt());
|
||||
return R.ok();
|
||||
@@ -754,7 +757,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【门诊结算-2207结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param chrgBchno 支付批次号
|
||||
* @param ybMdtrtCertType 凭证类型
|
||||
@@ -764,33 +767,33 @@ public class YbManager {
|
||||
* @return 结算结果
|
||||
*/
|
||||
public Clinic2207OrderModel settle(Contract contract, String chrgBchno, String busiCardInfo,
|
||||
YbMdtrtCertType ybMdtrtCertType, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
YbMdtrtCertType ybMdtrtCertType, Integer minpacuntDrugTracCnt, Integer mcsTracCnt) {
|
||||
// 分别查询2206和2201记录的参数信息
|
||||
ClinicPreSettle clinicPreSettle = iClinicPreSettleService
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
if (clinicPreSettle == null) {
|
||||
throw new ServiceException("为查询到预结算信息");
|
||||
}
|
||||
ClinicReg clinicReg = iRegService
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
if (clinicReg == null) {
|
||||
throw new ServiceException("为查询到挂号信息");
|
||||
}
|
||||
Clinic2206OrderOutput clinic2206OrderResult =
|
||||
JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
Clinic2206OrderOutput clinic2206OrderResult
|
||||
= JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
// 组装2207接口参数
|
||||
Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam();
|
||||
clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(ybMdtrtCertType.getValue())
|
||||
.setMdtrtCertNo(busiCardInfo).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()).setMinpacuntDrugTracCnt(minpacuntDrugTracCnt)
|
||||
.setMcsTracCnt(mcsTracCnt);
|
||||
.setMdtrtCertNo(busiCardInfo).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs()).setMinpacuntDrugTracCnt(minpacuntDrugTracCnt)
|
||||
.setMcsTracCnt(mcsTracCnt);
|
||||
// 发送http请求给app
|
||||
Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract);
|
||||
if (settle == null) {
|
||||
@@ -803,7 +806,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【门诊挂号收费-2207】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param chrgBchno 收费批次号
|
||||
* @return 结果
|
||||
@@ -811,33 +814,33 @@ public class YbManager {
|
||||
public PaymentResult settle(Contract contract, String chrgBchno) {
|
||||
|
||||
ClinicPreSettle clinicPreSettle = iClinicPreSettleService
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
.getOne(new LambdaQueryWrapper<ClinicPreSettle>().eq(ClinicPreSettle::getChrgBchno, chrgBchno));
|
||||
|
||||
if (clinicPreSettle == null) {
|
||||
throw new ServiceException("未查询到预结算信息");
|
||||
}
|
||||
ClinicReg clinicReg = iRegService
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
.getOne(new LambdaQueryWrapper<ClinicReg>().eq(ClinicReg::getMdtrtId, clinicPreSettle.getMdtrtId()));
|
||||
|
||||
if (clinicReg == null) {
|
||||
throw new ServiceException("未查询到挂号信息");
|
||||
}
|
||||
|
||||
Clinic2206OrderOutput clinic2206OrderResult =
|
||||
JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
Clinic2206OrderOutput clinic2206OrderResult
|
||||
= JSONObject.parseObject(clinicPreSettle.getResult2206(), Clinic2206OrderOutput.class);
|
||||
|
||||
Clinic2207OrderParam clinicOrder = new Clinic2207OrderParam();
|
||||
clinicOrder.setPsnNo(clinicPreSettle.getPsnNo()).setMdtrtCertType(clinic2206OrderResult.getMdtrtCertType())
|
||||
// todo:sjq 医疗费用总额需要用ChargeItem的和
|
||||
.setMdtrtCertNo(clinic2206OrderResult.getMdtrtCertNo()).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs());
|
||||
// todo:sjq 医疗费用总额需要用ChargeItem的和
|
||||
.setMdtrtCertNo(clinic2206OrderResult.getMdtrtCertNo()).setMedType(clinic2206OrderResult.getMedType())
|
||||
.setMedfeeSumamt(clinic2206OrderResult.getMedfeeSumamt().doubleValue()).setPsnSetlway("01")
|
||||
.setMdtrtId(clinic2206OrderResult.getMdtrtId()).setChrgBchno(chrgBchno)
|
||||
.setAcctUsedFlag(Whether.YES.getValue().toString()).setInsutype(clinic2206OrderResult.getInsutype())
|
||||
.setFulamtOwnpayAmt(clinic2206OrderResult.getFulamtOwnpayAmt().doubleValue())
|
||||
.setOverlmtSelfpay(clinic2206OrderResult.getOverlmtSelfpay().doubleValue())
|
||||
.setPreselfpayAmt(clinic2206OrderResult.getPreselfpayAmt().doubleValue())
|
||||
.setInscpScpAmt(clinic2206OrderResult.getInscpScpAmt().doubleValue())
|
||||
.setInsuplcAdmdvs(clinicReg.getInsuplcAdmdvs());
|
||||
|
||||
Clinic2207OrderModel settle = ybHttpService.settle(clinicOrder, contract);
|
||||
|
||||
@@ -869,7 +872,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 医保预结算返回信息
|
||||
*
|
||||
*
|
||||
* @return 预结算结果
|
||||
*/
|
||||
public Yb2303OutputSetInfo preSettleInpatient(PrePaymentDto prePaymentDto) {
|
||||
@@ -880,8 +883,8 @@ public class YbManager {
|
||||
}
|
||||
|
||||
InpatientReg inpatientReg = inpatientRegService
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.getOne(new LambdaQueryWrapper<InpatientReg>().eq(InpatientReg::getIptNo, encounter.getBusNo())
|
||||
.orderByDesc(InpatientReg::getBegntime).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
if (inpatientReg == null) {
|
||||
throw new ServiceException("未查询到医保就诊记录");
|
||||
}
|
||||
@@ -894,13 +897,12 @@ public class YbManager {
|
||||
// 获取今天和昨天的上午10点时间
|
||||
// LocalDateTime today10AM = LocalDateTime.of(LocalDate.now(), LocalTime.of(10, 0)); // 今天10点
|
||||
// LocalDateTime yesterday10AM = today10AM.minusDays(1); // 昨天10点(自动处理跨月/年)
|
||||
|
||||
// List<ChargeItem> chargeItemList = iChargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
// .eq(ChargeItem::getEncounterId, encounterId).between(ChargeItem::getEnteredDate, yesterday10AM, today10AM));
|
||||
// List<ChargeItem> chargeItemList = iChargeItemService.list(new LambdaQueryWrapper<ChargeItem>()
|
||||
// .eq(ChargeItem::getEncounterId, encounterId).in(ChargeItem::getId, chargeItemIds));
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtos =
|
||||
iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds());
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtos
|
||||
= iChargeItemService.getChargeItemBaseInfoByIds(prePaymentDto.getChargeItemIds());
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoDtosList = new ArrayList<>();
|
||||
|
||||
// 查询基础信息 todo:childrenJson里面村的内容相比较ChargeItemBaseInfoDto有些不够,需要确认一下类里面实际用到的值在children里存不存在
|
||||
@@ -910,8 +912,8 @@ public class YbManager {
|
||||
}
|
||||
if (!StringUtils.isEmpty(chargeItemBaseInfoDto.getChildrenJson())) {
|
||||
// 反序列化:将JSON数组字符串转为List<>
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoList =
|
||||
JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
List<ChargeItemBaseInfoDto> chargeItemBaseInfoList
|
||||
= JSON.parseArray(chargeItemBaseInfoDto.getChildrenJson(), ChargeItemBaseInfoDto.class);
|
||||
chargeItemBaseInfoDtosList.addAll(chargeItemBaseInfoList);
|
||||
} else {
|
||||
chargeItemBaseInfoDtosList.add(chargeItemBaseInfoDto);
|
||||
@@ -922,11 +924,11 @@ public class YbManager {
|
||||
List<Yb2301InputFeeDetail> yb2301InputFeeDetailList = new ArrayList();
|
||||
BigDecimal quantity = BigDecimal.ZERO;
|
||||
// 分组分类
|
||||
Map<String, List<ChargeItemBaseInfoDto>> groupByTable =
|
||||
chargeItemBaseInfoDtosList.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceTable));
|
||||
Map<String, List<ChargeItemBaseInfoDto>> groupByTable
|
||||
= chargeItemBaseInfoDtosList.stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceTable));
|
||||
for (Map.Entry<String, List<ChargeItemBaseInfoDto>> stringListEntry : groupByTable.entrySet()) {
|
||||
Map<Long, List<ChargeItemBaseInfoDto>> groupById =
|
||||
stringListEntry.getValue().stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceId));
|
||||
Map<Long, List<ChargeItemBaseInfoDto>> groupById
|
||||
= stringListEntry.getValue().stream().collect(Collectors.groupingBy(ChargeItemBaseInfoDto::getServiceId));
|
||||
for (Map.Entry<Long, List<ChargeItemBaseInfoDto>> longListEntry : groupById.entrySet()) {
|
||||
quantity = BigDecimal.ZERO;
|
||||
for (ChargeItemBaseInfoDto chargeItemBaseInfoDto : longListEntry.getValue()) {
|
||||
@@ -937,17 +939,17 @@ public class YbManager {
|
||||
|
||||
yb2301InputFeeDetail = new Yb2301InputFeeDetail();
|
||||
yb2301InputFeeDetail.setFeedetlSn(chargeItemBaseInfoDto.getBusNo())
|
||||
.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo())
|
||||
.setMedType(String.valueOf(encounter.getYbClassEnum()))
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate())
|
||||
.setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
// 2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算
|
||||
.setDetItemFeeSumamt(quantity.multiply(chargeItemBaseInfoDto.getUnitPrice())).setCnt(quantity)
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
.setMdtrtId(inpatientReg.getMdtrtId()).setPsnNo(inpatientReg.getPsnNo())
|
||||
.setMedType(String.valueOf(encounter.getYbClassEnum()))
|
||||
.setFeeOcurTime(chargeItemBaseInfoDto.getEnteredDate())
|
||||
.setMedListCodg(chargeItemBaseInfoDto.getYbNo())
|
||||
.setMedinsListCodg(chargeItemBaseInfoDto.getBaseBusNo())
|
||||
// 2025-11-13 李方案住院部分的totalprice不可直接用,要用单价乘以数量,并且比如患者一天一袋氯化钠注射液,预结算的时候要根据同表同id进行归类计算
|
||||
.setDetItemFeeSumamt(quantity.multiply(chargeItemBaseInfoDto.getUnitPrice())).setCnt(quantity)
|
||||
.setPric(chargeItemBaseInfoDto.getUnitPrice()).setBilgDeptName(chargeItemBaseInfoDto.getDeptName())
|
||||
.setBilgDrName(chargeItemBaseInfoDto.getDoctName())
|
||||
.setBilgDeptCodg(chargeItemBaseInfoDto.getDeptYbNo())
|
||||
.setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
|
||||
yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
}
|
||||
@@ -968,10 +970,9 @@ public class YbManager {
|
||||
// .setBilgDrCodg(chargeItemBaseInfoDto.getDoctYbNo());
|
||||
// yb2301InputFeeDetailList.add(yb2301InputFeeDetail);
|
||||
// }
|
||||
|
||||
Yb2301InputFeeDetailModel yb2301InputFeeDetailModel = new Yb2301InputFeeDetailModel();
|
||||
yb2301InputFeeDetailModel.setFeedetail(yb2301InputFeeDetailList)
|
||||
.setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs());
|
||||
.setInsuplcAdmdvs(inpatientReg.getInsuplcAdmdvs());
|
||||
|
||||
List<Yb2301OutputResult> yb2301OutputResults = ybHttpService.upload2301FeeDetail(yb2301InputFeeDetailModel);
|
||||
// todo :数据保存
|
||||
@@ -998,15 +999,14 @@ public class YbManager {
|
||||
|
||||
Yb2303InputInpatient yb2303InputInpatient = new Yb2303InputInpatient();
|
||||
yb2303InputInpatient.setPsnNo(infoPerson.getPsnNo())
|
||||
.setMdtrtCertType(YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()) == null ? null
|
||||
: YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()).getValue())
|
||||
.setMdtrtCertNo(prePaymentDto.getBusiCardInfo()).setMedfeeSumamt(medfeeSumamt)
|
||||
.setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId())
|
||||
.setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs())
|
||||
.setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs());
|
||||
.setMdtrtCertType(YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()) == null ? null
|
||||
: YbMdtrtCertType.getByValue(prePaymentDto.getYbMdtrtCertType()).getValue())
|
||||
.setMdtrtCertNo(prePaymentDto.getBusiCardInfo()).setMedfeeSumamt(medfeeSumamt)
|
||||
.setPsnSetlway(YbPsnSetlWay.PSN_SETLWAY01.getValue()).setMdtrtId(inpatientReg.getMdtrtId())
|
||||
.setInsutype(infoPerson.getInsutype()).setInsuplcAdmdvs(infoPerson.getInsuplcAdmdvs())
|
||||
.setMdtrtareaAdmvs(iContractService.getContractListByYb().get(0).getAdmVs());
|
||||
|
||||
// todo:中途结算标志需要判断一下,待2304接口开发完成后编辑
|
||||
|
||||
Yb2303OutputSetInfo yb2303OutputSetInfo = ybHttpService.inpatientPreSettle(yb2303InputInpatient);
|
||||
|
||||
if (yb2303OutputSetInfo == null) {
|
||||
@@ -1020,7 +1020,7 @@ public class YbManager {
|
||||
|
||||
/**
|
||||
* 【住院结算】
|
||||
*
|
||||
*
|
||||
* @param contract 合同
|
||||
* @param paymentDto 结算参数
|
||||
* @return 结果
|
||||
@@ -1052,10 +1052,6 @@ public class YbManager {
|
||||
return yb2305OutputSetlInfo;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void hospitalAdmission() {
|
||||
}
|
||||
=======
|
||||
public void hospitalAdmission() {}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -5,19 +5,6 @@ package com.openhis.yb.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
<<<<<<< HEAD
|
||||
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:请概括描述当前类的主要用途和注意事项
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.constant.YbCommonConstants;
|
||||
import com.openhis.yb.domain.InpatientDischarge;
|
||||
@@ -27,22 +14,17 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 医保出院Mapper
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @author SunJQ
|
||||
* @date 2025-07-31
|
||||
*/
|
||||
@Service
|
||||
public class InpatientDischargeServiceImpl extends ServiceImpl<InpatientDischargeMapper, InpatientDischarge>
|
||||
implements IInpatientDischargeService {
|
||||
<<<<<<< HEAD
|
||||
implements IInpatientDischargeService {
|
||||
|
||||
|
||||
=======
|
||||
@Override
|
||||
public InpatientDischarge getByMdtrtId(String mdtrtId) {
|
||||
return baseMapper.selectOne(new LambdaQueryWrapper<InpatientDischarge>().eq(InpatientDischarge::getMdtrtId, mdtrtId)
|
||||
.eq(InpatientDischarge::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
.eq(InpatientDischarge::getDeleteFlag, DelFlag.NO.getCode()).last(YbCommonConstants.sqlConst.LIMIT1));
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user