|
@ -4478,6 +4478,7 @@ public class StatisticsEsService {
|
|
|
public JSONObject getPrescriptionLineBy(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
|
|
|
logger.info("service index:"+index+" and level2_type:"+level2_type+" and level:"+level);
|
|
|
String[] indexes = index.split(",");
|
|
|
String index3 = indexes.length>=3?indexes[2]:"20";
|
|
|
JSONArray resultArray = new JSONArray();
|
|
|
//问诊量
|
|
|
JSONObject object = new JSONObject();
|
|
@ -4515,7 +4516,7 @@ public class StatisticsEsService {
|
|
|
String prescriptionRate ="";
|
|
|
String prescriptionPayRate = "";
|
|
|
List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"","",level2_type);
|
|
|
List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[2], SaveModel.timeLevel_ZL,"1","",level2_type);
|
|
|
List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index3, SaveModel.timeLevel_ZL,"1","",level2_type);
|
|
|
|
|
|
if(SaveModel.OrgLevel.equals(level2_type)){
|
|
|
for(SaveModel saveModel:precriptionList){
|
|
@ -4578,6 +4579,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getDoctor()==null?"":saveModel2.getDoctor();
|
|
|
String pre=saveModel.getDoctor()==null?"":saveModel.getDoctor();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getDoctor()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4605,6 +4616,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getDept()==null?"":saveModel2.getDept();
|
|
|
String pre=saveModel.getDept()==null?"":saveModel.getDept();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getDept()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4619,8 +4640,11 @@ public class StatisticsEsService {
|
|
|
//开具处方数量
|
|
|
Double preNum = 0.0;
|
|
|
Double outNum = 0.0;
|
|
|
Double isPayNum = 0.0;//已支付的处方数量
|
|
|
String prescriptionRate ="";
|
|
|
String prescriptionPayRate = "";
|
|
|
List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"","","4");
|
|
|
List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index3, SaveModel.timeLevel_ZL,"1","","4");
|
|
|
for(SaveModel saveModel:precriptionList){
|
|
|
preNum = saveModel.getResult1();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
@ -4641,6 +4665,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getHospital()==null?"":saveModel2.getHospital();
|
|
|
String pre=saveModel.getHospital()==null?"":saveModel.getHospital();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getHospital()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4683,6 +4717,7 @@ public class StatisticsEsService {
|
|
|
public JSONObject getPrescriptionLineByType(String startDate, String endDate, String area, int level, String index,int interval, String level2_type) throws Exception {
|
|
|
logger.info("service index:"+index+" and level2_type:"+level2_type+" and level:"+level);
|
|
|
String[] indexes = index.split(",");
|
|
|
String index3 = indexes.length>=3?indexes[2]:"20";
|
|
|
JSONArray resultArray = new JSONArray();
|
|
|
//问诊量
|
|
|
JSONObject object = new JSONObject();
|
|
@ -4715,8 +4750,11 @@ public class StatisticsEsService {
|
|
|
//开具处方数量
|
|
|
Double preNum = 0.0;
|
|
|
Double outNum = 0.0;
|
|
|
Double isPayNum = 0.0;//已支付的处方数量
|
|
|
String prescriptionRate = "";
|
|
|
String prescriptionPayRate = "";
|
|
|
List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL, "", "", level2_type);
|
|
|
List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index3, SaveModel.timeLevel_ZL,"1","",level2_type);
|
|
|
if (SaveModel.OrgLevel.equals(level2_type)) {
|
|
|
//问诊量表格
|
|
|
for (SaveModel saveModel : precriptionList) {
|
|
@ -4735,6 +4773,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getHospital()==null?"":saveModel2.getHospital();
|
|
|
String pre=saveModel.getHospital()==null?"":saveModel.getHospital();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getHospital()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4763,6 +4811,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getDoctor()==null?"":saveModel2.getDoctor();
|
|
|
String pre=saveModel.getDoctor()==null?"":saveModel.getDoctor();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getDoctor()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4791,6 +4849,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getDept()==null?"":saveModel2.getDept();
|
|
|
String pre=saveModel.getDept()==null?"":saveModel.getDept();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getDept()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|
|
@ -4804,8 +4872,11 @@ public class StatisticsEsService {
|
|
|
//开具处方数量
|
|
|
Double preNum = 0.0;
|
|
|
Double outNum = 0.0;
|
|
|
Double isPayNum = 0.0;//已支付的处方数量
|
|
|
String prescriptionRate = "";
|
|
|
String prescriptionPayRate = "";
|
|
|
List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL, "", "", "4");
|
|
|
List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, index3, SaveModel.timeLevel_ZL,"1","","4");
|
|
|
for (SaveModel saveModel : precriptionList) {
|
|
|
preNum = saveModel.getResult1();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
@ -4826,6 +4897,16 @@ public class StatisticsEsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
for (SaveModel saveModel2:precriptionIsPayList){
|
|
|
String isPay=saveModel2.getHospital()==null?"":saveModel2.getHospital();
|
|
|
String pre=saveModel.getHospital()==null?"":saveModel.getHospital();
|
|
|
if(isPay.equalsIgnoreCase(pre)){
|
|
|
isPayNum = saveModel2.getResult1();
|
|
|
prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
|
|
|
jsonObject.put("prescriptionPayRate",prescriptionPayRate);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if(null==saveModel.getHospital()){
|
|
|
resultArray =new JSONArray();
|
|
|
}else {
|