Importing Items

You can import a tab-delimited text file of items by choosing File > Import > Import items…. During import you can specify what happens with duplicates, which stores the imported items will be visible in and which master lists they will be added to.

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 items 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:

Skip the duplicate without asking: the duplicate is ignored and not imported.

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.

The Preview tab

This tab enables you to see a preview of what will be imported into mSupply and helps you check that mSupply is reading what you expect from the import file.

The left hand column of the table (“Field”) shows you all the fields mSupply is expecting to see (in that order, first at the top, last at the bottom of the table). The right hand column (“Value”) shows you the value that mSupply has read from the file for that field. Use the Next and Previous buttons to move between the records in the import file.

The Stores tab

This is the tab you use to specify which stores the items you import will be visible in. The store you are logged into is ticked by default. Simply check the “Visibility” column checkbox for the stores you wish all imported items to be visible in.

Note that only imported item visibility is affected during the import - for example, if you choose to ignore duplicates and a duplicate item is found in the import file, the visibility of the item already in mSupply is not affected by the import process. But if you have chosen to update duplicates, if a duplicate item is found in the import file the existing item in mSupply will be updated to match what it in the import file have and its visibility will be altered to match what is set on this tab.

One further thing to note is that if the preference “Automatically update item visibility in all stores to match master lists used by that store” (see here) is checked then item visibility is controlled by master list membership so the table on this tab will be replaced with this message telling you to use the Master lists tab instead:

The Master lists tab

This is the tab you use to determine which master lists the items in the import file will be added to as they are imported. Simply check the “Add to list” column checkbox for the master lists you wish all the items in the import file to be added to.

Any master lists that have the “Automatically add new items to this master list” option checked will have their “Add to list” checkbox checked by default on this tab and you will not be able to uncheck them.

Note that only imported items will be added to the master lists selected. This means that items already in mSupply which match duplicates in the import file that you choose to ignore will not be added to the selected master lists. Similarly, items already in mSupply which are updated because they match duplicates in the import file and the “Update the existing item” option was chosen are added to the selected master lists. And don't worry, if an item is already on a msster list it won't be added again.

Import file format

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