import_and_export:importing_items

This is an old revision of the document!


*

You can import a tab-delimited text file of items by choosing File > Import > Import items….

Please note that this command only imports items and not the stock. If you would like to import both, see the next heading: Importing items & stock.

After selecting the menu item you are shown a message asking you to select the file to be imported on the next window:

After clicking OK, a window opens allowing you to select the file to import. After selecting it (by double clicking on the file in the window or clicking on it and clicking on the Open button) this window is displayed:

First line contains column headers: If you have used the first line of your import file for column headers, check this box. Then mSupply will ignore the first row in the file, and start importing from the second row.

Remove quote characters on import: If this is checked then double quote characters (“) are removed from item names as they are imported. This is useful if you have exported the import file from spreadsheet software and it has incorrectly placed double quote characters around the text. If you have used double characters in item names (e.g. as a symbol for inches) then they will also be removed if this option is checked.

Handling duplicate items: mSupply compares the item code in the import file (1st column - see below) against the codes of items already in its database to determine whether an entry is a duplicate item or not. If a duplicate item is found in the import file the mSupply will handle it according to your radio button selection in the If duplicate codes are selected section:

  • Create new duplicate and continue: a new item will be created. Note that you can only use this option if the preference “Item codes must be unique” is not selected in File > Preferences.
  • Ask each time: every time a duplicate is detected mSupply will ask you what you want to do. Your options are the same:

  • Stop the import: if a duplicate is detected mSupply will stop and cancel the whole import i.e. the database will be exactly that same as it was before you started the import.
  • Update the existing item: the item with the same code already in mSupply will be updated with all the details of the item in the import file.

Field order for the text file:

Column number Column letter Field Description
1 A item code 18 alphanumeric characters (must be a unique value)
2 B item name 80 alphanumeric characters
3 C units 3 alphanumeric characters recommended (ea, ml or mg). Entries in the units list will be created
if you import a unit that does not already exist in the data file.
60 characters supported
4 D reference pack size integer
The above fields are mandatory, while the following fields are optional and may or may not be included
as per your requirements
5 E shelf location 60 alphanumeric characters
6 F user field 1 30 alphanumeric characters
7 G user field 2 30 alphanumeric characters
8 H user field 3 30 alphanumeric characters
9 I user field 4 “true” or “false”
10 J edl “true” or “false”
11 K ATC category 30 alphanumeric characters
12 L ddd value 8 alphanumeric characters- the ddd and its units
13 M ddd factor number greater than zero (default=1)
14 N item description The long description for the item. Do not include carriage returns
(new lines made with the return or enter key) in your text file.
15 O item department The name of the department that the item belongs to.
If the department does not exist, mSupply will create it.
16 P account code for stock The account code used for stock purchases .
Note that these accounts will be created if they don't exist.
17 Q account code for cost of goods sold
18 R income account code
19 S Price
20 T Category Category 1. This category is hierarchical and has 3 levels. You can enter different levels separated by :: (for example “Pharmaceuticals::Controlled::Anti-depressants” or “Controlled::Anti-depressants”) or just the lowest level with no separator (for example “Anti-depressants”). mSupply will look for an existing category with the levels you define, if it doesn't find one then it will create them and assign the category to the name. If you enter only the lowest level category (for example “Anti-depressants”), mSupply will look for any lowest level category “Anti-depressants” with any or no parent. If it finds one, it will assign the first one it finds to the name being imported, otherwise it will create it with no parent and assign it to the name.
We strongly recommend you use the WHO EDL categories for this field
21 U Weight
22 V Critical stock “true” or “false”
23 W Normal stock “true” or “false”
24 X User field 5 number
25 Y User field 6 “true” or “false”
26 Z User field 7 “true” or “false”

The chances are that you already have a set of codes that you use internally. In this case open up Excel or a similar spreadsheet program, fill in the item description in the order shown above. For a quick solution, you only need to take account of the first four column, the rest can be ignored.

The third column representing “Units”, can be left blank, however, it is better to fill this in. The fourth column “reference pack size” can be set to “1” for all rows unless you know what pack size you want to use as the “standard” (Don't worry about this. The reference pack is used for comparing quotations. You can receive and issue any pack size you like).

Save a spreadsheet file as shown above as a tab-delimited text file.

Open up mSupply with a new data file and chose the import command. Direct the open/save dialog box to the text file and click “OK” to import the file.

You will be asked if you want to remove quotation mark characters. If you have created the file in Microsoft Excel, it adds quotation marks around fields that have a comma in them (even though it shouldn't). If this is an issue, choose the option to remove the quotation marks.

Previous: Receiving payment from Customers Next: Importing items & stock

  • Last modified: 2017/05/11 14:38
  • by Gary Willetts