|
@ -565,7 +565,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -579,7 +579,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -596,7 +596,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -611,7 +611,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -629,7 +629,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -643,7 +643,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -657,7 +657,7 @@ public class DoctorSchemeService {
|
|
String pHighSql = "SELECT " +
|
|
String pHighSql = "SELECT " +
|
|
" count(1) AS highCount " +
|
|
" count(1) AS highCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
@ -668,7 +668,7 @@ public class DoctorSchemeService {
|
|
String pStdSql = "SELECT " +
|
|
String pStdSql = "SELECT " +
|
|
" count(1) AS stdCount " +
|
|
" count(1) AS stdCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
@ -680,7 +680,7 @@ public class DoctorSchemeService {
|
|
String pLowSql = "SELECT " +
|
|
String pLowSql = "SELECT " +
|
|
" count(1) AS lowCount " +
|
|
" count(1) AS lowCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
@ -746,7 +746,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -755,13 +755,13 @@ public class DoctorSchemeService {
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (" +
|
|
" AND i.user IN (" +
|
|
"SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
"SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) bf, " +
|
|
" ) bf, " +
|
|
" ( " +
|
|
" ( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -769,7 +769,7 @@ public class DoctorSchemeService {
|
|
" AND i.value1 > 11.1 " +
|
|
" AND i.value1 > 11.1 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) aft";
|
|
" ) aft";
|
|
String stdSql = "SELECT " +
|
|
String stdSql = "SELECT " +
|
|
" (bf.befHighCount + aft.aftHighCount) AS stdCount " +
|
|
" (bf.befHighCount + aft.aftHighCount) AS stdCount " +
|
|
@ -778,7 +778,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -787,13 +787,13 @@ public class DoctorSchemeService {
|
|
" AND i.value1 >= 4 " +
|
|
" AND i.value1 >= 4 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) bf, " +
|
|
" ) bf, " +
|
|
" ( " +
|
|
" ( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -802,7 +802,7 @@ public class DoctorSchemeService {
|
|
" AND i.value1 >= 4 " +
|
|
" AND i.value1 >= 4 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) aft";
|
|
" ) aft";
|
|
String lowSql = "SELECT " +
|
|
String lowSql = "SELECT " +
|
|
" (bf.befHighCount + aft.aftHighCount) AS lowCount " +
|
|
" (bf.befHighCount + aft.aftHighCount) AS lowCount " +
|
|
@ -811,7 +811,7 @@ public class DoctorSchemeService {
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" COUNT(1) AS befHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -819,13 +819,13 @@ public class DoctorSchemeService {
|
|
" AND i.value1 < 4 " +
|
|
" AND i.value1 < 4 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) bf, " +
|
|
" ) bf, " +
|
|
" ( " +
|
|
" ( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" COUNT(1) AS aftHighCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.type = '1' " +
|
|
" i.type = '1' " +
|
|
" AND i.del = '1' " +
|
|
" AND i.del = '1' " +
|
|
@ -833,24 +833,24 @@ public class DoctorSchemeService {
|
|
" AND i.value1 < 4 " +
|
|
" AND i.value1 < 4 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )" +
|
|
" ) aft";
|
|
" ) aft";
|
|
|
|
|
|
String pHighSql = "SELECT " +
|
|
String pHighSql = "SELECT " +
|
|
" count(1) AS highCount " +
|
|
" count(1) AS highCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.value1 > 139 " +
|
|
" AND i.value1 > 139 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )";
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )";
|
|
String pStdSql = "SELECT " +
|
|
String pStdSql = "SELECT " +
|
|
" count(1) AS stdCount " +
|
|
" count(1) AS stdCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
@ -858,18 +858,18 @@ public class DoctorSchemeService {
|
|
" AND i.value1 >= 90 " +
|
|
" AND i.value1 >= 90 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )";
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "' )";
|
|
String pLowSql = "SELECT " +
|
|
String pLowSql = "SELECT " +
|
|
" count(1) AS lowCount " +
|
|
" count(1) AS lowCount " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.type = '2' " +
|
|
" AND i.value1 < 90 " +
|
|
" AND i.value1 < 90 " +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date >='" + startDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.record_date <='" + endDate + "'" +
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy.wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "')";
|
|
|
|
|
|
" AND i.user IN (SELECT t.patient_code FROM wlyy_track_patient t WHERE t.del='1' AND t.doctor_code ='" + doctor + "')";
|
|
|
|
|
|
Map<String, Object> rs = new HashedMap();
|
|
Map<String, Object> rs = new HashedMap();
|
|
//0血檀
|
|
//0血檀
|
|
@ -927,7 +927,7 @@ public class DoctorSchemeService {
|
|
" i.value2 AS height, " +
|
|
" i.value2 AS height, " +
|
|
" i.value3 AS BMI " +
|
|
" i.value3 AS BMI " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = '3' " +
|
|
" AND i.type = '3' " +
|
|
@ -997,7 +997,7 @@ public class DoctorSchemeService {
|
|
" i.value2 AS height, " +
|
|
" i.value2 AS height, " +
|
|
" i.value3 AS BMI " +
|
|
" i.value3 AS BMI " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 3 " +
|
|
" AND i.type = 3 " +
|
|
@ -1219,7 +1219,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` in " +
|
|
" i.`user` in " +
|
|
" ( " +
|
|
" ( " +
|
|
@ -1237,7 +1237,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" JOIN wlyy_patient_aim_blood_pressure p ON p.patientcode = i.`user` " +
|
|
" JOIN wlyy_patient_aim_blood_pressure p ON p.patientcode = i.`user` " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` in " +
|
|
" i.`user` in " +
|
|
@ -1302,7 +1302,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` in " +
|
|
" i.`user` in " +
|
|
" ( " +
|
|
" ( " +
|
|
@ -1322,7 +1322,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` in " +
|
|
" i.`user` in " +
|
|
@ -1354,7 +1354,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` IN ( " +
|
|
" i.`user` IN ( " +
|
|
" SELECT " +
|
|
" SELECT " +
|
|
@ -1378,7 +1378,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` IN ( " +
|
|
" i.`user` IN ( " +
|
|
@ -1406,7 +1406,7 @@ public class DoctorSchemeService {
|
|
" i.`user`, " +
|
|
" i.`user`, " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" COUNT(1) AS dbtotal " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" JOIN wlyy_patient_aim_blood_sugger p ON p.patientcode = i.`user` " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.`user` IN ( " +
|
|
" i.`user` IN ( " +
|
|
@ -1641,7 +1641,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1676,7 +1676,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1718,7 +1718,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1753,7 +1753,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1796,7 +1796,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1832,7 +1832,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 1 " +
|
|
" AND i.type = 1 " +
|
|
@ -1893,7 +1893,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 2 " +
|
|
" AND i.type = 2 " +
|
|
@ -1925,7 +1925,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 2 " +
|
|
" AND i.type = 2 " +
|
|
@ -1959,7 +1959,7 @@ public class DoctorSchemeService {
|
|
" i. USER, " +
|
|
" i. USER, " +
|
|
" COUNT(1) AS total " +
|
|
" COUNT(1) AS total " +
|
|
" FROM " +
|
|
" FROM " +
|
|
" device.wlyy_patient_health_index i " +
|
|
|
|
|
|
" wlyy_patient_health_index i " +
|
|
" WHERE " +
|
|
" WHERE " +
|
|
" i.del = '1' " +
|
|
" i.del = '1' " +
|
|
" AND i.type = 2 " +
|
|
" AND i.type = 2 " +
|
|
@ -2191,9 +2191,9 @@ public class DoctorSchemeService {
|
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
map.put("gxy_yj", count1);// 高血压预警
|
|
map.put("gxy_yj", count1);// 高血压预警
|
|
map.put("gxy", count2);// 高血压预警
|
|
|
|
map.put("tnb_yj", count3);// 高血压预警
|
|
|
|
map.put("tnb", count4);// 高血压预警
|
|
|
|
|
|
map.put("gxy", count2);// 高血压
|
|
|
|
map.put("tnb_yj", count3);// 糖尿病预警
|
|
|
|
map.put("tnb", count4);// 糖尿病
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
@ -2201,7 +2201,7 @@ public class DoctorSchemeService {
|
|
* labelType 1高血压 2糖尿病
|
|
* labelType 1高血压 2糖尿病
|
|
*/
|
|
*/
|
|
public List<Map<String, Object>> getLabelDetail(String doctorId, String labelType, String searchContent, int page, int pageSize) {
|
|
public List<Map<String, Object>> getLabelDetail(String doctorId, String labelType, String searchContent, int page, int pageSize) {
|
|
String sql = "SELECTDISTINCT a.id,a.`name`,a.idcard,a.mobile,a.ssc, TIMESTAMPDIFF(YEAR, a.birthday, CURDATE()) AS age ,a.sex \n" +
|
|
|
|
|
|
String sql = "SELECT DISTINCT a.id,a.`name`,a.idcard,a.mobile,a.ssc, TIMESTAMPDIFF(YEAR, a.birthday, CURDATE()) AS age ,a.sex \n" +
|
|
"FROM base_patient a \n" +
|
|
"FROM base_patient a \n" +
|
|
"INNER JOIN base_patient_doctor_relation b ON a.id=b.patient_id\n" +
|
|
"INNER JOIN base_patient_doctor_relation b ON a.id=b.patient_id\n" +
|
|
"WHERE 1=1\n" +
|
|
"WHERE 1=1\n" +
|