advancedmd_list_open_slots, which finds bookable
appointment slots in AdvancedMD.
Authentication
AdvancedMD tools use the existing AdvancedMD connector. Users configure:office_codeusernamepassword
How availability is determined
AdvancedMD has no endpoint that returns open slots. Availability is derived from two calls:- Scheduler columns — each column’s configured working hours, slot length, working-day mask and overbooking limit.
- The day’s booked visits — the time to subtract.
Inputs
from(required): first date to search,YYYY-MM-DD.to(required): last date to search,YYYY-MM-DD.provider_id: restrict to one scheduler column, matched against its heading or name.service_location: restrict to columns whose heading or name contains this. Note this matches the column heading, which on a per-provider scheduler is a provider name rather than a site.limit: stop after this many slots.
Outputs
The result carriesfrom, to, count and slots. Each slot carries
start_time, end_time, duration_minutes, provider_id, provider_name
and service_location.
hours_unconfirmed is present and true on a slot whenever its scheduler
column returned no usable workweek mask, so the days it’s staffed could not be
confirmed — the slot defaults to showing every day rather than none, and this
is the signal that default was used.
When one or more days could not be read, two more fields appear:
partial_results: truefailed_days— how many days were dropped
count: 0 means “no availability” and with them it means “no availability that
we could confirm”. Retrying a narrower range usually resolves it.
Limits and behaviour worth knowing
- A day whose visit lookup fails is dropped, not reported as free. Claiming availability that was never verified is worse than returning less of it, so a partial range is possible.
- Columns hidden in AdvancedMD are never offered. A column outside its working-day mask produces nothing for that day.
- Bookings are matched to columns by column heading, because AdvancedMD’s
date-visit API rejects the numeric column id — it interpolates field names
into SQL and fails the whole call on the reserved word
Column. A visit with no heading cannot be attributed to a column, so it is counted against every column rather than ignored; that under-reports availability instead of inventing it. - A column whose slot length AdvancedMD reports as zero yields no slots. There is no default guess.
- One call per day in the range, plus one for the columns. AdvancedMD rate limits, so keep ranges tight.
- Availability is a snapshot, not a hold. Nothing is reserved, and a slot can be taken between reading it and booking it.