1. We receive a report via hl7 (in our existing system). We process that message and drop all data into a table
2. In that table we will have a column/field named status
3. the "new" Reporterator will run every so often and look for record with status 1
4. if status 1 then process as follows:
a. first we need to look at the facility column (and then query other table to get .rpt template file name)
b. using that template from a, generate the pdf
c. then query another DB to get the file name ([login to view URL])
d. add password to prevent editing
e. Place file in designated folder
Note: if it fails at any point we should change status to
2 if cannont generate pdf (missing data),
3 if can't get name,
4 if can't add password
[login to view URL] can't write to folder
f. update status to 99 if successful
As we want to use this with several systems, we need a config file to define
1. Database 1 - ip/user/password
a. main table for processing
b. table to get rpt file
2. Database 2 - ip/user/password
a. table to get uuid
3. fallback rpt, if no match found, then use this template (.rpt)
4. pdf password (in other app we had to define the pdfcrypt path. I can email you what we use now to add the password
5. folder to store pdfs