|
@ -319,6 +319,44 @@ public class SpecialistService{
|
|
return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
|
|
return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public MixEnvelop<PatientRelationVO, PatientRelationVO> getDoctorPatientByNameOrIdCard(String doctor, String filter,String teamCode, Integer page, Integer size){
|
|
|
|
String sql ="SELECT " +
|
|
|
|
" p.code AS patient, " +
|
|
|
|
" p.`name` AS patientName, " +
|
|
|
|
" p.photo, " +
|
|
|
|
" IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
|
|
|
|
" p.sex ," +
|
|
|
|
" h.label_name as health, " +
|
|
|
|
" h.label AS healthcode " +
|
|
|
|
" FROM " +
|
|
|
|
" wlyy_specialist_patient_relation r " +
|
|
|
|
" JOIN "+basedb+".wlyy_patient p ON r.patient = p.`code` " +
|
|
|
|
" LEFT JOIN ( " +
|
|
|
|
" SELECT " +
|
|
|
|
" t.label, " +
|
|
|
|
" t.label_name, " +
|
|
|
|
" t.patient " +
|
|
|
|
" FROM " +
|
|
|
|
" "+basedb+".wlyy_sign_patient_label_info t " +
|
|
|
|
" WHERE " +
|
|
|
|
" t.label_type = '8' " +
|
|
|
|
" AND t.`status` = '1' " +
|
|
|
|
" ) h ON h.patient = r.patient " +
|
|
|
|
" WHERE " +
|
|
|
|
" r.doctor IN ( SELECT m.doctor_code FROM wlyy.wlyy_admin_team_member m WHERE m.team_id ='" +teamCode+
|
|
|
|
"' ) " +
|
|
|
|
" AND r.status >=0 AND r.sign_status >0 " +
|
|
|
|
" AND (r.patient_name LIKE '%"+filter+"%' OR p.idcard LIKE '%"+filter+"%') "+
|
|
|
|
" LIMIT "+(page-1)*size+","+size;
|
|
|
|
|
|
|
|
List<PatientRelationVO> patientRelationVOs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(PatientRelationVO.class));
|
|
|
|
|
|
|
|
return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRelationVOs);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MixEnvelop<PatientRelationVO, PatientRelationVO> findPatientNoAssistant(String doctor, Integer page, Integer size){
|
|
public MixEnvelop<PatientRelationVO, PatientRelationVO> findPatientNoAssistant(String doctor, Integer page, Integer size){
|
|
|
|
|
|
String sqlTotal ="SELECT " +
|
|
String sqlTotal ="SELECT " +
|