Attachment loader

Donate to this project

Development Project Status: Under Discussion

Due date for completion of this stage: 
21/08/2019
Release: 
Future
Project funding: 

You can donate money to this project by entering the amount above and clicking the 'Add to cart' button. In the Checkout process you can either choose to pay now (via Bank Transfer, Cheque or Pay Pal) or you can pledge the amount by choosing the 'Pledge a payment for a Development Project' method. If you make a pledge, then when we have 100% funding commitments, you will be notified by email and you can then action your payment. Note that development will not commence until all funds are received.

Project description: 

Overview

Provide support to automatically load customer and patient files from the file-system, using the customer or patient id encoded in the file name.

This can be used to simplify loading document scans for example.

Background

Patient and customer files can currently be automatically loaded from the file-system using the Document Loader. This parses the record identifier from the file name to attach to a pre-existing record in OpenVPMS. This is useful for loading the results of Patient Investigations for example, where the investigation identifier is encoded in the file name.

Support is required to load customer and patient files, where there is no record in OpenVPMS to load to.

Files

Files will be loaded to the appropriate customer or patient by encoding their id within the file name. The file name format will be:

  • Customer: C<customer id><any text>.<extension>
  • Patient: P<patient id><any text>.<extension>

E.g.:

  • C123456 Surgery Consent.jpg - corresponds to customer 123456
  • P734123 Admission.pdf - corresponds to patient 734123

 

Patient Visits

Patient documents will only be loaded where they can be attached to a patient visit. The timestamp of the file will be used to select the appropriate visit. If no visit can be found the file will be treated as an error.

Errors

Files might not be able to be loaded if:

  • their file name doesn't match the expected format
  • the customer or patient cannot be located
  • a patient visit cannot be located
  • they are empty

If a file cannot be loaded, it will be moved to an error directory.

Configuration

The tool will be configured via Administration - Jobs with a new type named "Attachment Loader'.

This will provide the following fields:

  • name - a name for the configuration, defaulting to "Attachment Loader"
  • description - a description of the configuration, defaulting to "Loads customer and patient attachments"
  • active - if selected, schedules the job to run, otherwise prevents it from running
  • source directory - the directory to look for files
  • destination directory - the directory to move loaded files to
  • error directory - the directory to move files that have failed to load
  • log - if selected, logs output to the log files
  • overwrite - if selected, indicates to overwrite attachments
  • runAs  - the user to create records as
  • notify - if selected, sends a message to the runAs user on completion, indicating the number of loaded files, the number of errors, and the path of the documents that failed to load. If no documents have loaded and there are no errors, no message is sent.
  • scheduling information (e.g. see the Document Loader configuration)

Multiple configurations will be supported. This is useful if documents are coming from different sources

 

Syndicate content