Hi. I am trying to create mock data for beds allocated for a patient.
I want to generate rows with the following attributes: id, patient_entry_time, patient_leaving_time and bed_id
I use numbers 1-60 to represent an id for each unique bed. I also record the patient entry datetime and patient leaving datetime for a patient over a period of let's say two weeks. These are two datetime columns and I have written functions to ensure the leaving datetime is later than the patient entry datetime.
Now for each patient, I need to allocate a random bed. However, I need to ensure that only one patient uses a bed at one time. In other words, a bed shouldn't be used by multiple patients at any moment of time over the two week period.
I would really appreciate any suggestions as to how I can achieve this desired mock data. I am hoping to generate at least 100 rows of data and ideally as many as possible.