|
@ -140,7 +140,8 @@ public class SignJob implements Job {
|
|
//统计有签约的
|
|
//统计有签约的
|
|
for (SignFamily signFamily : signFamilys) {
|
|
for (SignFamily signFamily : signFamilys) {
|
|
String idcard = signFamily.getIdcard();//得到签约中患者的身份证号
|
|
String idcard = signFamily.getIdcard();//得到签约中患者的身份证号
|
|
Hospital hospital = hospitalsMap.get(signFamily.getHospital());//得到患者签约的机构
|
|
|
|
|
|
String orgCodeTemp=getOrg(signFamily.getHospital());
|
|
|
|
Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到患者签约的机构
|
|
String town = hospital.getTown();//得到患者签约的机构的区号
|
|
String town = hospital.getTown();//得到患者签约的机构的区号
|
|
String hospitalCode = hospital.getCode();//得到患者签约的机构号
|
|
String hospitalCode = hospital.getCode();//得到患者签约的机构号
|
|
String sex = IdCardUtil.getSexForIdcard(idcard);//根据身份证得到性别
|
|
String sex = IdCardUtil.getSexForIdcard(idcard);//根据身份证得到性别
|
|
@ -153,7 +154,7 @@ public class SignJob implements Job {
|
|
String orgCode=hospital.getCode();
|
|
String orgCode=hospital.getCode();
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
//统计站
|
|
//统计站
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
|
|
|
orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
compute_level2_1(orgSexMap,orgCodeTemp, sex);
|
|
compute_level2_1(orgSexMap,orgCodeTemp, sex);
|
|
} else {
|
|
} else {
|
|
//统计社区
|
|
//统计社区
|
|
@ -893,7 +894,9 @@ public class SignJob implements Job {
|
|
Map<String, Map<String, Long>> orgAgeMap = new HashMap<String, Map<String, Long>>();//key是机构代码
|
|
Map<String, Map<String, Long>> orgAgeMap = new HashMap<String, Map<String, Long>>();//key是机构代码
|
|
//统计有签约的
|
|
//统计有签约的
|
|
for (SignFamily signFamily : signFamilys) {
|
|
for (SignFamily signFamily : signFamilys) {
|
|
Hospital hospital = hospitalsMap.get(signFamily.getHospital());//得到患者签约的机构
|
|
|
|
|
|
|
|
|
|
String orgCodeTemp=getOrg(signFamily.getHospital());
|
|
|
|
Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到患者签约的机构
|
|
String town = hospital.getTown();
|
|
String town = hospital.getTown();
|
|
int age = IdCardUtil.getAgeForIdcard(signFamily.getIdcard());//根据card解析年龄
|
|
int age = IdCardUtil.getAgeForIdcard(signFamily.getIdcard());//根据card解析年龄
|
|
String ageCode = getAgeCode(age);//得到年龄的code
|
|
String ageCode = getAgeCode(age);//得到年龄的code
|
|
@ -922,7 +925,7 @@ public class SignJob implements Job {
|
|
String orgCode=hospital.getCode();
|
|
String orgCode=hospital.getCode();
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
//统计站
|
|
//统计站
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
|
|
|
orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
//统计机构
|
|
//统计机构
|
|
if (orgAgeMap.containsKey(orgCodeTemp)) {
|
|
if (orgAgeMap.containsKey(orgCodeTemp)) {
|
|
Map<String, Long> groupMapTemp = orgAgeMap.get(orgCodeTemp);
|
|
Map<String, Long> groupMapTemp = orgAgeMap.get(orgCodeTemp);
|
|
@ -1373,6 +1376,7 @@ public class SignJob implements Job {
|
|
Map<String, Long> tjQkdoctorMap = new HashMap<String, Long>();//团队级的统计map 目前没有团队 先用全科医生统一 key doctorCode
|
|
Map<String, Long> tjQkdoctorMap = new HashMap<String, Long>();//团队级的统计map 目前没有团队 先用全科医生统一 key doctorCode
|
|
Long cityCount = 0L;
|
|
Long cityCount = 0L;
|
|
//统计有签约的
|
|
//统计有签约的
|
|
|
|
String orgCodeTemp="";
|
|
for (SignFamily signFamily : signFamilys) {
|
|
for (SignFamily signFamily : signFamilys) {
|
|
String doctorCode = signFamily.getDoctor();//得到签约中全科医生的code
|
|
String doctorCode = signFamily.getDoctor();//得到签约中全科医生的code
|
|
//统计团队
|
|
//统计团队
|
|
@ -1387,14 +1391,15 @@ public class SignJob implements Job {
|
|
//统计站
|
|
//统计站
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
if(!"00".equals(orgCode.substring(orgCode.length()-2,orgCode.length()))){
|
|
//统计站
|
|
//统计站
|
|
String orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
|
|
|
|
orgCodeTemp=orgCode.substring(0,orgCode.length()-2)+"00";
|
|
compute_level1(tjOrgMap, orgCodeTemp);
|
|
compute_level1(tjOrgMap, orgCodeTemp);
|
|
} else {
|
|
} else {
|
|
//统计社区
|
|
//统计社区
|
|
compute_level1(tjOrgMap, orgCode);
|
|
compute_level1(tjOrgMap, orgCode);
|
|
|
|
orgCodeTemp=orgCode;
|
|
}
|
|
}
|
|
|
|
|
|
Hospital hospital=hospitalsMap.get(doctor.getHospital());
|
|
|
|
|
|
Hospital hospital=hospitalsMap.get(orgCodeTemp);
|
|
String townCode = hospital.getTown();
|
|
String townCode = hospital.getTown();
|
|
//统计区
|
|
//统计区
|
|
compute_level1(tjTownMap, townCode);
|
|
compute_level1(tjTownMap, townCode);
|
|
@ -1405,13 +1410,18 @@ public class SignJob implements Job {
|
|
//保存全科医生的签约统计
|
|
//保存全科医生的签约统计
|
|
for (Map.Entry<String, Doctor> entry : doctorsMap.entrySet()) {
|
|
for (Map.Entry<String, Doctor> entry : doctorsMap.entrySet()) {
|
|
Doctor doctor = doctorsMap.get(entry.getKey());//得到全科医生
|
|
Doctor doctor = doctorsMap.get(entry.getKey());//得到全科医生
|
|
Hospital hospital = hospitalsMap.get(doctor.getHospital());//得到全科医生的机构
|
|
|
|
|
|
orgCodeTemp=getOrg(doctor.getHospital());
|
|
|
|
Hospital hospital = hospitalsMap.get(orgCodeTemp);//得到全科医生的机构
|
|
String city=Constant.city;
|
|
String city=Constant.city;
|
|
String cityName=Constant.cityName;
|
|
String cityName=Constant.cityName;
|
|
String town=hospital.getTown();
|
|
String town=hospital.getTown();
|
|
String townName=hospital.getTownName();
|
|
String townName=hospital.getTownName();
|
|
String org=doctor.getHospital();
|
|
|
|
String orgName=doctor.getHosptialName();
|
|
|
|
|
|
String org=hospital.getCode();
|
|
|
|
if(!"00".equals(hospital.getCode().substring(hospital.getCode().length()-2,hospital.getCode().length()))){
|
|
|
|
//统计站
|
|
|
|
org=hospital.getCode().substring(0,hospital.getCode().length()-2)+"00";
|
|
|
|
}
|
|
|
|
String orgName=hospital.getName();
|
|
String doctorCode=doctor.getCode();
|
|
String doctorCode=doctor.getCode();
|
|
String doctorName=doctor.getName();
|
|
String doctorName=doctor.getName();
|
|
String doctorJob=doctor.getJob();
|
|
String doctorJob=doctor.getJob();
|
|
@ -1557,7 +1567,13 @@ public class SignJob implements Job {
|
|
String dateString = formatter.format(date);
|
|
String dateString = formatter.format(date);
|
|
return dateString;
|
|
return dateString;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String getOrg(String org){
|
|
|
|
if(!"00".equals(org.substring(org.length()-2,org.length()))){
|
|
|
|
return org.substring(0,org.length()-2)+"00";
|
|
|
|
}else{
|
|
|
|
return org;
|
|
|
|
}
|
|
|
|
}
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
getDayString(0);
|
|
getDayString(0);
|
|
}
|
|
}
|