I’m trying to get an Enum column’s values to not appear if already a value has been selected in a previous row.
In my app, the user will fill in the following details to fix a theatre session for a patient.
- [OT Date]
- [OT Room] -> This is an Enum where values are [OT - 1, OT - 2, OT - 3, OT - 4]
- [Time] -> This is also an Enum where values are [Morning, Evening]
- [Surgery Order] -> This is also an Enum where values are [1, 2, 3, 4, 5]
These columns are present in a table called “Full DB”.
Let’s say the app user selects “March 17th, 2020” as the [OT Date], “OT - 1” as the [OT Room], “Morning” as the [Time] and “1” as the [Surgery Order] in order to fix a theatre session for patient A.
If the user goes to fix a theatre session for patient B and proceeds to select the exact combination of [OT Date], [OT Room] and [Time], I would like the [Surgery Order]'s Enum values to figure the value “1” has already been selected, and therefore only 2,3,4 and 5 values should be available for the user to select so that user wouldn’t be fixing the identical theatre fixture of patient A for patient B as well.
Is this doable?
Your advice is much appreciated.