React Scheduler Component: All Slots disabled
# support
o
Hello, I would like to have a schedule the meeting capabilities and I am running hello world application for that. I've got the calendar rendered but all days to be selected are disabled. Probably I didn't create resources properly or something else is missing. can you please share how to fix the issue here are admin portal schedule and slot configuration and react code to render calendar component schedule json { "resourceType": "Schedule", "actor": [ { "reference": "Patient/48d2676a-9a59-41dd-ab4d-a87241d509ef", "display": "Alice Goh" } ], "id": "ff769e90-84de-4db5-adea-32d445d05695", "meta": { "project": "171c6cad-1129-4b92-9a14-4158ee0a06ac", "compartment": [ { "reference": "Project/171c6cad-1129-4b92-9a14-4158ee0a06ac" }, { "reference": "Patient/48d2676a-9a59-41dd-ab4d-a87241d509ef" } ], "versionId": "46c389d7-d85b-4230-ad26-792500d4f51a", "lastUpdated": "2024-01-22T20:17:25.411Z", "author": { "reference": "Practitioner/e78aaeb4-0645-460b-a653-1d1307aa9af1", "display": "Medplum Admin" } }, "planningHorizon": { "start": "2024-01-15T10:01:00.000Z", "end": "2024-01-29T10:02:00.000Z" }, "active": true } Slot json { "resourceType": "Slot", "schedule": { "reference": "Schedule/ff769e90-84de-4db5-adea-32d445d05695" }, "status": "free", "start": "2024-01-15T20:25:00.000Z", "end": "2024-02-05T20:25:00.000Z", "id": "248d275f-73c7-42a4-9f88-fa018c8b83a7", "meta": { "versionId": "e01b7897-6a25-4cb0-b264-3552c43549d9", "lastUpdated": "2024-01-22T20:25:37.162Z", "author": { "reference": "Practitioner/e78aaeb4-0645-460b-a653-1d1307aa9af1", "display": "Medplum Admin" }, "project": "171c6cad-1129-4b92-9a14-4158ee0a06ac", "compartment": [ { "reference": "Project/171c6cad-1129-4b92-9a14-4158ee0a06ac" } ] } } thanks
r
Take a look at this snippet https://github.com/medplum/medplum/blob/main/examples/medplum-demo-bots/src/sample-account-setup.ts#L185 Actor should be the Practitioner for schedule. Also slots should have start and end on the same day
r
Yes, I imagine the problem is that you have created only 1, multi-day slot
o
Great thank you @reshma and @rahul1 . I changed the slot to be within a day and it is working. I found yesterday sample-account-setup.ts and I found it is a great reference on many questions and how Medplum resources are organised. Do you guys think in case of wrong slot time configured exception or warning should be thrown? Again thank for you help.
r
That would be a reasonsable request. I've filed an issue here: https://github.com/medplum/medplum/issues/3801
149 Views