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,6 +109,7 @@ func (c *PatientApiController) GetPatientsList() {
109 109
 	isscheduling, _ := c.GetInt64("isscheduling", 0)
110 110
 	isprescription, _ := c.GetInt64("isprescription", 0)
111 111
 	patientSoureType, _ := c.GetInt64("patientSoureType")
112
+	nurse, _ := c.GetInt64("nurse")
112 113
 	if page <= 0 {
113 114
 		page = 1
114 115
 	}
@@ -147,7 +148,7 @@ func (c *PatientApiController) GetPatientsList() {
147 148
 
148 149
 	var patients []*models.Patients
149 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 153
 	c.ServeSuccessJSON(map[string]interface{}{
153 154
 		"patients": patients,

+ 4 - 1
service/patient_service.go View File

@@ -13,7 +13,7 @@ import (
13 13
 )
14 14
 
15 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 18
 	db := readDb.Table("xt_patients as p").Where("p.status=1")
19 19
 	if orgID > 0 {
@@ -69,6 +69,9 @@ func GetPatientList(orgID int64, keywords string, page, limit, schedulType, bind
69 69
 	if patientSoureType > 0 {
70 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 76
 	offset := (page - 1) * limit
74 77
 	if lapseto == 2 || lapseto == 3 {