[OH-GUI] Fix "OPD No." field prediction

Description

In OPD > New, the field "OPD No." field is automatically calculated by the system but can also be changed by the user. The aim of this is: the user set the first number (must be a positive integer, in line with the hospital hard-copy, if any) and the system will proceed incrementing it automatically.

Problem: if two or more client are inserting data, the initial prediction upon windows opening could be the same for two different clients and so it could fail when saving (OP-719); OP-719 made - as workaround - the system recalculate a new number; nevertheless, for an high load of concurrent accesses, the fail/recalculation process could happen several time before to find a free number.

Proposed solution: to allow the user to set the first number only at the very first insert into the table (first record), otherwise the field turn not editable and the value calculated only upon save.

Environment

None

Activity

Done

Details

Assignee

Reporter

Labels

Original estimate

Time tracking

3h logged1h remaining

Components

Fix versions

Priority

Created February 7, 2022 at 10:00 PM
Updated July 22, 2022 at 9:29 AM
Resolved March 3, 2022 at 7:02 AM