diff --git a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java index f7fad35..7292124 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java @@ -122,6 +122,8 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { private String cityId; private String areaId; private String streetId; + + //医院id private List hospitalList; @@ -406,6 +408,28 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { //秦皇岛定制字段:是否产筛 0:未产筛 1:已产筛 public Integer productionSieveType; + //1 本县嫁外县 2 外县嫁本县 + private Integer wqxType; + + + private String currentAreaId; + + public String getCurrentAreaId() { + return currentAreaId; + } + + public void setCurrentAreaId(String currentAreaId) { + this.currentAreaId = currentAreaId; + } + + public Integer getWqxType() { + return wqxType; + } + + public void setWqxType(Integer wqxType) { + this.wqxType = wqxType; + } + public Integer getProductionSieveType() { return productionSieveType; } @@ -590,6 +614,19 @@ public class PatientsQuery extends BaseQuery implements IConvertToNativeQuery { condition = condition.orCondition(new MongoCondition[]{con1, con}); } + //1 本县嫁外县 2 外县嫁本县 +// private Integer wqxType; + if (null != wqxType && wqxType == 1) { + hospitalId = null; + condition = condition.and("areaId", currentAreaId, MongoOper.IS); + condition = condition.and("areaRegisterId", currentAreaId, MongoOper.NE); + } + + if (null != wqxType && wqxType == 2) { + hospitalId = null; + condition = condition.and("areaId", currentAreaId, MongoOper.NE); + condition = condition.and("areaRegisterId", currentAreaId, MongoOper.IS); + } if (null != pcensusTypeId) { condition = condition.and("pcensusTypeId", pcensusTypeId, MongoOper.IS); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java index 5dda91a..aa390f8 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java @@ -2614,7 +2614,12 @@ public class PatientFacade extends BaseServiceImpl { public PatientManagerResult patientManager(PatientManagerRequest patientManagerRequest) { PatientManagerResult patientManagerResult = new PatientManagerResult(); String hospitalId = autoMatchFacade.getHospitalId(patientManagerRequest.getOperatorId()); + + Organization organization = organizationService.getOrganization(Integer.parseInt(hospitalId)); + PatientsQuery patientsQuery = new PatientsQuery(); + patientsQuery.setCurrentAreaId(organization.getAreaId()); + patientsQuery.setWqxType(patientManagerRequest.getWqxType()); //孕产建档管理-初诊医生 是否 条件查询 if(StringUtils.isNotEmpty(patientManagerRequest.getProdDoctor())){ diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java index 9e79ed4..1abefb2 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java @@ -139,6 +139,18 @@ public class PatientManagerRequest extends BasePageQueryRequest { //预约下次检查时间 private String nextCheckTime; + //1 本县嫁外县 2 外县嫁本县 + private Integer wqxType; + + + public Integer getWqxType() { + return wqxType; + } + + public void setWqxType(Integer wqxType) { + this.wqxType = wqxType; + } + public Integer getDueStatus() { return dueStatus; }