improved
April 4, 2023
over 1 year ago by Amna Hashmi
📆 Appointments and five other FHIR resource types now included in Data Marts.
Builders can now analyze Appointment, Consent, Device, DeviceUseStatement, FamilyMemberHistory, and Goal FHIR resource types. Please see the linked FHIR specification to understand what the resource types represent.
For example, suppose you want to identify which patients have had the most appointments in the last year. The query below will retrieve an ordered result set.
select
universal_patient_identifier,
count(distinct id)
from appointment
where status != 'cancelled'
and end >= dateadd(year, -1, current_date())
group by 1
order by 2 desc;