Product Import
Submitted by Guest on Fri, 09/10/2015 - 18:16
Hi,
Is there any way to import data into OpenVPMS for products so I can add new products as well as fill out existing fields such as classification, dispensing, discount tabs etc, rather than manually having to do it one by one?
I have read somewhere about using Kettle, but just wondering if there is a user-friendly guide to using this or perhaps a template with all the product fields for OpenVPMS that someone has already created that we can simply fill out and use?
Many thanks
Shanon
Re: Product Import
Dear Shanon,
As a kettle user - I am going to say it ...this is a complex data manipulation product - it took me quite a while to get my head around its complexities and then working out the OpenVPMS plugin took a bit more.
I would be honest and say that unless you are talking about a couple of 1000 new products you will be far better off doing each 1 individually - I use the Copy product feature a lot - create a basic template for a batch of products that set the Category and classsifications etc then copy and change little bits.
But if you decide to go down this path yourself consider this a warning ...its a deep rabbit hole and you may find yourself frustrated.
Kettle works on the idea of a transform
So you start with a data source in your case it might be an excel file then kettle uses transforms to get that data into a format that is accepted by the OpenVPMS plugin that comes with each OpenVPMS distribution.
You will need Pentaho 3.2.0 version because after that the plugin format changed and OpenVPMS version works with that particular version of Pentaho
Kettle is the part of pentaho that handles data transforms.
Download the Software, install it and have a look and if you decide that its too much work, you might want to ask here for people who can do the transform and update the products for you. I think Tim A might have a project in the works that covers Batch Adding new products - I think it was going to be used to import price lists from Suppliers and labs and the like
Re: Product Import
Shanon - I would agree with Ben - Kettle is a wonderful tool but it does have a learning curve.
That said I build some transforms for a vet in Ireland - see http://www.openvpms.org/documentation/using-kettle-load-product-file
Read that and have a look at the attached file (right click on it and then do 'Save As' and change the extension to .zip).
This lot will let you bypass the problems of writing the kettle transforms. You should be able to generate the required CSV files - but you may find that firing up kettle is not straight forward - specifically the version that we use needs Java 7, not 8 [but OpenVPSM 1.8 needs Java 8 !!!]
There is another possible approach. If you look at the <OpenVPMS-HOME>\import\data\demo folder you will find a products.xml - this is a file that you load with the dataload utility (it is in <OpenVPMS-HOME>\bin
So the problem then becomes "how do I take my spreadsheet of products and turn it into something that dataload will process". It is possible to do this - I took this approach when building the species/breed data for our system - there were just under 700 to bring across from RxWorks. I also did this building the state/suburb data for a vet in South Africa - who have some 18000 'suburbs'.
Regards, Tim G