I’m developing database systems for clinical trials using Ruby on Rails.
Some trials require ‘double data entry’ as a form of validation; I need
to incorporate this into my system and am having difficulties. My plan
would be to have it work as follows:
- Once a new record has been created, alongside the usual ‘edit’ option
there would be a ‘second data entry’ option.
- On clicking this, a ‘blank’ record would appear (as if a new record) -
but when submitted, this form data would be compared with the existing
record on the database.
- If any differences were found this form would be displayed again with
the relevant fields highlighted (Ã la validation, with the accompanying
text showing the previous values) and the user asked to confirm.
- After confirmation (or if the second input exactly matched the first
initially) the reocrd would be saved and a flag will be set in the table
that double data entry has been performed for that record.
Hopefully this could be handled in the same (edit) method by passing a
parameter (data_entry_mode or something). Ideally the second version
would not involve creating a new record in the database; any changes
would simply be written over the top of the first (perhaps the second
data entry values would be stored as session variables??).
Does anyone have any ideas on how best to accomplish this?
I apologise for the long and unusual nature of this query. Thank you for