fail chemo ongoing
This commit is contained in:
No files matched your search
@@ -134,7 +134,7 @@ func getChemo(patientId uint, event *pl.Event) (*ecp.ChemoProtocol, error) {
|
||||
|
||||
tx = tx.Model(&ecp.ChemoProtocol{}).
|
||||
Joins(`"ChemoPlan" cp ON cp."Protocol_Id" = "ChemoProtocol"."Id"`).
|
||||
Where(`"Patient.Id" = ? AND (cp.Status = ? OR cp.Status IS NULL)`, patientId, ere.SPCPlanned).
|
||||
Where(`"Patient.Id" = ? AND cp."Status" = ?`, patientId, ere.SPCPlanned).
|
||||
Preload("ChemoPlans", func(db *gorm.DB) *gorm.DB {
|
||||
return tx.Order(`"Id" ASC`).Limit(1)
|
||||
}).
|
||||
|
||||
Reference in New Issue
Block a user