I might be missing something here, but not sure how you are defining the difference between the slot and schedule?
The Schedule resource simply defines a period of time that slots may exist within, and for which other resource. It does not define or expose the appointments that may exist during this time.
The slot search parameters do not define any search parameters as you've implied. These are all on the schedule resource that it links from.
A Practitioner, Location and Patient can each have their own schedule/slots and thus it depends on the system where the complexity is defined.
Some systems decide that they are only going to worry about practitioners (who have their own room), others only worry about the room and will allocate practitioners later.
From my understanding of what I think you're trying to so (creating a FHIR Façade in front of a practice management system) I think you will need to expose the following resources:
- Practitioner: To expose the details of the practitioner (interested if your practitioners can work in multiple locations)
- Schedule: To simply expose the date range that you are accepting appointments (and will have slot availability defined) and the practitioner is linked to this resource, if they work at multiple locations, you'll have one of these for each location the practitioner works. (If the location resources have their own schedule, then will need to further consider it, and where the negotiation for available slots is done)
- Slot: To define the available slots that appointments could be scheduled into. (note: these are not appointments)
- Appointment: To receive the created appointments (Not sure how you're going to handle this if you don't have access to the schedule)
- Patient: Assuming that you want to assign patients to the appointments ;)
If this all makes sense and you clarify your environment, I'll put in the likely queries that you'll need to handle.
This was a great question, and Patient Administration is planning to write some implementation guidance on implementing this functionality in the various environments (General Practice, inpatient, outpatient, community, lab, etc.)