|
@@ -39,6 +39,13 @@ func GetAdvicesByPrescription(orgid int64, patientid int64, recorddate int64) (m
|
39
|
39
|
return advice, err
|
40
|
40
|
}
|
41
|
41
|
|
|
42
|
+func UpdateDoctorAdvieById(id int64, prescription_number float64) (models.DoctorAdvice, error) {
|
|
43
|
+
|
|
44
|
+ advice := models.DoctorAdvice{}
|
|
45
|
+ err := XTWriteDB().Model(&advice).Where("id=? and status= 1", id).Updates(map[string]interface{}{"prescribing_number": prescription_number}).Error
|
|
46
|
+ return advice, err
|
|
47
|
+}
|
|
48
|
+
|
42
|
49
|
func CreatePatientInspection(inspectins []models.Inspection) (err error) {
|
43
|
50
|
if len(inspectins) == 0 {
|
44
|
51
|
err = errors.New("Inspections Cant be nil.")
|