|
@@ -36,6 +36,7 @@ public class EmrControlRuleSeverV2 {
|
|
|
private final EmrControlDaoV2 dao;
|
|
|
private final EmrEditor editor;
|
|
|
private static final ConcurrentHashMap<String, Session> SESSION_MAP = new ConcurrentHashMap<>();
|
|
|
+
|
|
|
public EmrControlRuleSeverV2(EmrControlDaoV2 dao, EmrEditor editor) {
|
|
|
this.dao = dao;
|
|
|
this.editor = editor;
|
|
@@ -53,8 +54,11 @@ public class EmrControlRuleSeverV2 {
|
|
|
public ResultVo<JSONObject> specifyAdmissionQualityControl(String start, String end) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
|
|
|
- qw.ge("admiss_date", start);
|
|
|
- qw.le("admiss_date", end);
|
|
|
+ String sql = "(select count(1) " +
|
|
|
+ "from emr_audit_detail where pat_no = zy.inpatient_no and times = zy.admiss_times and history = 0 " + " and review_time >= ' " + start + "'" +
|
|
|
+ " and review_time <= '" + end + "' ) ";
|
|
|
+
|
|
|
+ qw.ge(sql, 1);
|
|
|
qw.notLike("inpatient_no", "JT");
|
|
|
|
|
|
List<QualityControlAnalysisOfMedicalRecords> patInfo = getPatients(qw);
|
|
@@ -120,7 +124,6 @@ public class EmrControlRuleSeverV2 {
|
|
|
// if (rule.getType() == 2) {
|
|
|
// executedAfterTheEvent(p, error, ruleV2);
|
|
|
// }
|
|
|
-
|
|
|
if (rule.getType() == 3) {
|
|
|
int count = thingsToDoBeforeTheEvent(p, error, ruleV2);
|
|
|
p.setAccordingToTheNumberOfDefects(count);
|
|
@@ -141,7 +144,7 @@ public class EmrControlRuleSeverV2 {
|
|
|
List<EmrAuditDetail> details = dao.patientQualityControl(p.getInpatientNo(), p.getAdmissTimes());
|
|
|
if (ListUtil.notBlank(details)) {
|
|
|
for (EmrAuditDetail detail : details) {
|
|
|
- p.setMapMessage("病历:【" + detail.getEmrName() + "】", detail.getName() + "【缺陷数" + detail.getNumberOfDefects() + "】,");
|
|
|
+ p.setQualityControlOpinions(detail);
|
|
|
p.setScore(detail.getScoringCriteria(), detail.getNumberOfDefects());
|
|
|
}
|
|
|
}
|