|
@@ -80,8 +80,8 @@ func GetAllPatientList(orgID int64) (patients []*models.Patients, total int64, e
|
80
|
80
|
return
|
81
|
81
|
}
|
82
|
82
|
|
83
|
|
-func GetPatientListByUpdateTime(orgID int64, syncTime int64, force int64) (patients []*models.PatientListForFace, total int64, err error) {
|
84
|
|
- db := readDb.Model(&models.PatientListForFace{}).Where("user_org_id=? and status=1", orgID)
|
|
83
|
+func GetPatientListByUpdateTime(orgID int64, syncTime int64, force int64) (patients []*models.PatientListForFaceList, total int64, err error) {
|
|
84
|
+ db := readDb.Model(&models.PatientListForFaceList{}).Where("user_org_id=? and status=1", orgID)
|
85
|
85
|
if force == 0 {
|
86
|
86
|
db = db.Where("updated_time >= ?", syncTime)
|
87
|
87
|
}
|
|
@@ -89,6 +89,11 @@ func GetPatientListByUpdateTime(orgID int64, syncTime int64, force int64) (patie
|
89
|
89
|
return
|
90
|
90
|
}
|
91
|
91
|
|
|
92
|
+func GetPatientListById(orgID int64, patientId int64) (patients models.PatientListForFace, err error) {
|
|
93
|
+ err = readDb.Model(&models.PatientListForFaceList{}).Where("user_org_id=? and id = ? and status=1", orgID,patientId).First(&patients).Error
|
|
94
|
+ return
|
|
95
|
+}
|
|
96
|
+
|
92
|
97
|
func GetPatientCount(orgID int64) (total int64) {
|
93
|
98
|
readDb.Model(&models.Patients{}).Where("user_org_id=? and status=1", orgID).Count(&total)
|
94
|
99
|
return
|