Open nihal467 opened 6 months ago
@gigincg / @aparnacoronasafe
Should the doctor availability record be optionally or mandatorily related to a Facility or a Location?
If yes (1), should they be allowed to be available in multiple facility/locations at the same time?
Dropping a mock UI here for suggestions
Dropping a draft model schema here:
UserAvailabilityModel:
# relations
user: ForeignKey(UserModel.id)
location: ForeignKey(AssetLocationModel.id, null=True) # Any one of location or facility or none in final
facility: ForeignKey(Facility.id, null=True) # Any one of location or facility or none in final
# fields
day_of_week: SmallIntegerField(choices=[sun, mon, tue, wed, thu, fri, sat], db_index=True)
start_time: TimeField(db_index=True)
end_time: TimeField(db_index=True)
# meta fields
removed_at: DateTimeField(auto_delete_now=True, null=True)
Indexes on fields day_of_week
, start_time
, end_time
fields in addition to user
, location
, facility
foreign keys.
@rithviknishad I also want to work on this issue.
Hey @shramanpaul As you can see this issue is already assigned and requires changes in both backend and frontend.
Feel free to pickup other unassigned issues: https://github.com/coronasafe/care_fe/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee
Ok @rithviknishad
Should the doctor availability record be optionally or mandatorily related to a Facility or a Location?
If yes (1), should they be allowed to be available in multiple facility/locations at the same time?
Updates as per discussion,
The availability record should be optionally linked to a location and not a facility. Only location of doctor's home facility should be selectable
As discussed,
A doctor's availability must be understood as: • physical availability (only to be given in a home facility) link to a facility is mandatory, with optional linking to one or more locations in that facility. ( Let's assume availability across locations may be overlapping, but not across facilities) • availability for online engagement
Now for nurses this will be different. Their availability will always be physical availability, restricted to 1 location at a time.
Also, we may be allowing multiple home facilities for doctors, to support palliative care use cases. Since a doctor can be involved with multiple palliative care teams.
The above schedule will be the duty staff schedule for locations. Duty Staff and this is essentially the same.
cc: @aparnacoronasafe
Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity.
Is your feature request related to a problem? Please describe.
Currently we are not recording doctors availability in a facility based on a date and time
Describe the solution you'd like
For example, if a user is available on Monday from 2:00 to 4:00 PM, and Tuesday from 3:00 to 4:00 PM, we should be able to mark it or specify day availability without a specific time. Alternatively, there can be an option to specify availability all day in case the user does not want to mention specific times or days of availability.