|
@@ -686,12 +686,13 @@ func GetDialyisSolution(patientid int64, recorddate int64) (*models.DialysisPres
|
686
|
686
|
|
687
|
687
|
prescription := models.DialysisPrescription{}
|
688
|
688
|
|
689
|
|
- err := XTReadDB().Model(&prescription).Where("patient_id = ? and record_date = ? and status = 1", patientid, recorddate).Find(&prescription).Error
|
690
|
|
- if err == gorm.ErrRecordNotFound {
|
691
|
|
- return nil, err
|
692
|
|
- }
|
|
689
|
+ err := XTReadDB().Where("patient_id = ? and record_date = ? and status = 1", patientid, recorddate).Find(&prescription).Error
|
693
|
690
|
if err != nil {
|
694
|
|
- return nil, err
|
|
691
|
+ if err == gorm.ErrRecordNotFound {
|
|
692
|
+ return nil, err
|
|
693
|
+ } else {
|
|
694
|
+ return nil, err
|
|
695
|
+ }
|
695
|
696
|
}
|
696
|
697
|
return &prescription, nil
|
697
|
698
|
}
|