Closed marshalc closed 7 years ago
Look to move Trial ID selection to the point of starting a new event? Or reload the form once Trial ID has been selected?
Going with option B - but this is currently being overridden by AjaxFormMixin which inserts the AdminEventForm for admin users, and there's no equivalent AdminStartEventForm
Can do a restricted-to-essentials form for starting (Organ, Onset, Contact), but then when it saves, it goes to the detail, not update, view. Need to override get_success_url for first time results... but how to determine it is the first time?
get_success_url now refers new events to the full edit form.
Date of death is now loaded so that when you select "Yes" to did this lead to death, DoD is completed
There is still a potential problem about trying to add a DoD to an organ that does not have an actual recipient assigned?
No, there will be no error, but the Date of Death will not be saved (just discarded) because there is no Recipient patient to record it against - this perhaps should really generate an error on save, or at least a message?
Minor issue in that DoD can be set in the future and this is not being trapped by the Patient model clean() function!
Will file that under a future problem.. this issue appears to be resolved for practical purposes. And so is #271.
Date of Death doesn't load until the Trial ID is saved in the S/AE form, so on a new form with filling in happening immediately, it doesn't appear to exist.