Occupation Report
Description
Python script that, given an user id and a token, returns a summary of the appointments per each provider/ location/ appointment type, in a .csv file.
The .csv file contains a table divided by provider, location, appointment type, week, and the number of appointments of each day of that week.
Â
The name of file is created as follows:
Occupation_report_<userid>_<startDate>-<endDate>.csv
An image of the script being run is shown below:
This script is also useful in order to create an occupation heatmap in google sheets.
All advances and changes made during the creation of the occupation-report script can be found in this ticket.
Heatmap Step-by-Step Guide
What you will need:
The Id of the user you want to get the report of.
An authorization token for that user.
A duplicate of this Occupation Report Template sheet.
Â
Run the script with the desired user id and dates.
Open a new Occupation Report Template sheet, and rename it as it suits best.
Click on the
[Select this cell and import the .csv file]
and import the .csv file obtained in step 1. Make sure to click on the Replace date at selected cell option while importing the file.Â
Merge the cells of the title and adjust the format to taste.
Â
The final file should look like this:
Â
Â
Some Notes:
As a good practice, it is advised to declare your start date on Monday, and your end date on Sunday. It is not required, but it will make your report more concise and clear.
Each EHR has its own time interval limits. Make sure not to request bigger intervals than the EHR’s limits. If needed, you can run two times the script with different time intervals and join them together.