|
@ -500,14 +500,14 @@ public class PatientDiseaseService extends BaseService {
|
|
|
|
|
|
public List<Map<String,Object>> getPatientDiseaseCount(String doctor, Long teamCode) {
|
|
|
String sql ="SELECT " +
|
|
|
"count(id) AS count," +
|
|
|
"disease_name as labelName," +
|
|
|
"disease as label " +
|
|
|
"FROM wlyy.wlyy_patient_disease_server " +
|
|
|
"WHERE specialist_relation_code IN " +
|
|
|
"(SELECT id FROM wlyy_specialist.wlyy_specialist_patient_relation WHERE sign_status> 0 AND `status`>=0 " +
|
|
|
"AND doctor='"+doctor+"') " +
|
|
|
"GROUP BY disease";
|
|
|
"count(b.id) AS count," +
|
|
|
"b.disease_name AS labelName," +
|
|
|
"b.disease AS label " +
|
|
|
"FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
|
|
|
"JOIN wlyy.wlyy_patient_disease_server b ON a.patient=b.patient " +
|
|
|
"WHERE a.sign_status> 0 AND a.`status`>=0 " +
|
|
|
"AND a.doctor='"+doctor+"' " +
|
|
|
"GROUP BY b.disease";
|
|
|
|
|
|
List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
|
|
|
if(!result.isEmpty()){
|