The number of empty beds cannot directly represent the number of occupancies. Maintenance, reservation and current occupancy belong to different resource states. The bed page needs to indicate whether it can be used and which occupancy business is being associated, rather than having only one free mark.

Resource ledger

Establish the relationship between rooms, beds and areas, and clarify which attributes are used to arrange services. Changes in bed resources and changes in service objects are two types of information that should be maintained separately and then related through occupancy records.

State boundaries

The business meanings of available, reserved, in use and deactivated should be determined in advance. Specific rules need to be given to determine whether the reservation has an expiration date and whether deactivation will affect existing occupancy. The same remarks field cannot be used to replace all statuses.

Historical query

Bed transfer, departure and re-check-in should form a continuous record. The current bed page is suitable for arranging daily work, and the historical query is suitable for the verification process. The purposes of the two views are different, but the data needs to be consistent.

Scenario Check

A bed transfer operation should simultaneously check the old bed, new bed and service recipient records. The page can display the current location, but historical queries also need to display the time and reason for the transfer to support subsequent business verification.

Specific verification method

Prepare a bed transfer operation and check that the original bed, new bed and occupancy record have changed at the same time; then try to associate two valid occupancies with the same bed to confirm that the conflict is prevented; query the past data after the bed is deactivated, and the historical occupancy and bed transfer reasons should still be intact.

The bed name can be adjusted, but the resource identification and historical occupancy relationship should remain stable. Each change in available status must have a corresponding action to facilitate explanation of why the bed is occupied or released.