<?php
/**************************************************************************
 *
 * LOVD DATABASE WEBSITE
 *
 * Created     : 2008-07-22
 * Modified    : 2009-09-18
 * For LOVD    : 2.0-22
 *
 * Access      : Public
 *
 * Programmer  : Ing. Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
 * Last edited : Ing. Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
 *
 *************/

define('ROOT_PATH', '../../../');
define('DOCS_PATH', ROOT_PATH . 'docs/');
require DOCS_PATH . 'inc-website-init.php';
require ROOT_PATH . 'inc-top.php';
?>

            <H3>LOVD Gene configuration area</H3>
            <H4>Advanced edit features</H4>
            <H5>Find &amp; Replace</H5>

            This feature, in LOVD 1.1.0 known as "Free edit", can be used to update large numbers of variant and patient records all at once. The find &amp; replace form guides you to define which genes would you like to work on, which text you want to search for in what column, where in this field you want to have the search text match and which text it should be replaced by if it matches. This works for one field at a time only, so you can not set a certain reference for all mutations causing a certain phenotype, for instance. What you can do, is change all commas in a field to decimal dots, fix common typing errors, or replace a reference with a different one in all entries.<BR>
            <BR>

<?php lovd_showInfoTable('Be extremely careful when using this function since misuse can empty an entire field in the database. It would be wise to do a download of the database first for backup purposes.', 'warning'); ?>

            In the configuration area, click the "Find &amp; Replace" link.<BR>
            <B>Select genes</B>: Select which genes you want to apply this find &amp; replace on. If you perform find &amp; replace on a patient column, only the patients that have variants in the selected genes will be edited.<BR>
            <B>Apply find &amp; replace to</B>: Select the field you want to work with. This drop-down list shows all custom columns available in LOVD; if you select a column that is not enabled for the gene(s) you want to apply the find &amp; replace to, no changes are done to the database.<BR>
            <B>Match type</B>: Select how you want to search the selected field for the search value:
            <UL style="margin : 0px;">
              <LI><I>Field value is...</I> the search string should match the field's contents exactly.</LI>
              <LI><I>Field contains...</I> the search string can be found anywhere within the field's value.</LI>
              <LI><I>Field starts with...</I> the field's value should start with the search string.</LI>
              <LI><I>Field ends with...</I> the field's value should end with the search string.</LI>
            </UL>
            <B>Find text</B>: Fill in the search string that you wish to have replaced by the replace string.<BR>
            <B>Replace text</B>: Fill in the replace string, the text value that you want to use to replace the matched search string with.<BR>
            <BR>

            If all fields are filled in correctly, LOVD will first notify you about the number of entries that matched your find text and ask you if you want to continue. After your confirmation, LOVD will do the find &amp; replace and notify you of the number of matched entries and the number of replaces performed.<BR>
            <BR>

            Find &amp; replace does not have an undo. So be extremely careful with what you do. If you make an error while using the form, you may loose important data from the selected column.<BR>
            <BR>

<?php
include ROOT_PATH . 'inc-bot.php';
?>
