|
@@ -300,6 +300,19 @@ func GetAdminUserElectronicSignature(orgID int64, appID int64, userID int64) (*m
|
300
|
300
|
return &es, nil
|
301
|
301
|
}
|
302
|
302
|
|
|
303
|
+func GetPatientSignature(orgID int64, patientid int64, dialysis_date int64) (*models.DialysisOrder, error) {
|
|
304
|
+ var es models.DialysisOrder
|
|
305
|
+ err := XTReadDB().Model(&models.DialysisOrder{}).Where("user_org_id=? and patient_id=? and dialysis_date=? and status=1", orgID, patientid, dialysis_date).First(&es).Error
|
|
306
|
+
|
|
307
|
+ if err == gorm.ErrRecordNotFound {
|
|
308
|
+ return nil, nil
|
|
309
|
+ }
|
|
310
|
+ if err != nil {
|
|
311
|
+ return nil, err
|
|
312
|
+ }
|
|
313
|
+ return &es, nil
|
|
314
|
+}
|
|
315
|
+
|
303
|
316
|
func GetPatinentHead(orgid int64, appid int64, userid int64) (*models.SgjUserAdminPatientHead, error) {
|
304
|
317
|
var es models.SgjUserAdminPatientHead
|
305
|
318
|
err := readUserDb.Model(&models.SgjUserAdminPatientHead{}).Where("org_id = ? and app_id = ? and creator=? and status =1", orgid, appid, userid).First(&es).Error
|