My application working in a multi-users environment for medical records. One of the important parts of the application is writing the medical records, doctors should always review the current written data then adding or correcting any information's as needed.
I were aware about the situation when 2 doctors (A,B) viewing the data at same time, one of them will make changes and hit save (A).
the other doctor (B) still editing the old data & he don't know about the changes applied by doctor (A).
When doctor (B) hit save, the application will compare the Version column in the database, application then return an error message ("Data has been changed by another user !!!").
My Question in this case: What choices should be available within my solution.
I'm seeking an professional solution or idea from your experiences.
My application using: Java Swing for end user client & MySQL database.