Quantivly provides a rich set of built-in functions to calculate common operational metrics such as:
These functions go beyond simple counts:
- ✅ Respect configured operating hours 
- ✅ Correctly clip exams and appointments at time boundaries 
- ✅ Handle overlaps between appointments 
- ✅ Account for patient Buffer time (pre/post exam) to model patient 
- ✅ Support calculation of statistics restricted to specified time blocks 
- ✅ Compute everything in your requested time zone, accounting for potentially scanners in different time zones 
Behind the scenes, each function expands into highly optimized SQL (sometimes thousands of lines), validated against diverse synthetic scenarios for accuracy and consistency.
All functions live in the metrics PostgreSQL namespace.
Next : 
Schedule utilization is a ratio between your operating time and the total schedule time. 
It can be calculated for any period of time, for one or many scanners.
It requires HL7 to be available.
How are Operating Hours handled?
- Most visualizations take Operating Hours into account, meaning that metrics are only calculated for days that have defined operating hours. Days without defined hours are excluded from the calculation. 
- In queries, you can choose to’ Ignore operating hours’: each day is treated as a full 24-hour period. Utilization is calculated as - scheduled appointment time ÷ 24 hours
 
What about scanner closures?
What if there are overlapping appointments?
Related notion : Operating hours
Also known as : patient change time, patient turnaround time
Definition :
- Buffer time is a number of minutes to include at the beginning and end of an exam, to account for time spent preparing the scanner for patients. This time is counted as part of an exam when calculating metrics like Inter-Exam Gap or Room Utilization. 
- Buffer time is a parameter, set by users based on their estimates and their observations 
Static buffer : a set value (e.g. 20mn pre+post exam) gets added on before (20mn) and after (20mn) the exams. In the example, it would amount to a total of 40mn of added time.
