Library / Code module
Appointment slot allocator for providers and rooms
appointment_slot_allocator
Place appointment requests into providers' free time by priority, service, date window, duration, buffer and preferred provider, and report what could not be placed and why.
ATTRIBUTION.md4.9 KBLICENSE1.0 KBONET-ATTRIBUTION.md5.2 KBPROCEDURE.md3.9 KBREADME.md4.7 KBTOOLS.md2.2 KBappointment_slot_allocator.py12.1 KBcomponent.json13.3 KBexamples/known_good.json2.5 KBexamples/known_wrong.json552 byteskit_schema.py11.4 KBtest_package.py6.8 KB
Full files in your harness.
What it takes and gives
- Runs with
- Python 3.10 or later
- Command
python3 appointment_slot_allocator.py < input.json- Function
appointment_slot_allocator.run- Required input
- providers, requests
Cases it covers
- Known wrong example: Provider P1 lists two availability blocks that overlap on 2026-10-13, so free time is ambiguous and the helper must refuse. Refused as overlapping availability.
- input invalid: refused with exit code 2
- input not json: refused with exit code 2
- duplicate id: refused with exit code 2
- invalid date or time: refused with exit code 2
- empty availability block: refused with exit code 2
- overlapping availability: refused with exit code 2
- unknown provider: refused with exit code 2
Limits and scope
- Limits
- Greedy first fit: a later high-value request can be blocked by an earlier lower-priority one in the same priority band, and no request is moved once placed. Times are local wall-clock times without time zones or daylight saving changes. A provider serves one appointment at a time. Patient or client consent, reminders and cancellations are out of scope.
- Work activities
- Schedule appointments; Schedule patient procedures or appointments.
Details
- Kind
- Code module
- Licence
- MIT
- Declared effects
- runs commands
- Source
- github.com/alisonjieli-png/loop-engine/tools/creative_originals/occupation_task_kits/items/appointment_slot_allocator
- Size
- 12 files, 68.6 KB
- Identity
library.supply.creative_originals.89126c7c48e6fee34be9a975.6e0cb486e0d2cfe5- Version
6e0cb486e0d2cfe5fc2699e9548897fff395472348936097e9ba111cc4e537bf
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Where it is shown
- Records, schedules and budgetsDeterministic skills
Related components
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.