PHI copy automation: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
done by sending
updating
Line 1: Line 1:
==What does this scheduled task do?==
==What does this scheduled task do?==
As part of the [[:category:2013 data upgrades|2013 data upgrades]], [[CCMDB.mdb]] will now '''move''' the csv [[PHI Data]] files
A task scheduled on [[Trish Ostryzniuk | Trish's]] PC runs the batch file [[Copy PHI.bat]].
*'''from:''' {{Regionalserver|Output\_PHI}} ''("_" to sort separate from hospitals)''
*'''to:''' <file>X:\CCMDB\PHI</file>
{{Discussion}}
*It is not clear how is the copy of csv sent created from output folder to _PHI folder on regional server before scheduled task copies to X? [[User:TOstryzniuk|Trish Ostryzniuk]] 17:26, 2014 June 17 (CDT)
** the .csvs are generated by [[sending]]. Ttenbergen 14:25, 2014 June 19 (CDT)


The move is done using a scheduled task that runs on [[Trish Ostryzniuk | Trish's]] computer. It calls <file>X:\CCMDB\PHI\copy_PHI.bat</file> (see:  [[copy_PHI.bat]]).
It copies the PHI files exported by [[CCMDB.mdb]] during [[sending]] to {{Regionalserver|Output\_PHI}} to  <file>X:\CCMDB\PHI</file>. Then it calls the script [[Load Data.vbs]].
 
The batch file (<file>X:\CCMDB\PHI\copy_PHI.bat</file>) has a line to call the script: 'X:\CCMDB\PHI\Load Data.vbs' which opens the PHI_Loader.accdb and calls the code that imports all csv files found within the directory.  The csv loading code also moves the files again into an archive folder <file>X:\CCMDB\PHI\PHI Archive\</file> to prevent duplicate processing.


The script [[Load Data.vbs]] accesses [[PHI Loader.accdb]] and runs the sub ''loadAllCSVFiles'', which calls the code that imports all csv files found within the directory.  The csv loading code also moves the files again into an archive folder <file>X:\CCMDB\PHI\PHI Archive\</file> to prevent duplicate processing.


'''If the task runs and there are no problems the task will list "0x0" in the last results column. Any other code would require review.''' - This needs to be reviewed as the last line of the batch file has changed the the return value may be altered [[User:Bcloutier|Bcloutier]] 19:47, 2013 November 20 (CST)
'''If the task runs and there are no problems the task will list "0x0" in the last results column. Any other code would require review.''' - This needs to be reviewed as the last line of the batch file has changed the the return value may be altered [[User:Bcloutier|Bcloutier]] 19:47, 2013 November 20 (CST)
Line 27: Line 21:


==If X drive goes down==
==If X drive goes down==
IMPORTANT:
If main office notices that X drives is down, Data processor must not remove the csv files from the Regional server until:
If main office notices that X drives is down, Data processor must not remove the csv files from the Regional server until:
*Trish computer rebooted and network connection to X is checked to see if it has been re established, otherwise this bat files is not able to do its job.   
*Trish computer rebooted and network connection to X is checked to see if it has been re established, otherwise this bat files is not able to do its job.   

Revision as of 18:21, 31 July 2014

What does this scheduled task do?

A task scheduled on Trish's PC runs the batch file Copy PHI.bat.

It copies the PHI files exported by CCMDB.mdb during sending to Regional Server\​Output\_PHI\\ad.wrha.mb.ca\WRHA\REGION\SHARED\ICU_DATA_COLLECTION\Output\_PHI to <file>X:\CCMDB\PHI</file>. Then it calls the script Load Data.vbs.

The script Load Data.vbs accesses PHI Loader.accdb and runs the sub loadAllCSVFiles, which calls the code that imports all csv files found within the directory. The csv loading code also moves the files again into an archive folder <file>X:\CCMDB\PHI\PHI Archive\</file> to prevent duplicate processing.

If the task runs and there are no problems the task will list "0x0" in the last results column. Any other code would require review. - This needs to be reviewed as the last line of the batch file has changed the the return value may be altered Bcloutier 19:47, 2013 November 20 (CST)

Where schedule task lives

Trish's desktop

How often does it Run?

The scheduled task runs every 10 minutes

Problem

If the PC that this is scheduled on isn't running (shutdown) then data might be left on the server for some time. Probably OK for now since it would still only be temporary. Ttenbergen 16:32, 2013 July 29 (CDT)

  • currently Trish locks her computer each night and reboots it in the AM. Locking does not stop this scheduled task from running.
  • If Trish is away for 2 weeks or more then this task needs to be put on another person's desktop, either Tina, Pagasa or Julie. Trish Ostryzniuk 19:16, 2014 April 23 (CDT)

If X drive goes down

If main office notices that X drives is down, Data processor must not remove the csv files from the Regional server until:

  • Trish computer rebooted and network connection to X is checked to see if it has been re established, otherwise this bat files is not able to do its job.
    • occurrence: Monday June 15.14 at 1700 hrs and all day June 16.14: issue: Castrophic hardware failure on this network drive had occurred.