Baltor Get started

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.

Files, names only

  • ATTRIBUTION.md 4.9 KB
  • LICENSE 1.0 KB
  • ONET-ATTRIBUTION.md 5.2 KB
  • PROCEDURE.md 3.9 KB
  • README.md 4.7 KB
  • TOOLS.md 2.2 KB
  • appointment_slot_allocator.py 12.1 KB
  • component.json 13.3 KB
  • examples/known_good.json 2.5 KB
  • examples/known_wrong.json 552 bytes
  • kit_schema.py 11.4 KB
  • test_package.py 6.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

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.