Преглед изворни кода

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 пре 7 година
родитељ
комит
e28f4dc9af

+ 17 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionDiagnosis.java

@ -21,6 +21,23 @@ public class PrescriptionDiagnosis  extends IdEntity {
    private Integer type;//1主诊断 2次诊断
    private Integer type;//1主诊断 2次诊断
    private Date createTime;
    private Date createTime;
    private Date updateTime;
    private Date updateTime;
    private String healthProblem;
    private String healthProblemName;
    public String getHealthProblem() {
        return healthProblem;
    }
    public void setHealthProblem(String healthProblem) {
        this.healthProblem = healthProblem;
    }
    public String getHealthProblemName() {
        return healthProblemName;
    }
    public void setHealthProblemName(String healthProblemName) {
        this.healthProblemName = healthProblemName;
    }
    public String getCode() {
    public String getCode() {
        return code;
        return code;

+ 13 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -14,6 +14,7 @@ import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.system.Icd10DictServcie;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.util.ImUtill;
import com.yihu.wlyy.util.ImUtill;
@ -70,6 +71,8 @@ public class PrescriptionInfoService extends BaseService {
    private PrescriptionExpressageDao prescriptionExpressageDao;
    private PrescriptionExpressageDao prescriptionExpressageDao;
    @Autowired
    @Autowired
    private SignFamilyDao signFamilyDao;
    private SignFamilyDao signFamilyDao;
    @Autowired
    private Icd10DictServcie icd10DictServcie;
    private static final Logger logger = LoggerFactory.getLogger(HttpUtil.class);
    private static final Logger logger = LoggerFactory.getLogger(HttpUtil.class);
@ -90,10 +93,10 @@ public class PrescriptionInfoService extends BaseService {
        rs.put("states",states);
        rs.put("states",states);
        List<Map<String,Object>> diseases = new ArrayList<>();
        List<Map<String,Object>> diseases = new ArrayList<>();
        Map<String,Object> dis1 = new HashMap<>();
        Map<String,Object> dis1 = new HashMap<>();
        dis1.put("code","1");
        dis1.put("code","HP0093");
        dis1.put("name","高血压");
        dis1.put("name","高血压");
        Map<String,Object> dis2 = new HashMap<>();
        Map<String,Object> dis2 = new HashMap<>();
        dis2.put("code","2");
        dis2.put("code","HP0047");
        dis2.put("name","糖尿病");
        dis2.put("name","糖尿病");
        diseases.add(dis1);
        diseases.add(dis1);
        diseases.add(dis2);
        diseases.add(dis2);
@ -369,7 +372,7 @@ public class PrescriptionInfoService extends BaseService {
            params.add(startDate);
            params.add(startDate);
        }
        }
        if(StringUtils.isNotBlank(endDate)){
        if(StringUtils.isNotBlank(endDate)){
            pre_sql.append(" AND pr.create_time <= ? ");
            pre_sql.append(" AND pr.create_time <= ?  ");
            params.add(endDate);
            params.add(endDate);
        }
        }
        if(StringUtils.isNotBlank(nameKeyword)){
        if(StringUtils.isNotBlank(nameKeyword)){
@ -512,6 +515,10 @@ public class PrescriptionInfoService extends BaseService {
                    p.setCreateTime(new Date());
                    p.setCreateTime(new Date());
                    p.setName(info.getString("name"));
                    p.setName(info.getString("name"));
                    p.setCode(info.getString("code"));
                    p.setCode(info.getString("code"));
                    String json = icd10DictServcie.getHealthProblemsByIcd10Code(info.getString("code"));
                    JSONObject healthProblem =new JSONObject(json);
                    p.setHealthProblem(healthProblem.getString("key"));
                    p.setHealthProblemName(healthProblem.getString("value"));
                    p.setPrescriptionCode(code);
                    p.setPrescriptionCode(code);
                    prescriptionDiagnosisDao.save(p);
                    prescriptionDiagnosisDao.save(p);
                }
                }
@ -851,10 +858,12 @@ public class PrescriptionInfoService extends BaseService {
                " FROM " +
                " FROM " +
                " wlyy_prescription pr " +
                " wlyy_prescription pr " +
                " JOIN wlyy_prescription_expressage e ON pr. CODE = e.prescription_code  " +
                " JOIN wlyy_prescription_expressage e ON pr. CODE = e.prescription_code  " +
                " JOIN wlyy_prescription_reviewed r ON pr.code = r.prescription_code " +
                " WHERE " +
                " WHERE " +
                " pr.admin_team_id = ? " +
                " pr.admin_team_id = ? " +
                " AND pr.dispensary_type = 3 " +
                " AND pr.dispensary_type = 3 " +
                " AND e.expressage_code IS NULL");
                " AND e.expressage_code IS NULL " +
                " AND r.status=1 ");
        List<Map<String,Object>> list = jdbcTemplate.queryForList(pre_sql.toString(),new Object[]{teamCode});
        List<Map<String,Object>> list = jdbcTemplate.queryForList(pre_sql.toString(),new Object[]{teamCode});
        if(list!=null&&list.size()>0){
        if(list!=null&&list.size()>0){