|
@@ -12,6 +12,7 @@ import thyyxxk.webserver.entity.outpatient.interactive.clinicsatisfied.request.C
|
|
|
import thyyxxk.webserver.entity.outpatient.interactive.clinicsatisfied.request.ModifyStatus;
|
|
|
import thyyxxk.webserver.entity.outpatient.interactive.clinicsatisfied.request.VisitType;
|
|
|
import thyyxxk.webserver.entity.outpatient.interactive.clinicsatisfied.response.*;
|
|
|
+import thyyxxk.webserver.utils.DecimalUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
import thyyxxk.webserver.utils.TokenUtil;
|
|
@@ -52,6 +53,9 @@ public class ClinicSatisfiedService {
|
|
|
// index: 8
|
|
|
String willComeAgainOptionString = "{\"A\": \"会\",\"B\": \"不会\",\"C\": \"不一定\"}";
|
|
|
|
|
|
+ // index:9 问题 门诊:item15,住院:item23
|
|
|
+ String outpatientCheckboxOptionString4 = "{\"A\": \"专业能力\",\"B\": \"等待时长\",\"C\": \"服务态度\",\"D\": \"沟通解释\",\"E\": \"及时响应\",\"F\": \"服装礼仪\",\"G\": \"服务流程\"}";
|
|
|
+
|
|
|
mainAnswers = JSONObject.parseObject(mainAnswerString);
|
|
|
|
|
|
checkboxOptions.add(JSONObject.parseObject(outpatientCheckboxOptionString));
|
|
@@ -65,6 +69,7 @@ public class ClinicSatisfiedService {
|
|
|
|
|
|
checkboxOptions.add(JSONObject.parseObject(whyChooseHereOptionString));
|
|
|
checkboxOptions.add(JSONObject.parseObject(willComeAgainOptionString));
|
|
|
+ checkboxOptions.add(JSONObject.parseObject(outpatientCheckboxOptionString4));
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@@ -131,7 +136,7 @@ public class ClinicSatisfiedService {
|
|
|
item.setItem9(combineAnswerAndOptions(item.getItem9(), item.getItem10(), 0));
|
|
|
item.setItem11(combineAnswerAndOptions(item.getItem11(), item.getItem12(), 6));
|
|
|
item.setItem13(combineAnswerAndOptions(item.getItem13(), item.getItem14(), 1));
|
|
|
- item.setItem15(castYbkOption(item.getItem15(), item.getItem16Input()));
|
|
|
+ item.setItem15(combineAnswerAndOptions(item.getItem15(), item.getItem16(), 9));
|
|
|
item.setItem1002(analyzedCheckboxOptions(item.getItem1002(), 7));
|
|
|
item.setItem1004(analyzedCheckboxOptions(item.getItem1004(), 8));
|
|
|
});
|
|
@@ -148,7 +153,7 @@ public class ClinicSatisfiedService {
|
|
|
item.setItem17(combineAnswerAndOptions(item.getItem17(), item.getItem18(), 0));
|
|
|
item.setItem19(combineAnswerAndOptions(item.getItem19(), item.getItem20(), 0));
|
|
|
item.setItem21(combineAnswerAndOptions(item.getItem21(), item.getItem22(), 0));
|
|
|
- item.setItem23(castYbkOption(item.getItem23(), item.getItem24Input()));
|
|
|
+ item.setItem23(combineAnswerAndOptions(item.getItem23(), item.getItem24(), 9));
|
|
|
item.setItem1002(analyzedCheckboxOptions(item.getItem1002(), 7));
|
|
|
item.setItem1004(analyzedCheckboxOptions(item.getItem1004(), 8));
|
|
|
});
|
|
@@ -166,19 +171,6 @@ public class ClinicSatisfiedService {
|
|
|
return transferredAnswer + analyzedCheckboxOptions(options, optionIndex);
|
|
|
}
|
|
|
|
|
|
- private String castYbkOption(String answer, String input) {
|
|
|
- if (StringUtil.isBlank(answer)) {
|
|
|
- return "";
|
|
|
- }
|
|
|
- if (!answer.equals("B")) {
|
|
|
- return mainAnswers.getString(answer);
|
|
|
- }
|
|
|
- if (StringUtil.notBlank(input)) {
|
|
|
- return "不满意:" + input;
|
|
|
- }
|
|
|
- return "不满意";
|
|
|
- }
|
|
|
-
|
|
|
private String analyzedCheckboxOptions(String checkboxString, int optionIndex) {
|
|
|
if (StringUtil.isBlank(checkboxString)) {
|
|
|
return "";
|
|
@@ -266,12 +258,12 @@ public class ClinicSatisfiedService {
|
|
|
int mzyhUnsatisfiedCount = 0;
|
|
|
int jzyhAssessmentCount = 0;
|
|
|
int jzyhUnsatisfiedCount = 0;
|
|
|
+ // -->
|
|
|
|
|
|
int mjzdzhlCheckedOptionsCount = 0;
|
|
|
JSONObject mjzdzhlOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0}");
|
|
|
int mjzysCheckedOptionsCount = 0;
|
|
|
JSONObject mjzysOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0}");
|
|
|
-
|
|
|
int yjkCheckedOptionsCount = 0;
|
|
|
JSONObject yjkOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
int fskCheckedOptionsCount = 0;
|
|
@@ -282,6 +274,8 @@ public class ClinicSatisfiedService {
|
|
|
JSONObject jykOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
int sfckCheckedOptionsCount = 0;
|
|
|
JSONObject sfckOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
+ int ybkCheckedOptionsCount = 0;
|
|
|
+ JSONObject ybkOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
|
|
|
// <-- 以下住院独有
|
|
|
int hlryCheckedOptionsCount = 0;
|
|
@@ -296,13 +290,14 @@ public class ClinicSatisfiedService {
|
|
|
JSONObject mzyhOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
int jzyhCheckedOptionsCount = 0;
|
|
|
JSONObject jzyhOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
+ // -->
|
|
|
|
|
|
int whyComeHereOptionsCount = 0;
|
|
|
JSONObject whyComeHereOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
int willComeAgainOptionsCount = 0;
|
|
|
JSONObject willComeAgainOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0}");
|
|
|
int[] gradeNumDetails = new int[] {0,0,0,0,0,0,0,0,0,0};
|
|
|
-
|
|
|
+ int gradeSum = 0;
|
|
|
for (SatisfiedBody body : list) {
|
|
|
if (StringUtil.notBlank(body.getItem1002())) {
|
|
|
whyComeHereOptionsCount = getCheckedOptionsCount(whyComeHereOptionsCount,
|
|
@@ -315,6 +310,7 @@ public class ClinicSatisfiedService {
|
|
|
|
|
|
if (null != body.getItem1006()) {
|
|
|
int grade = body.getItem1006();
|
|
|
+ gradeSum += grade;
|
|
|
gradeNumDetails[grade - 1] = gradeNumDetails[grade - 1] + 1;
|
|
|
}
|
|
|
|
|
@@ -459,6 +455,7 @@ public class ClinicSatisfiedService {
|
|
|
totalUnsatisfiedOptionCount += 1;
|
|
|
if (visitType == VisitType.OUTPATIENT) {
|
|
|
ybkUnsatisfiedCount += 1;
|
|
|
+ ybkCheckedOptionsCount = getCheckedOptionsCount(ybkCheckedOptionsCount, ybkOptionsJson, body.getItem16());
|
|
|
} else {
|
|
|
jykUnsatisfiedCount += 1;
|
|
|
jykCheckedOptionsCount = getCheckedOptionsCount(jykCheckedOptionsCount, jykOptionsJson, body.getItem16());
|
|
@@ -493,6 +490,15 @@ public class ClinicSatisfiedService {
|
|
|
jzyhUnsatisfiedCount += 1;
|
|
|
jzyhCheckedOptionsCount = getCheckedOptionsCount(jzyhCheckedOptionsCount, jzyhOptionsJson, body.getItem22());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem23()) && !body.getItem23().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ ybkAssessmentCount += 1;
|
|
|
+ }
|
|
|
+ if (Objects.equals("B", body.getItem23())) {
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
+ ybkUnsatisfiedCount += 1;
|
|
|
+ ybkCheckedOptionsCount = getCheckedOptionsCount(ybkCheckedOptionsCount, ybkOptionsJson, body.getItem24());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
result.setTotalOptionCount(totalOptionCount);
|
|
@@ -557,6 +563,7 @@ public class ClinicSatisfiedService {
|
|
|
result.setCsyxkUnsatisfiedOption(fillOptionDetails(csyxkAssessmentCount, csyxkCheckedOptionsCount, csyxkOptionsJson, 0));
|
|
|
result.setJykUnsatisfiedOption(fillOptionDetails(jykAssessmentCount, jykCheckedOptionsCount, jykOptionsJson, 0));
|
|
|
result.setSfckUnsatisfiedOption(fillOptionDetails(sfckAssessmentCount, sfckCheckedOptionsCount, sfckOptionsJson, 0));
|
|
|
+ result.setYbkUnsatisfiedOption(fillOptionDetails(ybkAssessmentCount, ybkCheckedOptionsCount, ybkOptionsJson, 9));
|
|
|
|
|
|
// <-- 以下住院独有
|
|
|
result.setHlryUnsatisfiedOption(fillOptionDetails(hlryAssessmentCount, hlryCheckedOptionsCount, hlryOptionsJson, 2));
|
|
@@ -612,6 +619,7 @@ public class ClinicSatisfiedService {
|
|
|
grade.setEightCount(gradeNumDetails[7]);
|
|
|
grade.setNineCount(gradeNumDetails[8]);
|
|
|
grade.setTenCount(gradeNumDetails[9]);
|
|
|
+ grade.setAverageGrade(DecimalUtil.divide(new BigDecimal(gradeSum), new BigDecimal(gradeCount), 2));
|
|
|
|
|
|
grade.setOnePercentage(makePercentage(grade.getOneCount(), gradeCount));
|
|
|
grade.setTwoPercentage(makePercentage(grade.getTwoCount(), gradeCount));
|
|
@@ -706,6 +714,15 @@ public class ClinicSatisfiedService {
|
|
|
unsatisfiedOption.setJsxyPercentage(makePercentage(unsatisfiedOption.getJsxyCount(), checkedOptionSize));
|
|
|
unsatisfiedOption.setZqlCount(optionsJson.getInteger("G"));
|
|
|
unsatisfiedOption.setZqlPercentage(makePercentage(unsatisfiedOption.getZqlCount(), checkedOptionSize));
|
|
|
+ } else if (checkboxOptionIndex == 9) {
|
|
|
+ unsatisfiedOption.setZynlCount(optionsJson.getInteger("A"));
|
|
|
+ unsatisfiedOption.setZynlPercentage(makePercentage(unsatisfiedOption.getZynlCount(), checkedOptionSize));
|
|
|
+ unsatisfiedOption.setDdscCount(optionsJson.getInteger("B"));
|
|
|
+ unsatisfiedOption.setDdscPercentage(makePercentage(unsatisfiedOption.getDdscCount(), checkedOptionSize));
|
|
|
+ unsatisfiedOption.setJsxyCount(optionsJson.getInteger("E"));
|
|
|
+ unsatisfiedOption.setJsxyPercentage(makePercentage(unsatisfiedOption.getJsxyCount(), checkedOptionSize));
|
|
|
+ unsatisfiedOption.setFwlcCount(optionsJson.getInteger("G"));
|
|
|
+ unsatisfiedOption.setFwlcPercentage(makePercentage(unsatisfiedOption.getFwlcCount(), checkedOptionSize));
|
|
|
}
|
|
|
return unsatisfiedOption;
|
|
|
}
|