In mSupply, Names are customers, suppliers, manufacturers, patients, donors and benchmark suppliers.
The File > Import > Import customers & suppliers… menu item allows you to import all name types into an mSupply data file. You can import any name type in any store.
A Tab-delimited file (see notes below) must be set up to import the data. The required field order is:
Column | Field |
---|---|
A | Code. Mandatory |
B | Name. Mandatory |
C | Type - see below for more details. Mandatory |
D | Address 1 |
E | Address 2 |
F | Country |
G | |
H | Phone |
I | Category 1. This category is hierarchical and has 3 levels. You can enter different levels separated by :: (for example “State1::District2::Area1” or “District1::Area3”) or just the lowest level with no separator (for example “Area2”). 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 “Area1”), mSupply will look for any lowest level category “Area1” 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 |
J | Customer group. If the group name does not exist, it will be created by mSupply on the fly. |
K | Last name. This column is the difference between a customer and a patient: A customer will have a blank last name, a patient must have a non-blank last name |
L | First name (applies only to people) |
M | Date of birth (use 4-digit years) |
N | Gender (enter “F” or “True” for females. All other values taken as male) |
O | Custom 1 |
P | Custom 2 |
Q | Custom 3 |
R | Category 2 |
S | Category 3 |
T | Address 3 |
U | Address 4 |
V | Address 5 |
W | Postcode (Zip code) |
X | On hold (“T” or “Y” for true, anything else, including blank, for false) |
Y | Latitude (positive or negative decimal number) |
Z | Longitude (positive or negative decimal number) |
AA | ID. The ID of the name record in the mSupply database. Optional and ignored unless updating a name. If you're updating a name then it is mandatory. During an update, the name this ID belongs to is compared with the name the code in column A belongs to. If they are the same record then the update will proceed, otherwise this line in the import file will be skipped. |
Column C describes the type of the name being imported. That is, whether it is a customer, supplier, manufacturer, donor or patient. A name could be any one of these or several of them. To indicate which of these the name is, simply include the letter shown in the table below in the type field (letter order is not important):
Value | Meaning |
---|---|
C | Customer or Patient. To be recognised as a patient, the line in the import file must have a non-blank last name |
P | Patient |
S | Supplier |
M | Manufacturer |
D | Donor |
B | Benchmark supplier (for use in tenders) |
(blank) | Both a customer and a supplier |
So, for example, a name which is a donor and supplier would have DS
or SD
in the type field.
You might find this template useful: name_import_template.xlsx or this export settings file: names_export_order.4si.zip
The first 3 fields (Code, Name and Type) are mandatory for each name imported. If a row in the import file does not have values for these 3 fields then it will be skipped and ignored during the import process.
If you import patients into a store which is not a dispensary, they will be imported but they will be invisible everywhere. You must make them visible in the appropriate dispensary stores before they can be used.
When you choose File > Import > Import customers & suppliers… you'll be shown an open/save window where you choose the file to import.
Once you've done that, you'll be shown this window:
If the first line of your import file contains column headers then check the First line contains headers checkbox. This tells mSupply to ignore the first line and start importing form the second line.
Check the Remove quote characters on import checkbox if some of the fields in the import file have had quote marks added to them. This can often happen if you have created the import file by exporting it from Excel or some other spreadsheet application.
Now, in the If duplicate codes are selected section, select what you want to happen if a name code is found in the import file which is already used by a name in mSupply.
You can use the Previous and Next buttons to go through the import file one line at a time to see what mSupply can see in each field and therefore what it will try to import. Can be useful for checking whether extra quote characters have been added to any fields or if the first line of the text file contains column header information only.
If you are importing patient names, leave column B (the full name) blank and make entries in the Last name (col K) and First name (col L) columns. Below is an example of a spreadsheet for importing patients, customers and suppliers which demonstrates how to fill in the fields with respect to each import type.
Column K is what defines the difference between a customer and a patient: A customer will have a blank last name, a patient must have a non-blank last name. A customer can have a blank first name.
If you have a lot of patients there will be a short delay once you have chosen the import file while mSupply counts how many records there are to import, then a progress window will be shown displaying the rate of progress:
Previous: 17.02. Importing stock | | Next: 17.04. Importing prescribers |