Utility to copy last years’ billings so that the files are not overwritten by OSCAR

Share this

From Peter Hutten-Czapski (for OSPs in Ontario):

#!/bin/bash
# archive_billing.sh
#=============================================#
# makes a folder and copies billing files
# run this as root Jan 1 of any year
# crontab pattern 0 0 1 1 * ./archive_billing.sh
#=============================================#

YEAR=$(date +"%Y")
DOC_DIR=/usr/share/oscar-emr/OscarDocument/oscar/
mkdir ${DOC_DIR}billing/download/${YEAR}
mv ${DOC_DIR}billing/download/*  ${DOC_DIR}billing/download/${YEAR}/

To be made into a .sh executable shell script to copy last years’ billings so that the files are not overwritten by OSCAR.