We are attempting to search for appointments for a specific patient in specific date range and are finding that appointments that are in "checked in" status are not being returned. In reviewing the documentation, we haven't seen any reference to excluding results based on status. In fact there is a parameter that allows for filtering based on status so we can't figure out how to get these appointments returned in the FHIR GET.
I've run the following CCL in our CertA environment and find that there are 2 appointments for this patient in CHECKED IN state.
SELECT
S.PERSON_ID
, S.SCH_EVENT_ID
, S.BEG_DT_TM "@SHORTDATETIME"
, S.END_DT_TM "@SHORTDATETIME"
, SE_SCH_STATE_DISP = UAR_GET_CODE_DISPLAY(SE.SCH_STATE_CD)
FROM
SCH_APPT S
, (INNER JOIN SCH_EVENT SE ON (S.SCH_EVENT_ID=SE.SCH_EVENT_ID
AND S.SCHEDULE_SEQ=SE.SCHEDULE_SEQ))
WHERE S.PERSON_ID = 53824902
AND S.BEG_DT_TM>=CNVTDATETIME("23-MAR-2023 00:00:00.00")
AND S.END_DT_TM<CNVTDATETIME("27-MAR-2023 23:59:59.00")
WITH NOCOUNTER, SEPARATOR=" ", FORMAT
PERSON_ID SCH_EVENT_ID BEG_DT_TM END_DT_TM SE_SCH_STATE_DISP
53824902.00 31523277.00 03/24/23 11:30:00 03/24/23 11:45:00 Checked In
53824902.00 31523281.00 03/24/23 13:15:00 03/24/23 13:30:00 Checked In
Following is the FHIR GET we are executing and getting no results for:
The X-Request-Id for the above call was b66e8685-ac1a-4a2f-8cba-bbd23a0e44fe+LVlf_Lw1J
Thanks for any assistance you can provide.
Mike Krigbaum
Principal Product Manager
Enterprise Business Intelligence
CommonSpirit Health