GemsTracker

GEneric Medical Survey Tracker

User Tools

Site Tools


userzone:userdoc:importing_answers

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
userzone:userdoc:importing_answers [2014/05/21 14:26]
Matijs
userzone:userdoc:importing_answers [2020/03/12 12:06] (current)
Line 1: Line 1:
 +==== Importing answers ====
 +
 As of version 1.6.4 GemsTracker has the ability to import answers to surveys. As of version 1.6.4 GemsTracker has the ability to import answers to surveys.
  
Line 5: Line 7:
 To import answers you need of course sufficient rights to do so. Having those rights you can either select a survey in the track builder and import the answers into that survey or you can select the generic import wizard and select the survey you want to import to there. To import answers you need of course sufficient rights to do so. Having those rights you can either select a survey in the track builder and import the answers into that survey or you can select the generic import wizard and select the survey you want to import to there.
  
-==== Import formats ==== +After selecting a survey the wizard will show you which fields are available in the survey. Some of the fields depend on the **import ​definition** you choose, but the answers in the survey are usually the same for each import ​definition as the default ​import ​definitions only determine the method used to link a set of answers to a specific token.
- +
-After selecting a survey the wizard will show you which fields are available in the survey. Some of the fields depend on the **Translation ​definition** you choose, but the answers in the survey are usually the same for each translation ​definition as the default ​translation ​definitions only determine the method used to link a set of answers to a specific token.+
  
 You can then choose either to upload a file or use a large text field to put the import data in. GemsTracker currently supports three file formats: XML, CSV and tabbed text. The text field supports only the use of tabbed texts (e.g. a straight copy and paste from Excel). You can then choose either to upload a file or use a large text field to put the import data in. GemsTracker currently supports three file formats: XML, CSV and tabbed text. The text field supports only the use of tabbed texts (e.g. a straight copy and paste from Excel).
Line 19: Line 19:
 The root tag should contain one or more answer elements. Again any tag name will do for an answer, but if you have the choice: use ''<​answer>''​ tags. The root tag should contain one or more answer elements. Again any tag name will do for an answer, but if you have the choice: use ''<​answer>''​ tags.
  
-Within each ''<​answer>''​ element the individual fields are stored in elements using the field name name and format defined by the *import definition* for the survey. Fields are not required unless this is stated in the import definition. Actually you can use a different set of fields for each answer, but in rreality ​this does not happen.+Within each ''<​answer>''​ element the individual fields are stored in elements using the field name name and format defined by the *import definition* for the survey. Fields are not required unless this is stated in the import definition. Actually you can use a different set of fields for each answer, but usually ​this does not happen.
  
 The order of the fields is of no importance. The order of the fields is of no importance.
 +
 +GemsTracker interprets all empty elements as well as fields containing the text ''​null''​ as null values.
  
  
Line 35: Line 37:
  
 Tabbed text files use the tab ''​\t''​ character to separate fields and newline characters to separate records. Again both Unix style ''​\n''​ line endings and Windows style ''​\r\n''​ are supported. Tabbed text fields cannot contain either tabs or newline characters. Tabbed text files use the tab ''​\t''​ character to separate fields and newline characters to separate records. Again both Unix style ''​\n''​ line endings and Windows style ''​\r\n''​ are supported. Tabbed text fields cannot contain either tabs or newline characters.
 +
 +GemsTracker interprets both empty fields and fields containing the text ''​null''​ as null values.
 +==== Importing the completion date ====
 +
 +When the import contains a ''​completion_date''​ field the completion date of the token is set to that date. Otherwise it is set to the import moment, unless the completion date was already set.
 +
 +This happens regardless of any other use of the ''​completion_date''​ by the chosen import definition.
  
  
 ==== Linking answers to tokens ==== ==== Linking answers to tokens ====
  
-There are three methods for linking ​the an answer to a token.+There are three methods for linking an answer to a token.
  
 === Link by patient id and organization === === Link by patient id and organization ===
  
-Use this option if the data contains ​the patient id and an organization id. The organization id can either be the GemsTracker internal organization number or the **Healtcare provider id**, **Code name** or just the **Name** specified for the organization in the GemsTracker setup. ​+Use this option if the data contains ​an ''​patient_id'' ​and an ''​organization_id''​. The organization id can either be the GemsTracker internal organization number or the **Healtcare provider id**, **Code name** or just the **Name** specified for the organization in the GemsTracker setup. ​
  
-This option will use the first uncompleted token the patient has. If no uncompleted tokens exist the last completed token will be used instead.+This option will use the first uncompleted token the patient has. If no uncompleted tokens exist the most recently ​completed token will be used instead.
  
 === Link by patient id, organization and completion date === === Link by patient id, organization and completion date ===
  
-Use this option if the data contains also contains a completion date+Use this option if the data contains also contains a ''​completion_date''​ field
  
-GemsTracker will then only select a token when it was valid at the completion date. Again this option will use the first uncompleted token the patient has and that is valid for the completion date and if no uncompleted tokens exist the last completed token will be used instead.+GemsTracker will then only select a token when it was valid at the completion date. Again this option will use the first uncompleted token the patient has and that is valid for the completion date and if no uncompleted tokens exist the most recently ​completed token will be used instead.
  
 === Link by token === === Link by token ===
  
-If the GemsTracker token is in the import just use this option. It is the only 100% sure method for linking an set of answers to a specific token.+If the GemsTracker ​''​token'' ​is in the import just use this option. It is the only 100% sure method for linking an set of answers to a specific token
 + 
 + 
 +==== Handling completed tokens ==== 
 + 
 +When no token can be found the answer import wizard will generate an error before any answers have been imported.  
 + 
 +This is also the default action when answers are linked to a completed token, but you can choose one of two other methods for handling these cases. 
 + 
 +=== Delete old token and create new === 
 + 
 +First the import wizard checks if the answers supplied by the import clash with the current answers. If the answers are the same or the new answers had not been answered before, then the new answers are merged into the existing answers. 
 + 
 +Only when the new answers clash with the old answers, then the current token is deleted and a new token is created. The new answers and any answers not in the import are imported as the new set of answers. 
 + 
 +When you look at a patient'​s track the interface will show the old answers <​del>​striken through</​del>​ with the new answers below them. 
 + 
 +=== Create new extra set of answers === 
 + 
 +When you select this option **or** when //the import file contains two sets of answer for the same token// and the previous option was not chosen, then GemsTracker will also create a new token. The difference is that the old set of answers will not be overwritten and neither will the previous answers not in the import be copied into the new set of answers. 
 + 
 +This import method also checks for the specific answers in the import and their existence in the current token. E.g. if you import an XML file that contains multiple rows for the same token and the answers in the rows do not overlap, then all the answers will merge into a single set of answers. When they do overlap multiple tokens will be created.
  
 +When you look at a patient'​s track the interface will show the all the answers in order of import as separate tokens.
  
userzone/userdoc/importing_answers.1400675178.txt.gz · Last modified: 2020/03/12 12:08 (external edit)