/
PatientView "Dashboard" Script

PatientView "Dashboard" Script

The original purpose of this script was to produce an extract for units to allow units to complete their returns on PatientView useage because PV itself didn't have a report, or when it did that it didn't supply all the required detail.

To my knowledge no-one actively uses it for that but it's still useful as it provides a report on all the patients who are a member of a particular group and when they last logged on. It is scheduled to run once a month on db.patientview.org which would have fit in with the Dashboard requirements.

Code

There is some confusion here as there are copies on both the Internet and N3 BitBucket servers and the server itself has uncomitted changes. This is due I think to the PV server being unable to contact the N3 Bitbucket server and how someone has tried to address that. There is a ticket for reviewing this at

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Running the Extract

The extract will have been running on the first of the month with files being saved in dated folders in /home/pv2db/outgoing . It is quite likely that these will be sufficient for what you need without needing to run a new one especially.

If you do need to run a new one log onto the PV DB server as pv2db and run the following (this is the same as the cron command).

. pv-scripts/venv/bin/activate && pv-scripts/scripts/pv_usage.py

(note that the "." is significant)

This will create a new dated folder under /home/pv2db/outgoing with the latest data.

Notes

A patient who is a member of multiple groups will appear in multiple files.


There also seem to be some notes about this at the following URL but I think they may be out of date.

/wiki/spaces/INFRA/pages/962723896