Using the Openvpms Docloader

Openvpms has a number of methods to enter data or information into your Openvpms MySQL instance.  To convert large data sets the OPENVPMS Kettle Plugin for Pentaho Data Intergration version 3.2 should be used, however it is possible to use the dataloader and also the document loaders to enter some data.  The dataloader parses a properly structured XML file and loads it into the database, creating the correct linkages as it does so.

The DocumentLoader loads patient or customer documents or attachments into the Database.  This article will summarize the available options when using the document loader. Further details explaining how to implement an automatic loader that can load lab results is details here.

This will cover the arguments we can use with the docloader

--byid (-i) or --byname (-n)  You must use one of these options otherwise the docloader fails.

1.--byid (-i)  Using this options looks for an investigation ID to attach the file to.  If you specify byid you can also specify

--source (-s)  the source directory to load from  (default ./)

--dest  (-d) the destination to archine processed documents

--regexp   a java regexp statement to allow correct parsing of the document name to extract the ID

Default Value = [^\\d]*(\\d+).*

--overwrite (short flag -o )  if used  allows you to overwrite existing documents rather than add a new one.

--recurse (short flag -r) if set  that will scan the source recursively

--type(-t) I believe you can specify the archetype shortname you are targetting.  If not set it will default to Patient Investigations. The archetype short name. May contain wildcards. ie act.*Document*

--context (-c) Default ./applicationContext.xml Please rememeber the .bat or .sh usually sets this to ../conf/applicationContext.xml.  So usually you should not set it.

--verbose (-v) Verbose Logging..Logs verbose message to the log or console.

--failonerror (-e) fails on any error. Used for testing purposes usually.

2. --byname (-n) Using this option Load files by matching their names with document acts"

You can only set source, destination, recursive and type when this option is used. Overwrite, and regexp are ignored.

Syndicate content