|
@@ -72,9 +72,14 @@ public class SiQueryService {
|
|
|
}
|
|
|
JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.OBTAIN_BASIC_PERSON_INFO, qryPsnBsInfo.getAdmdvs());
|
|
|
JSONObject data = new JSONObject();
|
|
|
- data.put("mdtrt_cert_type", MdtrtCertType.RESIDENT_IDENTITY_CARD.getCode());
|
|
|
+ if (qryPsnBsInfo.getSocialNo().length() < 15) {
|
|
|
+ data.put("mdtrt_cert_type", MdtrtCertType.OTHER.getCode());
|
|
|
+ data.put("psn_cert_type", PsnCertType.RESIDENCE_PERMIT_FOR_HMT.getCode());
|
|
|
+ } else {
|
|
|
+ data.put("mdtrt_cert_type", MdtrtCertType.RESIDENT_IDENTITY_CARD.getCode());
|
|
|
+ data.put("psn_cert_type", "01");
|
|
|
+ }
|
|
|
data.put("mdtrt_cert_no", qryPsnBsInfo.getSocialNo());
|
|
|
- data.put("psn_cert_type", "01");
|
|
|
data.put("certno", qryPsnBsInfo.getSocialNo());
|
|
|
if (StringUtil.notBlank(qryPsnBsInfo.getName())) {
|
|
|
data.put("psn_name", qryPsnBsInfo.getName());
|
|
@@ -102,6 +107,22 @@ public class SiQueryService {
|
|
|
if (null != naty) {
|
|
|
psnBaseinfo.setNatyName(naty.getName());
|
|
|
}
|
|
|
+ List<IdetInfo> idetInfos = new ArrayList<>();
|
|
|
+ JSONArray idet = output.getJSONArray("idetinfo");
|
|
|
+ for (int i = 0; i < idet.size(); i++) {
|
|
|
+ JSONObject item = idet.getJSONObject(i);
|
|
|
+ IdetInfo info = JSONObject.parseObject(item.toJSONString(), IdetInfo.class);
|
|
|
+ PsnIdetType psnIdetType = PsnIdetType.get(info.getPsnIdetType());
|
|
|
+ if (null != psnIdetType) {
|
|
|
+ psnBaseinfo.setPsnIdetType(psnIdetType.getCode());
|
|
|
+ info.setPsnIdetTypeName(psnIdetType.getName());
|
|
|
+ }
|
|
|
+ idetInfos.add(info);
|
|
|
+ }
|
|
|
+ if (StringUtil.notBlank(psnBaseinfo.getPsnIdetType())) {
|
|
|
+ dao.updatePsnIdetType(psnBaseinfo.getPsnIdetType(), psnBaseinfo.getPsnNo());
|
|
|
+ }
|
|
|
+ psnBaseinfo.setIdetinfo(idetInfos);
|
|
|
if (new Integer(1).equals(qryPsnBsInfo.getNeedSaving())) {
|
|
|
dao.updateZyActpatient(psnBaseinfo);
|
|
|
int saved = dao.selectSiZyInfoCount(qryPsnBsInfo.getPatNo(), qryPsnBsInfo.getTimes(), qryPsnBsInfo.getLedgerSn());
|
|
@@ -146,18 +167,6 @@ public class SiQueryService {
|
|
|
list.add(info);
|
|
|
}
|
|
|
psnBaseinfo.setInsuinfo(list);
|
|
|
- List<IdetInfo> idetInfos = new ArrayList<>();
|
|
|
- JSONArray idet = output.getJSONArray("idetinfo");
|
|
|
- for (int i = 0; i < idet.size(); i++) {
|
|
|
- JSONObject item = idet.getJSONObject(i);
|
|
|
- IdetInfo info = JSONObject.parseObject(item.toJSONString(), IdetInfo.class);
|
|
|
- PsnIdetType psnIdetType = PsnIdetType.get(info.getPsnIdetType());
|
|
|
- if (null != psnIdetType) {
|
|
|
- info.setPsnIdetTypeName(psnIdetType.getName());
|
|
|
- }
|
|
|
- idetInfos.add(info);
|
|
|
- }
|
|
|
- psnBaseinfo.setIdetinfo(idetInfos);
|
|
|
return ResultVoUtil.success(psnBaseinfo);
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
@@ -715,6 +724,10 @@ public class SiQueryService {
|
|
|
if (null == lst) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到此患者的结算信息!");
|
|
|
}
|
|
|
+ PsnIdetType psnIdetType = PsnIdetType.get(lst.getPsnIdetType());
|
|
|
+ if (null != psnIdetType) {
|
|
|
+ lst.setPsnIdetTypeName(psnIdetType.getName());
|
|
|
+ }
|
|
|
Admdvs admdvs = Admdvs.get(lst.getInsuplcAdmdvs());
|
|
|
if (null == admdvs) {
|
|
|
lst.setInsuplcAdmdvsName(dao.selectRegionName(lst.getInsuplcAdmdvs()));
|