|
@@ -412,10 +412,15 @@ public class SiMzService {
|
|
|
QryPsnBsInfo mzptnt = new QryPsnBsInfo();
|
|
|
mzptnt.setStaffId(param.getStaffId());
|
|
|
mzptnt.setPatNo(param.getPatientId());
|
|
|
- mzptnt.setTimes(param.getTimes());
|
|
|
mzptnt.setMedType(MedType.GENERAL_CLINIC.getCode());
|
|
|
mzptnt.setOnlyQry(1);
|
|
|
mzptnt.setTimes(-1);
|
|
|
+
|
|
|
+ if (StringUtil.notBlank(param.getAdmdvs())) {
|
|
|
+ mzptnt.setAdmdvs(param.getAdmdvs());
|
|
|
+ mzptnt.setSocialNo(param.getSocialNo());
|
|
|
+ }
|
|
|
+
|
|
|
ResultVo<PsnBaseInfo> baseInfo = qryService.obtainBasicPersonInfo(mzptnt);
|
|
|
if (null == baseInfo) {
|
|
|
result.put("code", -2);
|
|
@@ -435,12 +440,14 @@ public class SiMzService {
|
|
|
result.put("msg", "患者没有职工医保,如需报销请走医保科流程。");
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
if (!isInsuplcAdmdvsEligible(insuInfo.getInsuplcAdmdvs())) {
|
|
|
result.put("code", -1);
|
|
|
result.put("msg", "患者参保地不满足门诊统筹要求。");
|
|
|
return result;
|
|
|
}
|
|
|
- psninfo.setInsutype(Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES.getCode());
|
|
|
+
|
|
|
+ psninfo.setInsutype(insuInfo.getInsutype());
|
|
|
int count = dao.selectSiMzInfoCount(mzptnt.getPatNo(), mzptnt.getTimes());
|
|
|
if (count == 0) {
|
|
|
psninfo.setMedType(MedType.GENERAL_CLINIC.getCode());
|
|
@@ -454,13 +461,31 @@ public class SiMzService {
|
|
|
}
|
|
|
result.put("code", 0);
|
|
|
result.put("expContentRequired", expContentRequired(insuInfo.getInsuplcAdmdvs()));
|
|
|
- result.put("msg", "查询职工参保信息成功。");
|
|
|
+ result.put("msg", "查询参保信息成功。");
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
private InsuInfo getEmployeeInsuInfo(List<InsuInfo> list) {
|
|
|
for (InsuInfo info : list) {
|
|
|
- if (info.getInsutype().equals("310")) {
|
|
|
+ Insutype insutype = Insutype.get(info.getInsutype());
|
|
|
+ if (null == insutype) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (insutype == Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES) {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private InsuInfo getValidInsuInfo(List<InsuInfo> list) {
|
|
|
+ for (InsuInfo info : list) {
|
|
|
+ Insutype insutype = Insutype.get(info.getInsutype());
|
|
|
+ if (null == insutype) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (insutype == Insutype.BASIC_MEDICAL_INSURANCE_FOR_EMPLOYEES ||
|
|
|
+ insutype == Insutype.BASIC_MEDICAL_INSURANCE_FOR_RURAL_RESIDENTS) {
|
|
|
return info;
|
|
|
}
|
|
|
}
|