Page http://support.provet.info/import-data-to-provet-cloud/ is page related to this page.
1.2 Mapping data
Mapping view is the second phase. This is where you map all data found in your source file to fields in Provet Cloud.This view consists of two main areas: A column listing all columns found in your source file (named by the header row in your excel file), with a slot where you can drag a field, and an area containing all fileds found in Provet Cloud for the chosen object type (e.g. Client), which you can drag to any of the free slots. See picture below.
Pictured below is a column found from header file, and a free slot next to it.
To map a field in Provet Cloud to a column in your source file, choose the desired field from those available from the area on the right, and drag it to a free slot next to a column you want it mapped to.
Each mappable Provet Cloud field looks something like the one below. If you want to access additional options for the field, click on the pencil icon on it. Depending on conditions, it may take a while for the options panel to load.
Additional options differ based on the type of field in question. Below is a picture of additional options for a text field.
The field type is text field. Field name is First name, but all options would be identical to all of the text fields as well. There are two options:. The first is adding a default value for the field. If for some entries the client first name is missing, then you can insert a default value here. You might want to add something like “no first name specified” here.
The second option is the Key field option which allows you to match an existing Provet Cloud Object (e.g. a Client) to one found from your datafile using this field. This is explained thoroughly in the next chapter.
Below is an example image of what a mapped data set could look like.
Overwriting existing objects
There are times when you are importing data, and some of that data is already present in your Provet Cloud. Having two instances of the same data is not desired, instead, it is a good idea to try to first find the existing object and then merely update its data with what is stored in the data file you are importing.
This is where the Key field options is used. When this option is checked for a particular field, then for each row in your data file, Provet searches for an object containing the exact same value that is found in that particular field. If an object is found, its data is then updated with what your data row contains. If multiple objects containing the same data is found, only the first one is updated. You can use multiple fields as key fields, and in these cases Provet tries to match all key fields.
Very important note: the key fields must contain exactly the same data as the field you are importing. A text field must contain the exact same text, number files the exactly same number. For example: you have imported a number of clients to Provet when you started, and now want to update that data. Let’s say you want to use an address field to match the clients. One client’s address field might contain two spaces between street name and number. Someone might have noticed this when the client visited your clinic. After this the field will not match the field you have in the data file, unless you also happened to erase that space from your data file.
The preview view tells you exactly how many objects will be created and how many will be updated. If you know all data should already be present in Provet, then the number of created objects should be 0, and the number of objects to be updated should be the same amount that you have in your data file. If some objects will be created, then these are not being matched to existing objects correctly.
If you don’t have a unique field in your source data, you can create one yourself if you are using Excel. Just make a new column called ‘id’ or something similar, and put unique number for each row. If you are doing an import to a totally fresh Provet Cloud, you can use this field as Provet Cloud id field as well. If your Provet Cloud instance is not fresh, and you are importing Clients or Patients, you can map this to “old_client_id” or “old_patient_id” fields. This way you can update already-imported Clients and Patients later if you need to. Please note that old_client_id field will be empty for all Clients you create inside Provet, it can only be populated on imports. So if you mapped your id to old_client_id, it can only be used to update Clients that were imported to Provet Cloud in the first place.
Provet Cloud searches for objects which have identical data in this field.
Mapping Patients to the right Clients
Client / Patient structure in Provet Cloud is such that a Patient always belongs to a Client. There are no exceptions. Thus, when importing Patents, you should always import Clients first. Step by step guide:
1. Make sure Clients and Patients are in separate files: you should have a data structure where one file contains Clients, and one file contains Patients. Do not make a data file where one row contains a Client and a Patient. This would suffice if one Client always had one (or zero) Patients, but if a Client happened to have two Patients, then you’d have the same Client on two rows. With this setup you are either going to import multiple identical Clients, or you will have to be extremely careful and clever with keyfields and how you do the import. We don’t recommend this. Instead, it is better to keep Clients and Patients on two separate files with both having a unique id field.
2. Make sure each patient has a reference to corresponding Clients id field. This way you can search for the exact client easily when mapping Patient fields.
3. Import Clients first. Map their unique id to old_client_id-field, or if you have no Clients before hand (note: make sure you have no archived Clients!), to the id field.
4. Import Patients. In the mapping view, you have the Client-field. This will connect Patients to Clients. Map this field to the client reference field you have in your data file. Next, click on the pencil icon on that mapped field. Choose a default Client. This is so that if for any reason the correct Client is not found with the client-reference field in your Patients data file, then the Patient in question will still be imported, just to incorrect Client. You can even create a placeholder Client for this purpose, so that no actual Client will have Patients that really belong to someone else.
There are following pages connected to this page: