Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

feature request : import function in Inventory (with .csv file fore exemple) #456

Closed
DoumeDuSud opened this issue May 12, 2016 · 2 comments

Comments

@DoumeDuSud
Copy link

I just descover and I find it great

But from my side, it could be used only if there have an import function. Because it's not posible to import by hand thousent of item in order to star using it

Thanks for all

@jkleinsc
Copy link
Member

@DoumeDuSud I have good news for you! There is an import tool for inventory in the server project that you can use! The tool is located here: https://github.com/HospitalRun/hospitalrun-server/blob/master/utils/inv-import.js. In order to use the tool, clone the hospitalrun server repo from here: https://github.com/HospitalRun/hospitalrun-server . You will need to configure the config.js file (it can be the same as the one from the frontend). Once you have it configured, you can run the import in the utils directory by running the following:
node inv-import.js file.csv YYYY-MM-DD, eg node inv-import.js file.csv 2015-12-31

The date specified will be used as the date that the purchases were received.

The csv fields that are supported are as follows:

  • aisleLocation (optional) - if item is in a particular aisle in a location, specify that name here.
  • distributionUnit (optional) - the unit type used when this item is distributed in the hospital. You can see the valid values in the app at Admin/Lookup Lists/Unit Types. If there is a distribution unit you use that is not in the list, you can add it on this screen.
  • expirationDate (optional) - format is MM/DD/YYYY
  • giftInKind (optional) - value should be Yes if item is gift in kind
  • location(optional) - Location of item
  • lotNumber (optional) - Lot number of item
  • name (required) - Display name of item
  • purchaseCost (required) - Total purchase cost for the items. This would be the cost per unit x the quantity. The purchase cost is used with the quantity to determine the cost per unit.
  • quantity (required) - Number of items.
  • type - use Medication for medicine; other types can be specified, but they should be added in the interface through Admin/Lookup Lists/Inventory Types
  • vendor (optional) - Name of vendor who supplied item
  • vendorItemNo (optional) - Vendor item number

The first row of the csv file needs to have the columnName as specified above so that the import tool knows which value is in which column.

@DoumeDuSud
Copy link
Author

nice, I will have a look

Good continuation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants