Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
import_and_export:importing_names [2022/02/10 12:44] – [Setting up the import file] Gary Willettsimport_and_export:importing_names [2024/09/25 07:12] (current) – [Update Name codes in bulk] Mark Glover
Line 6: Line 6:
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-  * Importing a large number of names can really bog down the server.  How much depends on the server hardware, but a realistic expectation is an hour per 10,000 names.+  * Importing a large number of names can really bog down the server.  How much depends on many factors, but a realistic //minimum// is an hour per 10,000 names.  This will increase dramatically with the number of names and sync sites that are visible to the names...
   * We recommend that you do it when other users are not trying to do anything with mSupply!   * We recommend that you do it when other users are not trying to do anything with mSupply!
 </WRAP> </WRAP>
Line 48: Line 48:
 | W       | Postcode (Zip code)       | | W       | Postcode (Zip code)       |
 | X       | On hold ("T" or "Y" for true, anything else, including blank, for false) | | X       | On hold ("T" or "Y" for true, anything else, including blank, for false) |
-| Y       | 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. |+| 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. | 
 +| AA+       | After column AA, any custom name fields set up in the preferences (see the [[preferences:custom_fields|]] section for details) can be added. The column header must be exactly the name of the custom field (case **in**sensitive). The values entered in these columns will be saved to the name's appropriate custom field. |
  
 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): 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):
Line 74: Line 77:
     * Ignore the first line.  You will want to if you have used the first row for column headings     * Ignore the first line.  You will want to if you have used the first row for column headings
     * Strip out line feeds and quote characters.  You will want to do if you've used Excel to save the text file.     * Strip out line feeds and quote characters.  You will want to do if you've used Excel to save the text file.
-  * If there are non-printable characters before or after the name, code, last name or first name they will be removed. Any non-printable characters in the name, code, last name or first name will be replaced with an underscore (<wrap em>_</wrap>).+  * If there are non-printable characters before or after the name, code, last name or first name they will be removed. Any non-printable characters in the name, code, last name or first name will be replaced with an underscore (<wrap em>_</wrap>- but note that spaces in the code will not be affected.
 </WRAP> </WRAP>
  
Line 119: Line 122:
  
 {{ :import_and_export:import_prog.png?300 }} {{ :import_and_export:import_prog.png?300 }}
 +
 +==== Update Name codes in bulk ====
 +
 +If you need to change many **Name Codes**  at once, custom code has been developed for this purpose.  It is a technically challenging process that is easy to get wrong.  Please contact the mSupply Foundation on <support@@msupply.foundation> to discuss this.  Include a link to this heading [[https://docs.msupply.org.nz/import_and_export:importing_names#update_on_name_code_in_bulk|Update Name code in bulk]] :-).  
 +
 +The relevant details are:
 +
 +  * Method:  ''z_importExcelToUpdateNameCode''
 +  * GitHub issue [[https://github.com/msupply-foundation/msupply/issues/13670|Code to replace name codes #13670]] 
 +  * Some notes [[https://wiki.sussol.net/doku.php/msupply:design:admin:name_code_update_code|Here]]
  
 \\ \\
  • Last modified: 2022/02/10 12:44
  • by Gary Willetts