huangwenjie 7 роки тому
батько
коміт
8844a39585

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/health/repository/DevicePatientHealthIndexDao.java

@ -101,9 +101,9 @@ public interface DevicePatientHealthIndexDao
	@Query(value= " select * from device.wlyy_patient_health_index where type in (?1) and record_date BETWEEN ?2 AND ?3  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code and s.status > 0 AND s.admin_team_code = ?4 and p.disease >0)",nativeQuery = true)
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(String type ,Date start, Date end,String teamcode);
	@Query("select a from PatientHealthIndex a where a.user = ?1 and a.type =?2  order by recordDate desc ")
	List<DevicePatientHealthIndex> findByPatientAndType(String patientCode, int type, Pageable pageable);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type =?2  order by recordDate desc ")
	List<DevicePatientHealthIndex> findByPatientAndTypeByPage(String patientCode, int type, Pageable pageable);
	@Query("select count(a) from PatientHealthIndex a where a.recordDate >= ?1 and a.recordDate <= ?2 and a.type in (1,2) and a.status = ?3 and a.del = '1'")
	@Query("select count(a) from DevicePatientHealthIndex a where a.recordDate >= ?1 and a.recordDate <= ?2 and a.type in (1,2) and a.status = ?3 and a.del = '1'")
	int getCountByTimeAndStatus(Date start, Date end,int status);
}

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -811,12 +811,12 @@ public class PatientHealthIndexService extends BaseService {
        List<DevicePatientHealthIndex> bloodPressurepatientHealthIndices = new ArrayList<>();
        List<DevicePatientHealthIndex> bloodSuggurpatientHealthIndices = new ArrayList<>();
        if( 1 == patient.getDisease()){
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,2,pageable);
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,2,pageable);
        } else if( 2 == patient.getDisease()){
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,1,pageable);
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,1,pageable);
        } else {
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,2,pageable);
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndType(patientCode,1,pageable);
            bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,2,pageable);
            bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,1,pageable);
        }
        for (DevicePatientHealthIndex patientHealthIndex : bloodPressurepatientHealthIndices) {

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -804,8 +804,8 @@ public class SignPatientLabelInfoController extends BaseController {
            page = page - 1;
//            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize,diseaseCondition);
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel("xy201703150222", filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
//            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel("xy201703150222", filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {