Browse Source

历史排班

28169 1 year ago
parent
commit
45a55ecce5
2 changed files with 6 additions and 2 deletions
  1. 2 1
      controllers/patient_api_controller.go
  2. 4 1
      service/patient_service.go

+ 2 - 1
controllers/patient_api_controller.go View File

109
 	isscheduling, _ := c.GetInt64("isscheduling", 0)
109
 	isscheduling, _ := c.GetInt64("isscheduling", 0)
110
 	isprescription, _ := c.GetInt64("isprescription", 0)
110
 	isprescription, _ := c.GetInt64("isprescription", 0)
111
 	patientSoureType, _ := c.GetInt64("patientSoureType")
111
 	patientSoureType, _ := c.GetInt64("patientSoureType")
112
+	nurse, _ := c.GetInt64("nurse")
112
 	if page <= 0 {
113
 	if page <= 0 {
113
 		page = 1
114
 		page = 1
114
 	}
115
 	}
147
 
148
 
148
 	var patients []*models.Patients
149
 	var patients []*models.Patients
149
 	var total int64
150
 	var total int64
150
-	patients, total, err = service.GetPatientList(adminUserInfo.CurrentOrgId, keywords, page, limit, schedulType, bindingState, lapseto, source, theStartTIme, theEndtTIme, contagion, reimbursement_way, isscheduling, isprescription, isStartTime, isEndTime, patientSoureType)
151
+	patients, total, err = service.GetPatientList(adminUserInfo.CurrentOrgId, keywords, page, limit, schedulType, bindingState, lapseto, source, theStartTIme, theEndtTIme, contagion, reimbursement_way, isscheduling, isprescription, isStartTime, isEndTime, patientSoureType, nurse)
151
 
152
 
152
 	c.ServeSuccessJSON(map[string]interface{}{
153
 	c.ServeSuccessJSON(map[string]interface{}{
153
 		"patients": patients,
154
 		"patients": patients,

+ 4 - 1
service/patient_service.go View File

13
 )
13
 )
14
 
14
 
15
 // GetPatientList 返回患者的列表
15
 // GetPatientList 返回患者的列表
16
-func GetPatientList(orgID int64, keywords string, page, limit, schedulType, bindingState, lapseto, source, startTime, endTime, contagion, reimbursementWay, isscheduling, isprescription int64, isStartTime, isEndTime bool, patientSoureType int64) (patients []*models.Patients, total int64, err error) {
16
+func GetPatientList(orgID int64, keywords string, page, limit, schedulType, bindingState, lapseto, source, startTime, endTime, contagion, reimbursementWay, isscheduling, isprescription int64, isStartTime, isEndTime bool, patientSoureType int64, nurse int64) (patients []*models.Patients, total int64, err error) {
17
 
17
 
18
 	db := readDb.Table("xt_patients as p").Where("p.status=1")
18
 	db := readDb.Table("xt_patients as p").Where("p.status=1")
19
 	if orgID > 0 {
19
 	if orgID > 0 {
69
 	if patientSoureType > 0 {
69
 	if patientSoureType > 0 {
70
 		db = db.Where("p.patient_source =?", patientSoureType)
70
 		db = db.Where("p.patient_source =?", patientSoureType)
71
 	}
71
 	}
72
+	if nurse > 0 {
73
+		db = db.Where("p.head_nurse_id = ?", nurse)
74
+	}
72
 
75
 
73
 	offset := (page - 1) * limit
76
 	offset := (page - 1) * limit
74
 	if lapseto == 2 || lapseto == 3 {
77
 	if lapseto == 2 || lapseto == 3 {