Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Scheduling and Appointments; support for delete schedule, cancel booking, improved date filter in appointments page, etc. #9799

Merged
merged 22 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6165966
improve global error handler
rithviknishad Jan 6, 2025
bad911c
schedule & appointments: refactor; validations; fixes; new things...
rithviknishad Jan 6, 2025
aa10192
clean up and move api and types to new folder
rithviknishad Jan 7, 2025
c39c799
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 7, 2025
1ed6672
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 7, 2025
52c17ad
cancel appointment from public and other things
rithviknishad Jan 8, 2025
b178958
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 8, 2025
00cd8a8
remove tz hacks
rithviknishad Jan 8, 2025
aa3a1b6
i18n things and type fixes for slot type helper functions
rithviknishad Jan 9, 2025
e208412
support for creating availability and redesign weekday checkbox
rithviknishad Jan 9, 2025
ec46f3a
Sets the practitioner filter to the current user if they are in the l…
rithviknishad Jan 9, 2025
40c4463
add relative date range shortcuts
rithviknishad Jan 9, 2025
3d03834
improve date range experience (probably overengineered, but it works)
rithviknishad Jan 9, 2025
5da3dc2
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 9, 2025
24a53e2
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 9, 2025
d5ffc1b
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 9, 2025
8698446
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 10, 2025
a3386fd
Fix Typo public/locale/en.json
gigincg Jan 10, 2025
cb227f7
update slot size label
rithviknishad Jan 10, 2025
aad72e5
suggestions based on code review
rithviknishad Jan 10, 2025
9362909
Merge branch 'develop' into rithviknishad/feat/schedule-validations
rithviknishad Jan 10, 2025
2a12e60
add confirmation before cancelling appointments
rithviknishad Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 66 additions & 4 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,14 @@
"ROUNDS_TYPE__NORMAL": "Brief Update",
"ROUNDS_TYPE__TELEMEDICINE": "Tele-medicine Log",
"ROUNDS_TYPE__VENTILATOR": "Detailed Update",
"SCHEDULE_AVAILABILITY_TYPE_DESCRIPTION__appointment": "Patients can be booked for slots in this session",
"SCHEDULE_AVAILABILITY_TYPE_DESCRIPTION__closed": "Indicates the practitioner is not available for this session's time",
"SCHEDULE_AVAILABILITY_TYPE_DESCRIPTION__open": "Indicates the practitioner is available in this session",
"SCHEDULE_AVAILABILITY_TYPE__appointment": "Appointment",
"SCHEDULE_AVAILABILITY_TYPE__closed": "Closed",
"SCHEDULE_AVAILABILITY_TYPE__open": "Open",
"SCHEDULE_EXCEPTION_TYPE__MODIFY_SCHEDULE": "Modify Schedule",
"SCHEDULE_EXCEPTION_TYPE__UNAVAILABLE": "Unavailable",
"SCHEDULE_SLOT_TYPE__appointment": "Appointment",
"SCHEDULE_SLOT_TYPE__closed": "Closed",
"SCHEDULE_SLOT_TYPE__open": "Open",
"SLEEP__EXCESSIVE": "Excessive",
"SLEEP__NO_SLEEP": "No sleep",
"SLEEP__SATISFACTORY": "Satisfactory",
Expand Down Expand Up @@ -313,6 +316,7 @@
"active_files": "Active Files",
"active_prescriptions": "Active Prescriptions",
"add": "Add",
"add_another_session": "Add another session",
"add_as": "Add as",
"add_attachments": "Add Attachments",
"add_beds": "Add Bed(s)",
Expand Down Expand Up @@ -434,6 +438,7 @@
"authorize_shift_delete": "Authorize shift delete",
"auto_generated_for_care": "Auto Generated for Care",
"autofilled_fields": "Autofilled Fields",
"availabilities": "Availabilities",
"available_features": "Available Features",
"available_in": "Available in",
"available_time_slots": "Available Time Slots",
Expand Down Expand Up @@ -656,11 +661,14 @@
"create_position_preset_description": "Creates a new position preset in Care from the current position of the camera for the given name",
"create_preset_prerequisite": "To create presets for this bed, you'll need to link the camera to the bed first.",
"create_resource_request": "Create Request",
"create_schedule_template": "Create Schedule Template",
"create_template": "Create Template",
"create_user": "Create User",
"created": "Created",
"created_by": "Created By",
"created_date": "Created Date",
"created_on": "Created On",
"creating": "Creating...",
"criticality": "Criticality",
"csv_file_in_the_specified_format": "Select a CSV file in the specified format",
"current_address": "Current Address",
Expand All @@ -685,6 +693,7 @@
"date_of_result": "Covid confirmation date",
"date_of_return": "Date of Return",
"date_of_test": "Date of sample collection for Covid testing",
"date_range": "Date Range",
"day": "Day",
"death_report": "Death Report",
"delete": "Delete",
Expand Down Expand Up @@ -775,6 +784,7 @@
"edit_policy_description": "Add or edit patient's insurance details",
"edit_prescriptions": "Edit Prescriptions",
"edit_profile": "Edit Profile",
"edit_schedule_template": "Edit Schedule Template",
"edit_role": "Edit Role",
"edit_user_profile": "Edit Profile",
"edit_user_role": "Edit User Role",
Expand Down Expand Up @@ -895,6 +905,7 @@
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"encounters": "Encounters",
"end_datetime": "End Date/Time",
"end_time": "End Time",
"enter_aadhaar_number": "Enter a 12-digit Aadhaar ID",
"enter_aadhaar_otp": "Enter OTP sent to the registered mobile with Aadhaar",
"enter_abha_address": "Enter ABHA Address",
Expand Down Expand Up @@ -927,6 +938,7 @@
"etiology_identified": "Etiology identified",
"evening_slots": "Evening Slots",
"events": "Events",
"exception_created": "Exception created successfully",
"exception_deleted": "Exception deleted",
"exceptions": "Exceptions",
"expand_sidebar": "Expand Sidebar",
Expand Down Expand Up @@ -1136,6 +1148,7 @@
"last_administered": "Last administered",
"last_discharge_reason": "Last Discharge Reason",
"last_edited": "Last Edited",
"last_fortnight_short": "Last 2wk",
"last_login": "Last Login",
"last_modified": "Last Modified",
"last_modified_by": "Last Modified By",
Expand All @@ -1145,6 +1158,7 @@
"last_serviced_on": "Last Serviced On",
"last_updated_by": "Last updated by",
"last_vaccinated_on": "Last Vaccinated on",
"last_week_short": "Last wk",
"latitude_invalid": "Latitude must be between -90 and 90",
"left": "Left",
"length": "Length ({{unit}})",
Expand Down Expand Up @@ -1194,6 +1208,7 @@
"map_acronym": "M.A.P.",
"mark_all_as_read": "Mark all as Read",
"mark_as_complete": "Mark as Complete",
"mark_as_entered_in_error": "Mark as entered in error",
"mark_as_fulfilled": "Mark as Fullfilled",
"mark_as_noshow": "Mark as no-show",
"mark_as_read": "Mark as Read",
Expand Down Expand Up @@ -1245,6 +1260,7 @@
"moving_camera": "Moving Camera",
"my_doctors": "My Doctors",
"my_profile": "My Profile",
"my_schedules": "My Schedules",
"name": "Name",
"name_of_hospital": "Name of Hospital",
"name_of_shifting_approving_facility": "Name of shifting approving facility",
Expand All @@ -1257,11 +1273,15 @@
"new_password_confirmation": "Confirm New Password",
"new_password_same_as_old": "New password is same as old password, please enter a different new password.",
"new_password_validation": "New password is not valid.",
"new_session": "New Session",
"next_fortnight_short": "Next 2wk",
"next_sessions": "Next Sessions",
"next_week_short": "Next wk",
"no": "No",
"no_address_provided": "No address provided",
"no_appointments": "No appointments found",
"no_attachments_found": "This communication has no attachments.",
"no_availabilities_yet": "No availabilities yet",
"no_bed_asset_linked_allocated": "No bed/asset linked allocated",
"no_bed_types_found": "No Bed Types found",
"no_beds_available": "No beds available",
Expand Down Expand Up @@ -1306,6 +1326,7 @@
"no_resource_requests_found": "No requests found",
"no_results": "No results",
"no_results_found": "No Results Found",
"no_schedule_templates_found": "No schedule templates found for this month.",
"no_scheduled_exceptions_found": "No scheduled exceptions found",
"no_slots_available": "No slots available",
"no_slots_available_for_this_date": "No slots available for this date",
Expand All @@ -1330,6 +1351,7 @@
"notification_permission_denied": "Notification permission denied",
"notification_permission_granted": "Notification permission granted",
"notify": "Notify",
"number_min_error": "Must be greater than {{min}}",
"number_of_aged_dependents": "Number of Aged Dependents (Above 60)",
"number_of_beds": "Number of beds",
"number_of_beds_out_of_range_error": "Number of beds cannot be greater than 100",
Expand Down Expand Up @@ -1438,6 +1460,7 @@
"patient_update_error": "Could not update patient",
"patient_update_success": "Patient Updated Sucessfully",
"patients": "Patients",
"patients_per_slot": "Patients per Slot",
"pending": "Pending",
"permanent_address": "Permanent Address",
"permission_denied": "You do not have permission to perform this action",
Expand Down Expand Up @@ -1572,6 +1595,8 @@
"reject": "Reject",
"rejected": "Rejected",
"reload": "Reload",
"remarks": "Remarks",
"remarks_placeholder": "Enter remarks",
"remove": "Remove",
"remove_user": "Remove User",
"remove_user_organization": "Remove User from Organization",
Expand Down Expand Up @@ -1601,6 +1626,7 @@
"requested_by": "Requested By",
"required": "Required",
"required_quantity": "Required Quantity",
"reschedule": "Reschedule",
"resend_otp": "Resend OTP",
"reset": "Reset",
"reset_password": "Reset Password",
Expand Down Expand Up @@ -1644,13 +1670,35 @@
"save": "Save",
"save_and_continue": "Save and Continue",
"save_investigation": "Save Investigation",
"saving": "Saving...",
"scan_asset_qr": "Scan Asset QR!",
"schedule": "Schedule",
"schedule_appointment": "Schedule Appointment",
"schedule_availability_created_successfully": "Availability created successfully",
"schedule_availability_deleted_successfully": "Schedule availability deleted successfully",
"schedule_calendar": "Schedule Calendar",
"schedule_end_time": "End Time",
"schedule_for": "Scheduled for",
"schedule_information": "Schedule Information",
"schedule_remarks": "Remarks",
"schedule_remarks_placeholder": "Any additional notes about this session",
"schedule_session_time": "Session Time",
"schedule_session_type": "Session Type",
"schedule_sessions": "Sessions",
"schedule_sessions_min_error": "Add at least one session",
"schedule_slot_size": "Slot Size",
"schedule_slot_size_label": "Slot size (mins.)",
"schedule_slots_allocation_callout": "Allocating <strong>{{slots}} slots</strong> in this session provides approximately <strong>{{token_duration}} mins.</strong> for each patient.",
"schedule_start_time": "Start Time",
"schedule_template": "Schedule Template",
"schedule_template_name": "Template Name",
"schedule_template_name_placeholder": "Regular OP Day",
"schedule_valid_from_till_range": "Valid from <strong>{{from_date}}</strong> till <strong>{{to_date}}</strong>",
"schedule_weekdays": "Weekdays",
"schedule_weekdays_description": "Select the weekdays applicable for the template",
"schedule_weekdays_min_error": "Select at least one weekday",
"scheduled": "Scheduled",
"schedules": "Schedules",
"scheduled_for": "Schedule for:",
"scribe__reviewing_field": "Reviewing field {{currentField}} / {{totalFields}}",
"scribe_error": "Could not autofill fields",
"search": "Search",
Expand Down Expand Up @@ -1710,8 +1758,12 @@
"send_sample_to_collection_centre_title": "Send sample to collection centre",
"serial_number": "Serial Number",
"serviced_on": "Serviced on",
"session_capacity": "Session Capacity",
"session_expired": "Session Expired",
"session_expired_msg": "It appears that your session has expired. This could be due to inactivity. Please login again to continue.",
"session_title": "Session Title",
"session_title_placeholder": "IP Rounds",
"session_type": "Session Type",
"set_average_weekly_working_hours_for": "Set Average weekly working hours for",
"set_home_facility": "Set as home facility",
"set_your_local_language": "Set your local language",
Expand All @@ -1735,11 +1787,13 @@
"show_default_presets": "Show Default Presets",
"show_patient_presets": "Show Patient Presets",
"show_unread_notifications": "Show Unread",
"showing_all_appointments": "Showing all appointments",
"sign_in": "Sign in",
"sign_out": "Sign out",
"skill_add_error": "Error while adding skill",
"skill_added_successfully": "Skill added successfully",
"skills": "Skills",
"slot_configuration": "Slot Configuration",
"slots_left": "slots left",
"social_profile": "Social Profile",
"social_profile_detail": "Include occupation, ration card category, socioeconomic status, and domestic healthcare support for a complete profile.",
Expand All @@ -1759,6 +1813,7 @@
"start_datetime": "Start Date/Time",
"start_dosage": "Start Dosage",
"start_review": "Start Review",
"start_time": "Start Time",
"state": "State",
"status": "Status",
"stop": "Stop",
Expand Down Expand Up @@ -1786,6 +1841,7 @@
"systolic": "Systolic",
"tachycardia": "Tachycardia",
"target_dosage": "Target Dosage",
"template_deleted": "Template has been deleted",
"test_type": "Type of test done",
"tested_on": "Tested on",
"thank_you_for_choosing": "Thank you for choosing our care service",
Expand All @@ -1802,9 +1858,11 @@
"today": "Today",
"token": "Token",
"token_no": "Token No.",
"tomorrow": "Tomorrow",
"total_amount": "Total Amount",
"total_beds": "Total Beds",
"total_patients": "Total Patients",
"total_slots": "Total Slots",
"total_staff": "Total Staff",
"total_users": "Total Users",
"transcribe_again": "Transcribe Again",
Expand Down Expand Up @@ -1921,7 +1979,9 @@
"vacant": "Vacant",
"vaccinated": "Vaccinated",
"vaccine_name": "Vaccine name",
"valid_from": "Valid From",
"valid_otp_found": "Valid OTP found, Navigating to Appointments",
"valid_to": "Valid Till",
"valid_year_of_birth": "Please enter a valid year of birth (YYYY)",
"vehicle_preference": "Vehicle preference",
"vendor_name": "Vendor Name",
Expand Down Expand Up @@ -1978,6 +2038,7 @@
"ward": "Ward",
"warranty_amc_expiry": "Warranty / AMC Expiry",
"we_ve_sent_you_a_code_to": "We've sent you a code to",
"weekly_schedule": "Weekly Schedule",
"weekly_working_hours_error": "Average weekly working hours must be a number between 0 and 168",
"what_facility_assign_the_patient_to": "What facility would you like to assign the patient to",
"whatsapp_number": "Whatsapp Number",
Expand All @@ -1992,6 +2053,7 @@
"years_of_experience": "Years of Experience",
"years_of_experience_of_the_doctor": "Years of Experience of the Doctor",
"yes": "Yes",
"yesterday": "Yesterday",
"yet_to_be_decided": "Yet to be decided",
"you_need_at_least_a_location_to_create_an_assest": "You need at least a location to create an assest.",
"zoom_in": "Zoom In",
Expand Down
8 changes: 5 additions & 3 deletions src/CAREUI/display/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Callout({
return (
<div
className={cn(
"flex h-min gap-2 rounded-md px-2 py-1.5 text-sm/tight",
"flex items-center h-min gap-2 rounded-md px-2 py-2 text-sm/tight",
{
primary: "bg-primary-100/50 text-primary-800",
secondary: "bg-gray-50 text-gray-700",
Expand All @@ -29,7 +29,7 @@ export default function Callout({
>
<div
className={cn(
"h-min rounded-full border bg-white px-2 py-0.5",
"h-min rounded-full border bg-white px-2",
{
primary: "border-primary-200",
secondary: "border-secondary-300",
Expand All @@ -41,7 +41,9 @@ export default function Callout({
>
<span className="font-medium">{props.badge}</span>
</div>
<span className="font-medium">{props.children}</span>
<div className="flex-1">
<span className="font-medium">{props.children}</span>
</div>
</div>
);
}
Loading
Loading