From db79047421807dcfa6c4826489e528c6ea86201b Mon Sep 17 00:00:00 2001 From: Rod Roark Date: Fri, 15 Sep 2017 20:32:11 -0700 Subject: [PATCH] Multiple improvements from IPPF related to layouts. (#1081) * Multiple improvements from IPPF related to layouts. A summary of what's new: o Layout groups may be nested, i.e. each group can have sub-groups. o Layouts and their groups have properties that may be edited in the layout editor. o Encounter LBFs may specify sections for direct entry of services, products and diagnoses. o "Case Management" feature including the ability to link encounter forms to issues, and in the issue window a tab for each related encounter form. o New layout edit option to specify initially-open groups. o Implemented design-time ACO for LBF encounter forms. o Improved printing of encounter LBFs. o Feature to print a demographics profile with data filled in for a specified patient. o Improvements to printed referrals. o Provider attribute and selector for LBF encounter forms. o New layout field type for a single checkbox. o Support for demographics/history values in LBF static text fields. o Auto-delete of shared attributes not used by any other form when a form is deleted. o Assorted layout editor improvements. o Added "Save and Continue" button to LBF visit forms. o Added sorting to export of lists and layouts. o Condition tests in LBF fields now support setting a value instead of just skipping the field. o Added field condition support to demographics and history. o Assorted bug fixes. --- custom/search.php | 6 +- interface/cmsportal/history_form.php | 4 +- interface/cmsportal/patient_form.php | 4 +- interface/forms/LBF/new.php | 979 ++++- interface/forms/LBF/printable.php | 457 ++- interface/forms/LBF/report.php | 19 +- interface/forms/eye_mag/a_issue.php | 2 +- interface/forms/eye_mag/php/eye_mag_functions.php | 4 +- interface/forms/eye_mag/save.php | 2 +- interface/main/backup.php | 54 +- interface/main/finder/patient_select.php | 4 +- interface/main/left_nav.php | 138 +- interface/main/tabs/menu/menu_updates.php | 15 +- interface/new/new_comprehensive.php | 20 +- interface/new/new_comprehensive_save.php | 7 +- interface/new/new_search_popup.php | 4 +- interface/orders/procedure_stats.php | 2 +- interface/patient_file/deleter.php | 23 +- .../patient_file/encounter/Services/ViewHelper.php | 12 +- interface/patient_file/encounter/delete_form.php | 15 +- .../patient_file/encounter/find_code_dynamic.php | 310 ++ .../encounter/find_code_dynamic_ajax.php | 321 ++ interface/patient_file/encounter/forms.php | 150 +- interface/patient_file/encounter/trend_form.php | 4 +- interface/patient_file/history/history.php | 25 + interface/patient_file/history/history_full.php | 18 +- interface/patient_file/history/history_save.php | 2 +- interface/patient_file/pos_checkout.php | 7 +- interface/patient_file/printed_fee_sheet.php | 34 +- interface/patient_file/summary/add_edit_issue.php | 51 +- interface/patient_file/summary/demographics.php | 49 +- .../patient_file/summary/demographics_full.php | 28 +- .../patient_file/summary/demographics_print.php | 250 +- .../patient_file/summary/demographics_save.php | 2 +- interface/patient_file/summary/stats_full.php | 2 +- .../patient_file/transaction/add_transaction.php | 286 +- .../patient_file/transaction/print_referral.php | 20 +- interface/super/edit_layout.php | 613 ++-- interface/super/edit_layout_props.php | 395 +- interface/super/edit_list.php | 45 +- interface/super/field_id_popup.php | 261 -- interface/super/layout_service_codes.php | 230 ++ interface/super/manage_site_files.php | 7 +- .../super/rules/library/RuleCriteriaLifestyle.php | 6 +- interface/super/show_groups_popup.php | 90 - interface/super/show_lists_popup.php | 80 - interface/themes/style_ash_blue.css | 17 + interface/themes/style_burgundy.css | 17 + interface/themes/style_cadmium_yellow.css | 17 + interface/themes/style_chocolate.css | 17 + interface/themes/style_cobalt_blue.css | 17 + interface/themes/style_coral.css | 17 + interface/themes/style_deep_purple.css | 17 + interface/themes/style_dune.css | 17 + interface/themes/style_emerald.css | 17 + interface/themes/style_forest_green.css | 17 + interface/themes/style_light.css | 12 +- interface/themes/style_manila.css | 13 + interface/themes/style_mauve.css | 17 + interface/themes/style_mustard_green.css | 17 + interface/themes/style_olive.css | 17 + interface/themes/style_pdf.css | 14 + interface/themes/style_pink.css | 17 + interface/themes/style_powder_blue.css | 17 + interface/themes/style_red.css | 17 + interface/themes/style_sienna.css | 17 + interface/themes/style_tangerine.css | 17 + interface/usergroup/facility_user.php | 8 +- interface/usergroup/facility_user_admin.php | 2 +- library/ajax/code_attributes_ajax.php | 118 + library/formatting.inc.php | 2 +- library/forms.inc | 31 +- library/ippf_issues.inc.php | 24 +- library/options.inc.php | 838 +++-- library/options.js.php | 92 +- library/patient.inc | 12 +- library/registry.inc | 65 + library/report.inc | 2 +- library/sql_upgrade_fx.php | 141 + library/validation/LBF_Validation.php | 2 +- myportal/soap_service/server_existingpatient.php | 4 +- myportal/soap_service/server_newpatient.php | 4 +- .../soap_service/server_newpatienttoapprove.php | 4 +- myportal/soap_service/server_oemruser.php | 4 +- sites/default/referral_template.html | 57 +- sql/5_0_0-to-5_0_1_upgrade.sql | 44 + sql/database.sql | 410 ++- sql/ippf_layout.sql | 1976 ++++++---- sql/ippf_upgrade.sql | 3821 ++++++++++++++++---- version.php | 2 +- 90 files changed, 9730 insertions(+), 3335 deletions(-) create mode 100644 interface/patient_file/encounter/find_code_dynamic.php create mode 100644 interface/patient_file/encounter/find_code_dynamic_ajax.php delete mode 100644 interface/super/field_id_popup.php create mode 100644 interface/super/layout_service_codes.php delete mode 100644 interface/super/show_groups_popup.php delete mode 100644 interface/super/show_lists_popup.php create mode 100644 library/ajax/code_attributes_ajax.php rewrite sql/ippf_upgrade.sql (82%) diff --git a/custom/search.php b/custom/search.php index 650d0f180..c1b5be99a 100644 --- a/custom/search.php +++ b/custom/search.php @@ -100,11 +100,11 @@ require_once("../interface/globals.php"); echo "\n"; } - $layoutCols = sqlStatement("SELECT field_id, title, description, group_name " + $layoutCols = sqlStatement("SELECT field_id, title, description, group_id " . "FROM layout_options " . "WHERE form_id='DEM' " - . "AND group_name not like ('%Employer%' ) AND uor != 0 " - . "ORDER BY group_name,seq"); + . "AND field_id not like 'em\_%' AND uor != 0 " + . "ORDER BY group_id,seq"); echo ""; diff --git a/interface/cmsportal/history_form.php b/interface/cmsportal/history_form.php index 4ac1453e4..e779131d6 100644 --- a/interface/cmsportal/history_form.php +++ b/interface/cmsportal/history_form.php @@ -24,7 +24,7 @@ if ($_POST['bn_save']) { $newdata = array(); $fres = sqlStatement("SELECT * FROM layout_options WHERE " . "form_id = 'HIS' AND field_id != '' AND uor > 0 " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; $field_id = $frow['field_id']; @@ -147,7 +147,7 @@ $(document).ready(function() { 0 ORDER BY group_name, seq", + "WHERE form_id = ? AND uor > 0 ORDER BY group_id, seq", array('HIS') ); diff --git a/interface/cmsportal/patient_form.php b/interface/cmsportal/patient_form.php index 80807fec0..7636686ad 100644 --- a/interface/cmsportal/patient_form.php +++ b/interface/cmsportal/patient_form.php @@ -29,7 +29,7 @@ if ($_POST['bn_save']) { // configured as unused. $fres = sqlStatement("SELECT * FROM layout_options WHERE " . "form_id = 'DEM' AND field_id != '' AND (uor > 0 OR field_id = 'cmsportal_login') " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; $field_id = $frow['field_id']; @@ -221,7 +221,7 @@ $(document).ready(function() { 0 ORDER BY group_name, seq", + "WHERE form_id = ? AND uor > 0 ORDER BY group_id, seq", array('DEM') ); diff --git a/interface/forms/LBF/new.php b/interface/forms/LBF/new.php index 19e419a0c..3e1097c29 100644 --- a/interface/forms/LBF/new.php +++ b/interface/forms/LBF/new.php @@ -11,7 +11,6 @@ * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ - require_once("../../globals.php"); require_once("$srcdir/api.inc"); require_once("$srcdir/forms.inc"); @@ -20,16 +19,14 @@ require_once("$srcdir/patient.inc"); if ($GLOBALS['gbl_portal_cms_enable']) { require_once("$include_root/cmsportal/portal.inc.php"); } +require_once($GLOBALS['fileroot'] . '/custom/code_types.inc.php'); +require_once("$srcdir/FeeSheetHtml.class.php"); $CPR = 4; // cells per row $pprow = array(); -// $is_lbf is defined in trend_form.php and indicates that we are being -// invoked from there; in that case the current encounter is irrelevant. -if (empty($is_lbf) && !$encounter) { - die("Internal error: we do not seem to be in an encounter!"); -} +$alertmsg = ''; function end_cell() { @@ -68,54 +65,78 @@ function end_row() } } -function end_group() -{ - global $last_group; - if (strlen($last_group) > 0) { - end_row(); - echo "
\n"; - // No div for an empty group name. - if (strlen($last_group) > 1) { - echo "\n"; // div after checkbox - echo "\n"; // outer div, including checkbox - } - } -} +// $is_lbf is defined in trend_form.php and indicates that we are being +// invoked from there; in that case the current encounter is irrelevant. +$from_trend_form = !empty($is_lbf); + +// This is true if the page is loaded into an iframe in add_edit_issue.php. +$from_issue_form = !empty($_REQUEST['from_issue_form']); $formname = isset($_GET['formname']) ? $_GET['formname'] : ''; $formid = isset($_GET['id']) ? intval($_GET['id']) : 0; $portalid = isset($_GET['portalid']) ? intval($_GET['portalid']) : 0; -// Get some info about this form. -$tmp = sqlQuery("SELECT title, option_value, notes FROM list_options WHERE " . - "list_id = 'lbfnames' AND option_id = ? AND activity = 1", array($formname)); -$formtitle = $tmp['title']; -$formhistory = 0 + $tmp['option_value']; - -// Extract parameters from this form's list item entry. -$jobj = json_decode($tmp['notes'], true); -if (!empty($jobj['columns'])) { - $CPR = intval($jobj['columns']); +$visitid = intval(empty($_GET['visitid']) ? $encounter : $_GET['visitid']); + +// If necessary get the encounter from the forms table entry for this form. +if ($formid && !$visitid) { + $frow = sqlQuery( + "SELECT pid, encounter FROM forms WHERE " . + "form_id = ? AND formdir = ? AND deleted = 0", + array($formid, $formname) + ); + $visitid = intval($frow['encounter']); + if ($frow['pid'] != $pid) { + die("Internal error: patient ID mismatch!"); + } } -if (!empty($jobj['issue' ])) { - $LBF_ISSUE_TYPE = $jobj['issue']; +if (!$from_trend_form && !$visitid) { + die("Internal error: we do not seem to be in an encounter!"); } -if (!empty($jobj['aco' ])) { - $LBF_ACO = explode('|', $jobj['aco']); +$grparr = array(); +getLayoutProperties($formname, $grparr, '*'); +$lobj = $grparr['']; +$formtitle = $lobj['grp_title']; +$formhistory = 0 + $lobj['grp_repeats']; +if (!empty($lobj['grp_columns' ])) { + $CPR = intval($lobj['grp_columns']); +} +if (!empty($lobj['grp_size' ])) { + $FONTSIZE = intval($lobj['grp_size']); +} +if (!empty($lobj['grp_issue_type'])) { + $LBF_ISSUE_TYPE = $lobj['grp_issue_type']; +} +if (!empty($lobj['grp_aco_spec' ])) { + $LBF_ACO = explode('|', $lobj['grp_aco_spec']); +} +if ($lobj['grp_services']) { + $LBF_SERVICES_SECTION = $lobj['grp_services'] == '*' ? '' : $lobj['grp_services']; +} +if ($lobj['grp_products']) { + $LBF_PRODUCTS_SECTION = $lobj['grp_products'] == '*' ? '' : $lobj['grp_products']; +} +if ($lobj['grp_diags' ]) { + $LBF_DIAGS_SECTION = $lobj['grp_diags' ] == '*' ? '' : $lobj['grp_diags' ]; } // Check access control. if (!acl_check('admin', 'super') && !empty($LBF_ACO)) { $auth_aco_write = acl_check($LBF_ACO[0], $LBF_ACO[1], '', 'write'); $auth_aco_addonly = acl_check($LBF_ACO[0], $LBF_ACO[1], '', 'addonly'); + // echo "\n\n"; // debugging if (!$auth_aco_write && !($auth_aco_addonly && !$formid)) { die(xlt('Access denied')); } } -if (empty($is_lbf)) { +if (isset($LBF_SERVICES_SECTION) || isset($LBF_PRODUCTS_SECTION) || isset($LBF_DIAGS_SECTION)) { + $fs = new FeeSheetHtml($pid, $visitid); +} + +if (!$from_trend_form) { $fname = $GLOBALS['OE_SITE_DIR'] . "/LBF/$formname.plugin.php"; if (file_exists($fname)) { include_once($fname); @@ -124,7 +145,7 @@ if (empty($is_lbf)) { // If Save was clicked, save the info. // -if ($_POST['bn_save']) { +if (!empty($_POST['bn_save']) || !empty($_POST['bn_save_print']) || !empty($_POST['bn_save_continue'])) { $newid = 0; if (!$formid) { // Creating a new form. Get the new form_id by inserting and deleting a dummy row. @@ -133,14 +154,32 @@ if ($_POST['bn_save']) { "( field_id, field_value ) VALUES ( '', '' )"); sqlStatement("DELETE FROM lbf_data WHERE form_id = ? AND " . "field_id = ''", array($newid)); - addForm($encounter, $formtitle, $newid, $formname, $pid, $userauthorized); + addForm($visitid, $formtitle, $newid, $formname, $pid, $userauthorized); + } + + $my_form_id = $formid ? $formid : $newid; + + // If there is an issue ID, update it in the forms table entry. + if (isset($_POST['form_issue_id'])) { + sqlStatement( + "UPDATE forms SET issue_id = ? WHERE formdir = ? AND form_id = ? AND deleted = 0", + array($_POST['form_issue_id'], $formname, $my_form_id) + ); + } + + // If there is a provider ID, update it in the forms table entry. + if (isset($_POST['form_provider_id'])) { + sqlStatement( + "UPDATE forms SET provider_id = ? WHERE formdir = ? AND form_id = ? AND deleted = 0", + array($_POST['form_provider_id'], $formname, $my_form_id) + ); } $sets = ""; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND field_id != '' AND " . "edit_options != 'H' AND edit_options NOT LIKE '%0%' " . - "ORDER BY group_name, seq", array($formname)); + "ORDER BY group_id, seq", array($formname)); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; $data_type = $frow['data_type']; @@ -155,6 +194,9 @@ if ($_POST['bn_save']) { // trust that it's OK to clear any field that is defined in the layout but not returned // by the form. // + if ($data_type == 31) { + continue; // skip static text fields + } $value = get_layout_form_value($frow); // If edit option P or Q, save to the appropriate different table and skip the rest. $source = $frow['source']; @@ -183,7 +225,7 @@ if ($_POST['bn_save']) { "REPLACE INTO shared_attributes SET " . "pid = ?, encounter = ?, field_id = ?, last_update = NOW(), " . "user_id = ?, field_value = ?", - array($pid, $encounter, $field_id, $_SESSION['authUserID'], $value) + array($pid, $visitid, $field_id, $_SESSION['authUserID'], $value) ); continue; } else if ($source == 'V') { @@ -192,7 +234,7 @@ if ($_POST['bn_save']) { sqlStatement( "UPDATE form_encounter SET `$esc_field_id` = ? WHERE " . "pid = ? AND encounter = ?", - array($value, $pid, $encounter) + array($value, $pid, $visitid) ); continue; } @@ -227,17 +269,48 @@ if ($_POST['bn_save']) { } } - // Support custom behavior at save time, such as going to another form. - if (function_exists($formname . '_save_exit')) { - if (call_user_func($formname . '_save_exit')) { + if (!$alertmsg && !$from_issue_form && empty($_POST['bn_save_continue'])) { + if (isset($fs)) { + $bill = is_array($_POST['form_fs_bill']) ? $_POST['form_fs_bill'] : null; + $prod = is_array($_POST['form_fs_prod']) ? $_POST['form_fs_prod'] : null; + $alertmsg = $fs->checkInventory($prod); + // If there is an inventory error then no services or products will be saved, and + // the form will be redisplayed with an error alert and everything else saved. + if (!$alertmsg) { + $fs->save($bill, $prod, null, null); + $fs->updatePriceLevel($_POST['form_fs_pricelevel']); + } + } + + if (!$formid) { + $formid = $newid; + } + + if (!$alertmsg && !$from_issue_form && empty($_POST['bn_save_continue'])) { + // Support custom behavior at save time, such as going to another form. + if (function_exists($formname . '_save_exit')) { + if (call_user_func($formname . '_save_exit')) { + exit; + } + } + formHeader("Redirecting...."); + // If Save and Print, write the JavaScript to open a window for printing. + if (!empty($_POST['bn_save_print'])) { + echo "\n"; + } + formJump(); + formFooter(); exit; } } - - formHeader("Redirecting...."); - formJump(); - formFooter(); - exit; } ?> @@ -365,6 +438,19 @@ var current_sel_name = ''; // Appends to or erases the current list of related codes. function set_related(codetype, code, selector, codedesc) { var f = document.forms[0]; + + // This is the case of selecting a code for the Fee Sheet: + if (!current_sel_name) { + if (code) { + $.getScript('/library/ajax/code_attributes_ajax.php' + + '?codetype=' + encodeURIComponent(codetype) + + '&code=' + encodeURIComponent(code) + + '&selector=' + encodeURIComponent(selector) + + '&pricelevel=' + encodeURIComponent(f.form_fs_pricelevel.value)); + } + return ''; + } + // frc will be the input element containing the codes. // frcd, if set, will be the input element containing their descriptions. var frc = f[current_sel_name]; @@ -374,8 +460,9 @@ function set_related(codetype, code, selector, codedesc) { frcd = frc; frc = f[matches[1]]; } - var s = frc.value; - var sd = frcd ? frcd.value : s; + // For LBFs we will allow only one code in a field. + var s = ''; // frc.value; + var sd = ''; // frcd ? frcd.value : s; if (code) { if (s.length > 0) { s += ';'; @@ -392,12 +479,12 @@ function set_related(codetype, code, selector, codedesc) { return ''; } -// This invokes the find-code popup. +// This invokes the "dynamic" find-code popup. function sel_related(elem, codetype) { - current_sel_name = elem.name; - var url = '/patient_file/encounter/find_code_popup.php'; + current_sel_name = elem ? elem.name : ''; + var url = '/patient_file/encounter/find_code_dynamic.php'; if (codetype) url += '?codetype=' + codetype; - dlgopen(url, '_blank', 500, 400); + dlgopen(url, '_blank', 800, 500); } // Compute the length of a string without leading and trailing spaces. @@ -410,23 +497,225 @@ function trimlen(s) { return j + 1 - i; } +// This capitalizes the first letter of each word in the passed input +// element. It also strips out extraneous spaces. +function capitalizeMe(elem) { + var a = elem.value.split(' '); + var s = ''; + for(var i = 0; i < a.length; ++i) { + if (a[i].length > 0) { + if (s.length > 0) s += ' '; + s += a[i].charAt(0).toUpperCase() + a[i].substring(1); + } + } + elem.value = s; +} + // Validation logic for form submission. function validate(f) { + // Validation for Fee Sheet stuff. Skipping this because CV decided (2015-11-03) + // that these warning messages are not appropriate for layout based visit forms. + // + // if (window.jsLineItemValidation && !jsLineItemValidation(f)) return false; somethingChanged = false; // turn off "are you sure you want to leave" top.restoreSession(); return true; } jsLineItemValidation('form_fs_bill', 'form_fs_prod'); +?> + +// Add a service line item. +function fs_append_service(code_type, code, desc, price) { + var telem = document.getElementById('fs_services_table'); + var lino = telem.rows.length - 1; + var trelem = telem.insertRow(telem.rows.length); + trelem.innerHTML = + "" + code + " " + + "" + desc + " " + + "" + + " " + + "" + + "" + price + " " + + "" + + "" + + "" + + "" + + "" + + ""; +} + +// Add a product line item. +function fs_append_product(code_type, code, desc, price, warehouses) { + var telem = document.getElementById('fs_products_table'); + if (!telem) { + alert(''); + return; + } + var lino = telem.rows.length - 1; + var trelem = telem.insertRow(telem.rows.length); + trelem.innerHTML = + "" + desc + " " + + "" + + " " + + "" + + "" + + " " + + "" + + "" + price + " " + + "" + + "" + + "" + + "" + + ""; +} + +// Add a diagnosis line item. +function fs_append_diag(code_type, code, desc) { + var telem = document.getElementById('fs_diags_table'); + // Adding 1000 because form_fs_bill[] is shared with services and we want to avoid collisions. + var lino = telem.rows.length - 1 + 1000; + var trelem = telem.insertRow(telem.rows.length); + trelem.innerHTML = + "" + code + " " + + "" + desc + " " + + "" + + "" + + "" + + "" + + "" + + ""; +} + +// Respond to clicking a checkbox for adding (or removing) a specific service. +function fs_service_clicked(cb) { + var f = cb.form; + // The checkbox value is a JSON array containing the service's code type, code, description, + // and price for each price level. + var a = JSON.parse(cb.value); + if (!cb.checked) { + // The checkbox was UNchecked. + // Find last row with a matching code_type and code and set its del flag. + var telem = document.getElementById('fs_services_table'); + var lino = telem.rows.length - 2; + for (; lino >= 0; --lino) { + var pfx = "form_fs_bill[" + lino + "]"; + if (f[pfx + "[code_type]"].value == a[0] && f[pfx + "[code]"].value == a[1]) { + f[pfx + "[del]"].checked = true; + break; + } + } + return; + } + $.getScript('/library/ajax/code_attributes_ajax.php' + + '?codetype=' + encodeURIComponent(a[0]) + + '&code=' + encodeURIComponent(a[1]) + + '&pricelevel=' + encodeURIComponent(f.form_fs_pricelevel.value)); +} + +// Respond to clicking a checkbox for adding (or removing) a specific product. +function fs_product_clicked(cb) { + var f = cb.form; + // The checkbox value is a JSON array containing the product's code type, code and selector. + var a = JSON.parse(cb.value); + if (!cb.checked) { + // The checkbox was UNchecked. + // Find last row with a matching product ID and set its del flag. + var telem = document.getElementById('fs_products_table'); + var lino = telem.rows.length - 2; + for (; lino >= 0; --lino) { + var pfx = "form_fs_prod[" + lino + "]"; + if (f[pfx + "[code_type]"].value == a[0] && f[pfx + "[code]"].value == a[1]) { + f[pfx + "[del]"].checked = true; + break; + } + } + return; + } + $.getScript('/library/ajax/code_attributes_ajax.php' + + '?codetype=' + encodeURIComponent(a[0]) + + '&code=' + encodeURIComponent(a[1]) + + '&selector=' + encodeURIComponent(a[2]) + + '&pricelevel=' + encodeURIComponent(f.form_fs_pricelevel.value)); +} + +// Respond to clicking a checkbox for adding (or removing) a specific diagnosis. +function fs_diag_clicked(cb) { + var f = cb.form; + // The checkbox value is a JSON array containing the diagnosis's code type, code, description. + var a = JSON.parse(cb.value); + if (!cb.checked) { + // The checkbox was UNchecked. + // Find last row with a matching code_type and code and set its del flag. + var telem = document.getElementById('fs_diags_table'); + var lino = telem.rows.length - 2 + 1000; + for (; lino >= 0; --lino) { + var pfx = "form_fs_bill[" + lino + "]"; + if (f[pfx + "[code_type]"].value == a[0] && f[pfx + "[code]"].value == a[1]) { + f[pfx + "[del]"].checked = true; + break; + } + } + return; + } + $.getScript('/library/ajax/code_attributes_ajax.php' + + '?codetype=' + encodeURIComponent(a[0]) + + '&code=' + encodeURIComponent(a[1]) + + '&pricelevel=' + encodeURIComponent(f.form_fs_pricelevel.value)); +} + +// Respond to selecting a package of codes. +function fs_package_selected(sel) { + var f = sel.form; + // The option value is an encoded string of code types and codes. + if (sel.value) { + $.getScript('/library/ajax/code_attributes_ajax.php' + + '?list=' + encodeURIComponent(sel.value) + + '&pricelevel=' + encodeURIComponent(f.form_fs_pricelevel.value)); + } + sel.selectedIndex = 0; +} + +// This is called back by code_attributes_ajax.php to complete the appending of a line item. +function code_attributes_handler(codetype, code, desc, price, warehouses) { + if (codetype == 'PROD') { + fs_append_product(codetype, code, desc, price, warehouses); + } + else if (codetype == 'ICD9' || codetype == 'ICD10') { + fs_append_diag(codetype, code, desc); + } + else { + fs_append_service(codetype, code, desc, price); + } +} + +function warehouse_changed(sel) { + if (!confirm('')) { + // They clicked Cancel so reset selection to its default state. + for (var i = 0; i < sel.options.length; ++i) { + sel.options[i].selected = sel.options[i].defaultSelected; + } + } +} + + +} +?> - +> + "fe.id = f.form_id LIMIT 1", array($pid, $visitid)); ?>
@@ -452,12 +746,48 @@ if (empty($is_lbf)) { echo text($enrow['fname']) . ' ' . text($enrow['mname']) . ' ' . text($enrow['lname']); echo ' ' . xlt('on') . ' ' . text(oeFormatShortDate(substr($enrow['date'], 0, 10))); ?> -
-
- +\n"; + echo " \n"; + while ($irow = sqlFetchArray($ires)) { + $issueid = $irow['id']; + $issuedate = oeFormatShortDate(empty($irow['begdate']) ? $irow['date'] : $irow['begdate']); + echo " \n"; + } + echo "\n"; +} +?> + + 0 AND edit_options LIKE '%I%' " . + "LIMIT 1", array($formname)); +$some_group_is_open = !empty($tmprow['form_id']); + $fres = sqlStatement("SELECT * FROM layout_options " . -"WHERE form_id = ? AND uor > 0 " . -"ORDER BY group_name, seq", array($formname)); -$last_group = ''; + "WHERE form_id = ? AND uor > 0 " . + "ORDER BY group_id, seq", array($formname)); $cell_count = 0; $item_count = 0; $display_style = 'block'; +// This string is the active group levels. Each leading substring represents an instance of nesting. +$group_levels = ''; + +// This indicates if will need to be written to end the fields in a group. +$group_table_active = false; + // This is an array keyed on forms.form_id for other occurrences of this // form type. The maximum number of such other occurrences to display is // in list_options.option_value for this form's list item. Values in this @@ -495,7 +837,7 @@ $form_is_graphable = false; $condition_str = ''; while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; + $this_group = $frow['group_id']; $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; @@ -509,30 +851,12 @@ while ($frow = sqlFetchArray($fres)) { $form_is_graphable = true; } - // Accumulate skip conditions into a JavaScript string literal. - $conditions = empty($frow['conditions']) ? array() : unserialize($frow['conditions']); - foreach ($conditions as $condition) { - if (empty($condition['id'])) { - continue; - } - - $andor = empty($condition['andor']) ? '' : $condition['andor']; - if ($condition_str) { - $condition_str .= ",\n"; - } - - $condition_str .= "{" . - "target:'" . addslashes($field_id) . "', " . - "id:'" . addslashes($condition['id']) . "', " . - "itemid:'" . addslashes($condition['itemid']) . "', " . - "operator:'" . addslashes($condition['operator']) . "', " . - "value:'" . addslashes($condition['value']) . "', " . - "andor:'" . addslashes($andor) . "'}"; - } + // Accumulate action conditions into a JSON expression for the browser side. + accumActionConditions($field_id, $condition_str, $frow['conditions']); $currvalue = ''; - if ($frow['edit_options'] == 'H') { + if (strpos($edit_options, 'H') !== false) { // This data comes from static history if (isset($shrow[$field_id])) { $currvalue = $shrow[$field_id]; @@ -552,7 +876,7 @@ while ($frow = sqlFetchArray($fres)) { } // Handle "P" edit option to default to the previous value of a form field. - if (!$is_lbf && empty($currvalue) && strpos($edit_options, 'P') !== false) { + if (!$from_trend_form && empty($currvalue) && strpos($edit_options, 'P') !== false) { if ($source == 'F' && !$formid) { // Form attribute for new form, get value from most recent form instance. // Form attributes of existing forms are expected to have existing values. @@ -577,7 +901,7 @@ while ($frow = sqlFetchArray($fres)) { "sa.pid = e2.pid AND sa.encounter = e2.encounter AND sa.field_id = ?" . "WHERE e1.pid = ? AND e1.encounter = ? " . "ORDER BY e2.date DESC, e2.encounter DESC LIMIT 1", - array($field_id, $pid, $encounter) + array($field_id, $pid, $visitid) ); if (isset($tmp['field_value'])) { $currvalue = $tmp['field_value']; @@ -586,16 +910,52 @@ while ($frow = sqlFetchArray($fres)) { } // End "P" option logic. } -// Handle a data category (group) change. - if (strcmp($this_group, $last_group) != 0) { - end_group(); - $group_seq = 'lbf' . substr($this_group, 0, 1); - $group_name = substr($this_group, 1); - $last_group = $this_group; + $this_levels = $this_group; + $i = 0; + $mincount = min(strlen($this_levels), strlen($group_levels)); + while ($i < $mincount && $this_levels[$i] == $group_levels[$i]) { + ++$i; + } + // $i is now the number of initial matching levels. + + // If ending a group or starting a subgroup, terminate the current row and its table. + if ($group_table_active && ($i != strlen($group_levels) || $i != strlen($this_levels))) { + end_row(); + echo " \n"; + $group_table_active = false; + } + + // Close any groups that we are done with. + while (strlen($group_levels) > $i) { + $gname = $grparr[$group_levels]['grp_title']; + $group_levels = substr($group_levels, 0, -1); // remove last character + // No div for an empty group name. + if (strlen($gname)) { + echo "\n"; + } + } + // If there are any new groups, open them. + while ($i < strlen($this_levels)) { + end_row(); + if ($group_table_active) { + echo " \n"; + $group_table_active = false; + } + $group_levels .= $this_levels[$i++]; + $gname = $grparr[substr($group_levels, 0, $i)]['grp_title']; + $subtitle = $grparr[substr($group_levels, 0, $i)]['grp_subtitle']; + // Compute a short unique identifier for this group. + $group_seq = 'lbf' . $group_levels; + $group_name = $gname; + + if ($some_group_is_open) { + // Must have edit option "I" in first item for its group to be initially open. + $display_style = strpos($edit_options, 'I') === false ? 'none' : 'block'; + } + // If group name is blank, no checkbox or div. - if (strlen($this_group) > 1) { - echo "
\n"; + if (strlen($gname)) { echo "
\n"; } - // echo " \n"; - echo "
\n"; + $group_table_active = true; + echo "
\n"; + + if ($subtitle) { + // There is a group subtitle so show it. + echo "\n"; + echo "\n"; + } + $display_style = 'none'; // Initialize historical data array and write date headers. @@ -673,11 +1040,11 @@ while ($frow = sqlFetchArray($fres)) { } echo "'"; - if ($cell_count == 2) { + + if ($cell_count > 0) { echo " style='padding-left:10pt'"; } - - // This ID is used by skip conditions and also show_graph(). + // This ID is used by action conditions and also show_graph(). echo " id='label_id_" . attr($field_id) . "'"; echo ">"; @@ -692,11 +1059,15 @@ while ($frow = sqlFetchArray($fres)) { echo ""; if ($frow['title']) { - echo text(xl_layout_label($frow['title']) . ":"); + $tmp = xl_layout_label($frow['title']); + echo text($tmp); + // Append colon only if label does not end with punctuation. + if (strpos('?!.,:-=', substr($tmp, -1, 1)) === false) { + echo ':'; + } } else { echo " "; } - echo ""; // Note the labels are not repeated in the history columns. @@ -705,7 +1076,7 @@ while ($frow = sqlFetchArray($fres)) { if ($datacols > 0) { end_cell(); echo "
" . text($subtitle) . "
0) { echo " style='padding-left:5pt'"; @@ -723,7 +1094,7 @@ while ($frow = sqlFetchArray($fres)) { ++$item_count; // Skip current-value fields for the display-only case. - if (empty($is_lbf)) { + if (!$from_trend_form) { if ($frow['edit_options'] == 'H') { echo generate_display_field($frow, $currvalue); } else { @@ -738,41 +1109,391 @@ while ($frow = sqlFetchArray($fres)) { } } - end_group(); +// Close all open groups. +if ($group_table_active) { + end_row(); + echo "
\n"; + $group_table_active = false; +} +while (strlen($group_levels)) { + $gname = $grparr[$group_levels]['grp_title']; + $group_levels = substr($group_levels, 0, -1); // remove last character + // No div for an empty group name. + if (strlen($gname)) { + echo "
\n"; + } +} + +$display_style = 'none'; + +if (isset($LBF_SERVICES_SECTION) || isset($LBF_DIAGS_SECTION)) { + $fs->loadServiceItems(); +} + +if (isset($LBF_SERVICES_SECTION)) { + // Create the checkbox and div for the Services Section. + echo "
" . xlt('Services') . "\n"; + echo "
\n"; + echo "
\n"; + $display_style = 'none'; + + // If there are associated codes, generate a checkbox for each one. + if ($LBF_SERVICES_SECTION) { + echo "\n"; + $cols = 3; + $tdpct = (int) (100 / $cols); + $count = 0; + $relcodes = explode(';', $LBF_SERVICES_SECTION); + foreach ($relcodes as $codestring) { + if ($codestring === '') { + continue; + } + $codes_esc = htmlspecialchars($codestring, ENT_QUOTES); + $cbval = $fs->genCodeSelectorValue($codestring); + if ($count % $cols == 0) { + if ($count) { + echo " \n"; + } + echo " \n"; + } + echo " \n"; + ++$count; + } + if ($count) { + echo " \n"; + } + echo "
"; + echo "code_is_in_fee_sheet) { + echo " checked"; + } + list($codetype, $code) = explode(':', $codestring); + $title = lookup_code_descriptions($codestring); + $title = empty($title) ? $code : xl_list_label($title); + echo " />" . htmlspecialchars($title, ENT_NOQUOTES); + echo "
\n"; + } + + // A row for Search, Add Package, Main Provider. + $ctype = $GLOBALS['ippf_specific'] ? 'MA' : ''; + echo "

"; + echo "  \n"; + $fscres = sqlStatement("SELECT * FROM fee_sheet_options ORDER BY fs_category, fs_option"); + if (sqlNumRows($fscres)) { + $last_category = ''; + echo "  \n"; + } + echo xlt('Main Provider') . ": "; + echo $fs->genProviderSelect("form_fs_provid", ' ', $fs->provider_id); + echo "\n"; + echo "

\n"; + + // Generate a line for each service already in this FS. + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + foreach ($fs->serviceitems as $lino => $li) { + // Skip diagnoses; those would be in the Diagnoses section below. + if ($code_types[$li['codetype']]['diag']) { + continue; + } + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + echo "
" . xlt('Services Provided') . " " . xlt('Provider') . " " . xlt('Price') . " " . xlt('Delete') . "
" . text($li['code']) . " " . text($li['code_text']) . " " . + $fs->genProviderSelect("form_fs_bill[$lino][provid]", '-- ' . xl("Default") . ' --', $li['provid']) . + "  " . oeFormatMoney($li['price']) . " \n" . + " \n"; + foreach ($li['hidden'] as $hname => $hvalue) { + echo " \n"; + } + echo "
\n"; + echo "
\n"; + echo "
\n"; +} // End Services Section + +if (isset($LBF_PRODUCTS_SECTION)) { + // Create the checkbox and div for the Products Section. + echo "
" . xlt('Products') . "\n"; + echo "
\n"; + echo "
\n"; + $display_style = 'none'; + + // If there are associated codes, generate a checkbox for each one. + if ($LBF_PRODUCTS_SECTION) { + echo "\n"; + $cols = 3; + $tdpct = (int) (100 / $cols); + $count = 0; + $relcodes = explode(';', $LBF_PRODUCTS_SECTION); + foreach ($relcodes as $codestring) { + if ($codestring === '') { + continue; + } + $codes_esc = htmlspecialchars($codestring, ENT_QUOTES); + $cbval = $fs->genCodeSelectorValue($codestring); + if ($count % $cols == 0) { + if ($count) { + echo " \n"; + } + echo " \n"; + } + echo " \n"; + ++$count; + } + if ($count) { + echo " \n"; + } + echo "
"; + echo "code_is_in_fee_sheet) { + echo " checked"; + } + list($codetype, $code) = explode(':', $codestring); + $crow = sqlQuery( + "SELECT name FROM drugs WHERE " . + "drug_id = ? ORDER BY drug_id LIMIT 1", + array($code) + ); + $title = empty($crow['name']) ? $code : xl_list_label($crow['name']); + echo " />" . htmlspecialchars($title, ENT_NOQUOTES); + echo "
\n"; + } + + // A row for Search + $ctype = $GLOBALS['ippf_specific'] ? 'MA' : ''; + echo "

"; + echo "  "; + echo "

\n"; + + // Generate a line for each product already in this FS. + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + $fs->loadProductItems(); + foreach ($fs->productitems as $lino => $li) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + echo "
" . xlt('Products Provided') . " " . xlt('Warehouse') . " " . xlt('Quantity') . " " . xlt('Price') . " " . xlt('Delete') . "
" . text($li['code_text']) . " " . + $fs->genWarehouseSelect("form_fs_prod[$lino][warehouse]", '', $li['warehouse'], false, $li['hidden']['drug_id'], true) . + "  " . + "" . + " " . oeFormatMoney($li['price']) . " \n" . + " \n"; + foreach ($li['hidden'] as $hname => $hvalue) { + echo " \n"; + } + echo "
\n"; + echo "
\n"; + echo "
\n"; +} // End Products Section + +if (isset($LBF_DIAGS_SECTION)) { + // Create the checkbox and div for the Diagnoses Section. + echo "
" . xlt('Diagnoses') . "\n"; + echo "
\n"; + echo "
\n"; + $display_style = 'none'; + + // If there are associated codes, generate a checkbox for each one. + if ($LBF_DIAGS_SECTION) { + echo "\n"; + $cols = 3; + $tdpct = (int) (100 / $cols); + $count = 0; + $relcodes = explode(';', $LBF_DIAGS_SECTION); + foreach ($relcodes as $codestring) { + if ($codestring === '') { + continue; + } + $codes_esc = htmlspecialchars($codestring, ENT_QUOTES); + $cbval = $fs->genCodeSelectorValue($codestring); + if ($count % $cols == 0) { + if ($count) { + echo " \n"; + } + echo " \n"; + } + echo " \n"; + ++$count; + } + if ($count) { + echo " \n"; + } + echo "
"; + echo "code_is_in_fee_sheet) { + echo " checked"; + } + list($codetype, $code) = explode(':', $codestring); + $title = lookup_code_descriptions($codestring); + $title = empty($title) ? $code : xl_list_label($title); + echo " />" . htmlspecialchars($title, ENT_NOQUOTES); + echo "
\n"; + } + + // A row for Search. + $ctype = 'ICD9,ICD10'; + echo "

"; + echo ""; + echo "

\n"; + + // Generate a line for each diagnosis already in this FS. + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + foreach ($fs->serviceitems as $lino => $li) { + // Skip anything that is not a diagnosis; those are in the Services section above. + if (!$code_types[$li['codetype']]['diag']) { + continue; + } + echo " \n"; + echo " \n"; + echo " \n"; + // The Diagnoses section shares the form_fs_bill array with the Services section. + echo " \n"; + echo " \n"; + } + echo "
" . xlt('Diagnosis') . " " . xlt('Delete') . "
" . text($li['code']) . " " . text($li['code_text']) . " \n" . + " \n"; + foreach ($li['hidden'] as $hname => $hvalue) { + echo " \n"; + } + echo "
\n"; + echo "
\n"; + echo "
\n"; +} // End Diagnoses Section + ?>
- + +generatePriceLevelSelector('form_fs_pricelevel'); + echo "  "; + } +?> - - - -   - - - + +   + + + +   + + + + - +

- + + + + + @@ -781,7 +1502,7 @@ while ($frow = sqlFetchArray($fres)) { diff --git a/interface/forms/LBF/printable.php b/interface/forms/LBF/printable.php index 5d93f5ab6..4b831d543 100644 --- a/interface/forms/LBF/printable.php +++ b/interface/forms/LBF/printable.php @@ -6,79 +6,175 @@ // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. - - require_once("../../globals.php"); require_once("$srcdir/acl.inc"); require_once("$srcdir/options.inc.php"); require_once("$srcdir/patient.inc"); +require_once($GLOBALS['fileroot'] . '/custom/code_types.inc.php'); -$CPR = 4; // cells per row +// Font size in points for table cell data. +$FONTSIZE = 9; // The form name is passed to us as a GET parameter. $formname = isset($_GET['formname']) ? $_GET['formname'] : ''; -$tmp = sqlQuery("SELECT title, notes FROM list_options WHERE " . - "list_id = 'lbfnames' AND option_id = ? AND activity = 1 LIMIT 1", array($formname)); -$formtitle = $tmp['title']; +$patientid = empty($_REQUEST['patientid']) ? 0 : (0 + $_REQUEST['patientid']); +if ($patientid < 0) { + $patientid = 0 + $pid; // -1 means current pid +} -// Extract parameters from this form's list item entry. -$jobj = json_decode($tmp['notes'], true); -if (!empty($jobj['columns'])) { - $CPR = intval($jobj['columns']); +$visitid = empty($_REQUEST['visitid']) ? 0 : (0 + $_REQUEST['visitid']); +if ($visitid < 0) { + $visitid = 0 + $encounter; // -1 means current encounter } -if (!empty($jobj['size' ])) { - $FONTSIZE = intval($jobj['size']); +$formid = empty($_REQUEST['formid']) ? 0 : (0 + $_REQUEST['formid']); + +// True if to display as a form to complete, false to display as information. +$isform = empty($_REQUEST['isform']) ? 0 : 1; + +$CPR = 4; // cells per row + +$grparr = array(); +getLayoutProperties($formname, $grparr, '*'); +$lobj = $grparr['']; +$formtitle = $lobj['grp_title']; +if (!empty($lobj['grp_columns'])) { + $CPR = intval($lobj['grp_columns']); +} +if (!empty($lobj['grp_size' ])) { + $FONTSIZE = intval($lobj['grp_size']); +} +if ($lobj['grp_services']) { + $LBF_SERVICES_SECTION = $lobj['grp_services'] == '*' ? '' : $lobj['grp_services']; +} +if ($lobj['grp_products']) { + $LBF_PRODUCTS_SECTION = $lobj['grp_products'] == '*' ? '' : $lobj['grp_products']; +} +if ($lobj['grp_diags' ]) { + $LBF_DIAGS_SECTION = $lobj['grp_diags' ] == '*' ? '' : $lobj['grp_diags' ]; } // Check access control. -if (!empty($jobj['aco'])) { - $LBF_ACO = explode('|', $jobj['aco']); +if (!empty($lobj['aco_spec'])) { + $LBF_ACO = explode('|', $lobj['aco_spec']); } - if (!acl_check('admin', 'super') && !empty($LBF_ACO)) { if (!acl_check($LBF_ACO[0], $LBF_ACO[1])) { die(xlt('Access denied')); } } +// Html2pdf fails to generate checked checkboxes properly, so write plain HTML +// if we are doing a visit-specific form to be completed. +$PDF_OUTPUT = ($formid && $isform) ? false : true; +// $PDF_OUTPUT = false; // debugging + +if ($PDF_OUTPUT) { + require_once("$srcdir/html2pdf/vendor/autoload.php"); + $pdf = new HTML2PDF('P', 'Letter', 'en'); + $pdf->setTestTdInOnePage(false); // Turn off error message for TD contents too big. + $pdf->pdf->SetDisplayMode('real'); + ob_start(); +} + +if ($visitid && (isset($LBF_SERVICES_SECTION) || isset($LBF_DIAGS_SECTION) || isset($LBF_PRODUCTS_SECTION))) { + require_once("$srcdir/FeeSheetHtml.class.php"); + $fs = new FeeSheetHtml($pid, $encounter); +} + $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formname)); + "ORDER BY group_id, seq", array($formname)); ?> + + - + + + +
- +"; +} else { + $logo = ""; +} +echo genFacilityTitle($formtitle, -1, $logo); +?> + : ________________________________________   : ____________________   : ____________________
 
+ 0) { - end_row(); - echo " \n"; - echo "\n"; + global $web_root, $webserver_root; + $content = ob_get_clean(); + // Fix a nasty html2pdf bug - it ignores document root! + $i = 0; + $wrlen = strlen($web_root); + $wsrlen = strlen($webserver_root); + while (true) { + $i = stripos($content, " src='/", $i + 1); + if ($i === false) { + break; + } + if (substr($content, $i+6, $wrlen) === $web_root && + substr($content, $i+6, $wsrlen) !== $webserver_root) { + $content = substr($content, 0, $i + 6) . $webserver_root . substr($content, $i + 6 + $wrlen); + } } + return $content; } -$last_group = ''; $cell_count = 0; $item_count = 0; +// This string is the active group levels. Each leading substring represents an instance of nesting. +$group_levels = ''; + +// This indicates if will need to be written to end the fields in a group. +$group_table_active = false; + while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; - $titlecols = $frow['titlecols']; - $datacols = $frow['datacols']; - $data_type = $frow['data_type']; - $field_id = $frow['field_id']; - $list_id = $frow['list_id']; - $currvalue = ''; - - // if (isset($result[$field_id])) $currvalue = $result[$field_id]; - - // Handle a data category (group) change. - if (strcmp($this_group, $last_group) != 0) { - end_group(); - if (strlen($last_group) > 0) { - echo "
\n"; + $this_group = $frow['group_id']; + $titlecols = $frow['titlecols']; + $datacols = $frow['datacols']; + $data_type = $frow['data_type']; + $field_id = $frow['field_id']; + $list_id = $frow['list_id']; + $edit_options = $frow['edit_options']; + + $currvalue = ''; + if ($formid || $visitid) { + $currvalue = lbf_current_value($frow, $formid, $visitid); + } + + // Skip this field if skip conditions call for that. + // Note this also accumulates info for subsequent skip tests. + if (isSkipped($frow, $currvalue) == 'skip') { + continue; + } + + if ($currvalue === false) { + // Should not happen. + error_log("Function lbf_current_value() failed for field '$field_id'."); + continue; + } + + // Skip this field if its do-not-print option is set. + if (strpos($edit_options, 'X') !== false) { + continue; + } + + $this_levels = $this_group; + $i = 0; + $mincount = min(strlen($this_levels), strlen($group_levels)); + while ($i < $mincount && $this_levels[$i] == $group_levels[$i]) { + ++$i; + } + // $i is now the number of initial matching levels. + + // If ending a group or starting a subgroup, terminate the current row and its table. + if ($group_table_active && ($i != strlen($group_levels) || $i != strlen($this_levels))) { + end_row(); + echo " \n"; + $group_table_active = false; + } + + // Close any groups that we are done with. + while (strlen($group_levels) > $i) { + $gname = $grparr[$group_levels]['grp_title']; + $group_levels = substr($group_levels, 0, -1); // remove last character + echo "\n"; + echo "\n"; + } + + // If there are any new groups, open them. + while ($i < strlen($this_levels)) { + end_row(); + if ($group_table_active) { + echo " \n"; + $group_table_active = false; } - $group_name = substr($this_group, 1); - $last_group = $this_group; - echo "" . text(xl_layout_label($group_name)) . "\n"; - + $group_levels .= $this_levels[$i++]; + $gname = $grparr[substr($group_levels, 0, $i)]['grp_title']; + $subtitle = $grparr[substr($group_levels, 0, $i)]['grp_subtitle']; + + // This is also for html2pdf. Telling it that the following stuff should + // start on a new page if there is not otherwise room for it on this page. + echo "\n"; + echo "
" . text(xl_layout_label($gname)) . "
\n"; echo "
\n"; echo " \n"; + echo " "; + for ($i = 1; $i <= $CPR; ++$i) { + $tmp = $i % 2 ? 'lcols1' : 'dcols1'; + echo ""; + } + echo "\n"; + if ($subtitle) { + // There is a group subtitle so show it. + echo "\n"; + echo "\n"; + } + $group_table_active = true; } - // Handle starting of a new row. - if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { + // Handle starting of a new row. + if (($cell_count + $titlecols + $datacols) > $CPR || $cell_count == 0) { end_row(); - echo " "; + // echo " "; + echo " "; } if ($item_count == 0 && $titlecols == 0) { $titlecols = 1; } - // Handle starting of a new label cell. + // Handle starting of a new label cell. if ($titlecols > 0) { end_cell(); - echo "
" . text($subtitle) . "
"; // html2pdf misbehaves with this. echo ">"; $cell_count += $titlecols; } - ++$item_count; echo ""; - + if ($frow['title']) { - echo (text(xl_layout_label($frow['title'])) . ":"); + echo (text(xl_layout_label($frow['title']))); } else { echo " "; } echo ""; - // Handle starting of a new data cell. + // Handle starting of a new data cell. if ($datacols > 0) { end_cell(); - echo " 25) { - echo " class='under'"; - } - + echo ""; + if (in_array($data_type, array(21,27,40))) { + // Omit underscore for checkboxes, radio buttons and images. + echo "border-width:0 0 0 0;"; + } + echo "'>"; $cell_count += $datacols; } ++$item_count; - generate_print_field($frow, $currvalue); + + if ($isform) { + generate_print_field($frow, $currvalue); + } else { + $s = generate_display_field($frow, $currvalue); + if ($s === '') { + $s = ' '; + } + echo $s; + } +} + +// Close all open groups. +if ($group_table_active) { + end_row(); + echo "
\n"; + $group_table_active = false; +} +while (strlen($group_levels)) { + $gname = $grparr[$group_levels]['grp_title']; + $group_levels = substr($group_levels, 0, -1); // remove last character + echo "
\n"; + echo "
\n"; } -end_group(); +$fs = false; +if ($fs && (isset($LBF_SERVICES_SECTION) || isset($LBF_DIAGS_SECTION))) { + $fs->loadServiceItems(); +} + +if ($fs && isset($LBF_SERVICES_SECTION)) { + $s = ''; + foreach ($fs->serviceitems as $lino => $li) { + // Skip diagnoses; those would be in the Diagnoses section below. + if ($code_types[$li['codetype']]['diag']) { + continue; + } + $s .= " \n"; + $s .= " " . text($li['code']) . " \n"; + $s .= " " . text($li['code_text']) . " \n"; + $s .= " \n"; + } + if ($s) { + echo "\n"; + // echo "

" . xlt('Services') . "

\n"; + echo "
" . xlt('Services') . "
\n"; + echo "
\n"; + echo " \n"; + echo $s; + echo "
\n"; + echo "
\n"; + echo "
\n"; + } +} // End Services Section + +if ($fs && isset($LBF_PRODUCTS_SECTION)) { + $s = ''; + $fs->loadProductItems(); + foreach ($fs->productitems as $lino => $li) { + $s .= " \n"; + $s .= " " . text($li['code_text']) . " \n"; + $s .= " " . text($li['units']) . " \n"; + $s .= " \n"; + } + if ($s) { + echo "\n"; + // echo "

" . xlt('Products') . "

\n"; + echo "
" . xlt('Products') . "
\n"; + echo "
\n"; + echo " \n"; + echo $s; + echo "
\n"; + echo "
\n"; + echo "
\n"; + } +} // End Products Section + +if ($fs && isset($LBF_DIAGS_SECTION)) { + $s = ''; + foreach ($fs->serviceitems as $lino => $li) { + // Skip anything that is not a diagnosis; those are in the Services section above. + if (!$code_types[$li['codetype']]['diag']) { + continue; + } + $s .= " \n"; + $s .= " " . text($li['code']) . " \n"; + $s .= " " . text($li['code_text']) . " \n"; + $s .= " \n"; + } + if ($s) { + echo "\n"; + // echo "

" . xlt('Diagnoses') . "

\n"; + echo "
" . xlt('Diagnoses') . "
\n"; + echo "
\n"; + echo " \n"; + echo $s; + echo "
\n"; + echo "
\n"; + echo "
\n"; + } +} // End Services Section + ?>
- - +writeHTML($content, false); + $pdf->Output('form.pdf', 'I'); // D = Download, I = Inline +} else { +?> - + diff --git a/interface/forms/LBF/report.php b/interface/forms/LBF/report.php index f049c95ef..19a6058b5 100644 --- a/interface/forms/LBF/report.php +++ b/interface/forms/LBF/report.php @@ -1,5 +1,5 @@ +// Copyright (C) 2009-2017 Rod Roark // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -15,18 +15,15 @@ include_once($GLOBALS["srcdir"] . "/api.inc"); function lbf_report($pid, $encounter, $cols, $id, $formname, $no_wrap = false) { + global $CPR; require_once($GLOBALS["srcdir"] . "/options.inc.php"); - // Extract parameters from this form's list item entry. - $tmp = sqlQuery("SELECT notes FROM list_options WHERE " . - "list_id = 'lbfnames' AND option_id = ? AND activity = 1", array($formname)); - $jobj = json_decode($tmp['notes'], true); - - // Check access control. - if (!empty($jobj['aco'])) { - $LBF_ACO = explode('|', $jobj['aco']); + $grparr = array(); + getLayoutProperties($formname, $grparr, '*'); + // Check access control. + if (!empty($grparr['']['grp_aco_spec'])) { + $LBF_ACO = explode('|', $grparr['']['grp_aco_spec']); } - if (!acl_check('admin', 'super') && !empty($LBF_ACO)) { if (!acl_check($LBF_ACO[0], $LBF_ACO[1])) { die(xlt('Access denied')); @@ -37,7 +34,7 @@ function lbf_report($pid, $encounter, $cols, $id, $formname, $no_wrap = false) $shrow = getHistoryData($pid); $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formname)); + "ORDER BY group_id, seq", array($formname)); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; $currvalue = ''; diff --git a/interface/forms/eye_mag/a_issue.php b/interface/forms/eye_mag/a_issue.php index 94317eeb1..c326567fd 100644 --- a/interface/forms/eye_mag/a_issue.php +++ b/interface/forms/eye_mag/a_issue.php @@ -809,7 +809,7 @@ foreach (explode(',', $given) as $item) { } $group_fields_query = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = 'HIS' AND group_name = '4Lifestyle' AND uor > 0 " . + "WHERE form_id = 'HIS' AND group_id = '4' AND uor > 0 " . "ORDER BY seq"); while ($group_fields = sqlFetchArray($group_fields_query)) { $titlecols = $group_fields['titlecols']; diff --git a/interface/forms/eye_mag/php/eye_mag_functions.php b/interface/forms/eye_mag/php/eye_mag_functions.php index 49e11374f..92fa45904 100644 --- a/interface/forms/eye_mag/php/eye_mag_functions.php +++ b/interface/forms/eye_mag/php/eye_mag_functions.php @@ -1710,7 +1710,7 @@ function build_PMSFH($pid) $result1 = sqlQuery("select * from history_data where pid=? order by date DESC limit 0,1", array($pid)); $group_fields_query = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = 'HIS' AND group_name = '4Lifestyle' AND uor > 0 " . + "WHERE form_id = 'HIS' AND group_id = '4' AND uor > 0 " . "ORDER BY seq"); while ($group_fields = sqlFetchArray($group_fields_query)) { $titlecols = $group_fields['titlecols']; @@ -1834,7 +1834,7 @@ function build_PMSFH($pid) Suicide: */ $group_fields_query = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = 'HIS' AND group_name = '3Relatives' AND uor > 0 " . + "WHERE form_id = 'HIS' AND group_id = '3' AND uor > 0 " . "ORDER BY seq"); while ($group_fields = sqlFetchArray($group_fields_query)) { $titlecols = $group_fields['titlecols']; diff --git a/interface/forms/eye_mag/save.php b/interface/forms/eye_mag/save.php index 293b66013..bf219e165 100644 --- a/interface/forms/eye_mag/save.php +++ b/interface/forms/eye_mag/save.php @@ -458,7 +458,7 @@ if ($_REQUEST["mode"] == "new") { $newdata = array(); $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'HIS' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; //get value only if field exist in $_POST (prevent deleting of field with disabled attribute) diff --git a/interface/main/backup.php b/interface/main/backup.php index f4132bc28..9dc1009d2 100644 --- a/interface/main/backup.php +++ b/interface/main/backup.php @@ -312,7 +312,7 @@ if ($form_step == 5) { // create the final compressed tar containing all files if ($form_step == 101) { echo "

 " . xl('Select the configuration items to export') . ":

"; - echo "\n\n"; } - - echo "
\n"; + echo "\n\n\n"; diff --git a/interface/main/left_nav.php b/interface/main/left_nav.php index b1a79fd66..9f126c612 100644 --- a/interface/main/left_nav.php +++ b/interface/main/left_nav.php @@ -90,6 +90,7 @@ require_once($GLOBALS['fileroot']."/library/acl.inc"); require_once($GLOBALS['fileroot']."/custom/code_types.inc.php"); require_once($GLOBALS['fileroot']."/library/patient.inc"); require_once($GLOBALS['fileroot']."/library/lists.inc"); +require_once($GLOBALS['fileroot']."/library/registry.inc"); require_once $GLOBALS['srcdir'].'/ESign/Api.php'; require_once $GLOBALS['srcdir'].'/user.inc'; @@ -1027,6 +1028,7 @@ $(document).ready(function(){ if(1 == ){ $("#navigation-slide > li > a.collapsed + ul").slideToggle("medium"); $("#navigation-slide > li > ul > li > a.collapsed_lv2 + ul").slideToggle("medium"); + $("#navigation-slide > li > ul > li > ul > li > a.collapsed_lv3 + ul").slideToggle("medium"); $("#navigation-slide > li > a.expanded").click(function() { $("#navigation-slide > li > a.expanded").not(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium"); $(this).toggleClass("expanded").toggleClass("collapsed").parent().find('> ul').slideToggle("medium"); @@ -1039,10 +1041,18 @@ $(document).ready(function(){ $("#navigation-slide > li > a.expanded").next("ul").find("li > a.expanded_lv2").not(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium"); $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium"); }); + $("#navigation-slide > li > ul > li > ul > li > a.expanded_lv3").click(function() { + $("#navigation-slide > li > ul > li > a.expanded").next("ul").find("li > a.expanded_lv3").not(this).toggleClass("expanded_lv3").toggleClass("collapsed_lv3").parent().find('> ul').slideToggle("medium"); + $(this).toggleClass("expanded_lv3").toggleClass("collapsed_lv3").parent().find('> ul').slideToggle("medium"); + }); $("#navigation-slide > li > ul > li > a.collapsed_lv2").click(function() { $("#navigation-slide > li > a.expanded").next("ul").find("li > a.expanded_lv2").not(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium"); $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium"); }); + $("#navigation-slide > li > ul > li > ul > li > a.collapsed_lv3").click(function() { + $("#navigation-slide > li > ul > li > a.expanded").next("ul").find("li > a.expanded_lv3").not(this).toggleClass("expanded_lv3").toggleClass("collapsed_lv3").parent().find('> ul').slideToggle("medium"); + $(this).toggleClass("expanded_lv2").toggleClass("collapsed_lv2").parent().find('> ul').slideToggle("medium"); + }); $("#navigation-slide > li > a#cal0").prepend(' '); $("#navigation-slide > li > a#pfb0").prepend(' '); $("#navigation-slide > li > a#msg0").prepend(' '); @@ -1066,8 +1076,10 @@ $(document).ready(function(){ //Remove the links (used by the sliding menu) that will break treeview $('a.collapsed').each(function() { $(this).replaceWith(''+$(this).text()+''); }); $('a.collapsed_lv2').each(function() { $(this).replaceWith(''+$(this).text()+''); }); + $('a.collapsed_lv3').each(function() { $(this).replaceWith(''+$(this).text()+''); }); $('a.expanded').each(function() { $(this).replaceWith(''+$(this).text()+''); }); $('a.expanded_lv2').each(function() { $(this).replaceWith(''+$(this).text()+''); }); + $('a.expanded_lv3').each(function() { $(this).replaceWith(''+$(this).text()+''); }); // Initiate treeview $("#navigation").treeview({ @@ -1185,65 +1197,44 @@ if ($GLOBALS['gbl_portal_cms_enable'] && acl_check('patientportal', 'portal')) { \n"; + } + echo "
  • " . xlt($entry['category']) . "
      \n"; + $reglastcat = $entry['category']; + } genMiscLink( 'RBot', 'cod', '2', xl_form_title($title), - "patient_file/encounter/load_form.php?formname=$option_id" + "patient_file/encounter/load_form.php?formname=" . urlencode($option_id) ); } - -// -include_once("$srcdir/registry.inc"); -$reg = getRegistered(); -if (!empty($reg)) { - foreach ($reg as $entry) { - $option_id = $entry['directory']; - $title = trim($entry['nickname']); - if ($option_id == 'fee_sheet') { - continue; - } - - if ($option_id == 'newpatient') { - continue; - } - - // Check permission to create forms of this type. - $tmp = explode('|', $entry['aco_spec']); - if (!empty($tmp[1])) { - if (!acl_check($tmp[0], $tmp[1], '', 'write') && !acl_check($tmp[0], $tmp[1], '', 'addonly')) { - continue; - } - } - - if (empty($title)) { - $title = $entry['name']; - } - - genMiscLink( - 'RBot', - 'cod', - '2', - xl_form_title($title), - "patient_file/encounter/load_form.php?formname=" . - urlencode($option_id) - ); - } +if ($reglastcat) { + echo "
  • \n"; } ?> @@ -1731,26 +1722,41 @@ if (!empty($reg)) {
    • - - - " . xlt('Core') . "
        \n"; + genPopLink(xl('Demographics'), '../patient_file/summary/demographics_print.php'); + genPopLink(xl('Superbill/Fee Sheet'), '../patient_file/printed_fee_sheet.php'); + // genPopLink(xl('Referral'),'../patient_file/transaction/print_referral.php'); + echo "
      \n"; + + // Generate the blank form items for LBF visit forms. + // + $reglastcat = ''; + $regrows = getFormsByCategory('1', true); // defined in registry.inc +foreach ($regrows as $entry) { + $option_id = $entry['directory']; + $title = trim($entry['nickname']); + $tmp = explode('|', $entry['aco_spec']); + if (!empty($tmp[1])) { + if (!acl_check($tmp[0], $tmp[1])) { + continue; } - - genPopLink($title, "../forms/LBF/printable.php?formname=$option_id"); } + if (empty($title)) { + $title = $entry['name']; + } + if ($entry['category'] != $reglastcat) { + if ($reglastcat) { + echo "
  • \n"; + } + echo "
  • " . xlt($entry['category']) . "
      \n"; + $reglastcat = $entry['category']; + } + genPopLink(xl_form_title($title), "../forms/LBF/printable.php?formname=" . urlencode($option_id)); +} +if ($reglastcat) { + echo "
  • \n"; +} ?> diff --git a/interface/main/tabs/menu/menu_updates.php b/interface/main/tabs/menu/menu_updates.php index 6d42763ac..35c09e572 100644 --- a/interface/main/tabs/menu/menu_updates.php +++ b/interface/main/tabs/menu/menu_updates.php @@ -106,9 +106,12 @@ function update_visit_forms(&$menu_list) { $baseURL = "/interface/patient_file/encounter/load_form.php?formname="; $menu_list->children = array(); - // LBF Visit forms - $lres = sqlStatement("SELECT * FROM list_options " . - "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title"); + + $lres = sqlStatement("SELECT grp_form_id AS option_id, grp_title AS title, grp_aco_spec " . + "FROM layout_group_properties WHERE " . + "grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_activity = 1 " . + "ORDER BY grp_seq, grp_title"); + while ($lrow = sqlFetchArray($lres)) { $option_id = $lrow['option_id']; // should start with LBF $title = $lrow['title']; @@ -119,14 +122,12 @@ function update_visit_forms(&$menu_list) $formEntry->requirement = 2; $formEntry->target = 'enc'; // Plug in ACO attribute, if any, of this LBF. - $jobj = json_decode($lrow['notes'], true); - if (!empty($jobj['aco'])) { - $tmp = explode('|', $jobj['aco']); + if (!empty($lrow['grp_aco_spec'])) { + $tmp = explode('|', $lrow['grp_aco_spec']); if (!empty($tmp[1])) { $formEntry->acl_req = array($tmp[0], $tmp[1], 'write', 'addonly'); } } - array_push($menu_list->children, $formEntry); } diff --git a/interface/new/new_comprehensive.php b/interface/new/new_comprehensive.php index ed59dc678..2a166d46e 100644 --- a/interface/new/new_comprehensive.php +++ b/interface/new/new_comprehensive.php @@ -6,7 +6,7 @@ * @link http://www.open-emr.org * @author Rod Roark * @author Brady Miller - * @copyright Copyright (c) 2009-2010 Rod Roark + * @copyright Copyright (c) 2009-2017 Rod Roark * @copyright Copyright (c) 2017 Brady Miller * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ @@ -32,13 +32,16 @@ $searchcolor = empty($GLOBALS['layout_search_color']) ? $WITH_SEARCH = ($GLOBALS['full_new_patient_form'] == '1' || $GLOBALS['full_new_patient_form'] == '2' ); $SHORT_FORM = ($GLOBALS['full_new_patient_form'] == '2' || $GLOBALS['full_new_patient_form'] == '3' || $GLOBALS['full_new_patient_form'] == '4'); +$grparr = array(); +getLayoutProperties('DEM', $grparr); + function getLayoutRes() { global $SHORT_FORM; return sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . ($SHORT_FORM ? "AND ( uor > 1 OR edit_options LIKE '%N%' ) " : "") . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); } // Determine layout field search treatment from its data type: @@ -488,15 +491,19 @@ $item_count = 0; $display_style = 'block'; $group_seq = 0; // this gives the DIV blocks unique IDs +$condition_str = ''; + while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; + $this_group = $frow['group_id']; $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; $field_id = $frow['field_id']; $list_id = $frow['list_id']; $currvalue = ''; - $condition_str = get_conditions_str($condition_str, $group_fields); + + // Accumulate action conditions into a JSON expression for the browser side. + accumActionConditions($field_id, $condition_str, $frow['conditions']); if (strpos($field_id, 'em_') === 0) { $tmp = substr($field_id, 3); @@ -514,7 +521,8 @@ while ($frow = sqlFetchArray($fres)) { if (!$SHORT_FORM) { end_group(); $group_seq++; // ID for DIV tags - $group_name = substr($this_group, 1); + $group_name = $grparr[$this_group]['grp_title']; + if (strlen($last_group) > 0) { echo "
    "; } @@ -879,7 +887,7 @@ enable_modals(); $mfres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' AND " . "(edit_options LIKE '%D%' OR edit_options LIKE '%W%' )" . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($mfrow = sqlFetchArray($mfres)) { $field_id = $mfrow['field_id']; if (strpos($field_id, 'em_') === 0) { diff --git a/interface/new/new_comprehensive_save.php b/interface/new/new_comprehensive_save.php index 5467f592c..21d21d533 100644 --- a/interface/new/new_comprehensive_save.php +++ b/interface/new/new_comprehensive_save.php @@ -1,5 +1,5 @@ +// Copyright (C) 2009, 2017 Rod Roark // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -49,9 +49,8 @@ $newdata = array(); $newdata['patient_data' ] = array(); $newdata['employer_data'] = array(); $fres = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "OR field_id = 'pubpid' " . - "ORDER BY group_name, seq"); + "WHERE form_id = 'DEM' AND (uor > 0 OR field_id = 'pubpid') AND field_id != '' " . + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; $field_id = $frow['field_id']; diff --git a/interface/new/new_search_popup.php b/interface/new/new_search_popup.php index 9abb7dd67..d6e50bed6 100644 --- a/interface/new/new_search_popup.php +++ b/interface/new/new_search_popup.php @@ -1,5 +1,5 @@ +// Copyright (C) 2010, 2017 Rod Roark // Some code was adapted from patient_select.php. // // This program is free software; you can redistribute it and/or @@ -216,7 +216,7 @@ $tres = sqlStatement("SELECT field_id, title FROM layout_options " . "( uor > 1 OR uor > 0 AND edit_options LIKE '%D%' ) AND " . "field_id NOT LIKE 'title' AND " . "field_id NOT LIKE '_name' " . - "ORDER BY group_name, seq, title LIMIT 9"); + "ORDER BY group_id, seq, title LIMIT 9"); while ($trow = sqlFetchArray($tres)) { $extracols[$trow['field_id']] = $trow['title']; diff --git a/interface/orders/procedure_stats.php b/interface/orders/procedure_stats.php index d3a3621fa..8d824aeaa 100644 --- a/interface/orders/procedure_stats.php +++ b/interface/orders/procedure_stats.php @@ -80,7 +80,7 @@ $arr_titles = array(); // will contain column headers $lres = sqlStatement("SELECT field_id, title, data_type, list_id, description " . "FROM layout_options WHERE " . "form_id = 'DEM' AND uor > 0 AND field_id NOT LIKE 'em%' " . - "ORDER BY group_name, seq, title"); + "ORDER BY group_id, seq, title"); while ($lrow = sqlFetchArray($lres)) { $fid = $lrow['field_id']; if ($fid == 'fname' || $fid == 'mname' || $fid == 'lname') { diff --git a/interface/patient_file/deleter.php b/interface/patient_file/deleter.php index 92e6e8272..f4d13d5e5 100644 --- a/interface/patient_file/deleter.php +++ b/interface/patient_file/deleter.php @@ -4,7 +4,7 @@ * * Called from many different pages. * - * Copyright (C) 2005-2013 Rod Roark + * Copyright (C) 2005-2016 Rod Roark * Copyright (C) 2015 Roberto Vasquez * * LICENSE: This program is free software; you can redistribute it and/or @@ -129,14 +129,24 @@ function delete_drug_sales($patient_id, $encounter_id = 0) } } -// Delete a form's data from its form-specific table. +// Delete a form's data that is specific to that form. // -function form_delete($formdir, $formid) +function form_delete($formdir, $formid, $patient_id, $encounter_id) { $formdir = ($formdir == 'newpatient') ? 'encounter' : $formdir; $formdir = ($formdir == 'newGroupEncounter') ? 'groups_encounter' : $formdir; if (substr($formdir, 0, 3) == 'LBF') { row_delete("lbf_data", "form_id = '" . add_escape_custom($formid) . "'"); + // Delete the visit's "source=visit" attributes that are not used by any other form. + $where = "pid = '" . add_escape_custom($patient_id) . "' AND encounter = '" . + add_escape_custom($encounter_id) . "' AND field_id NOT IN (" . + "SELECT lo.field_id FROM forms AS f, layout_options AS lo WHERE " . + "f.pid = '" . add_escape_custom($patient_id) . "' AND f.encounter = '" . + add_escape_custom($encounter_id) . "' AND f.formdir LIKE 'LBF%' AND " . + "f.deleted = 0 AND f.form_id != '" . add_escape_custom($formid) . "' AND " . + "lo.form_id = f.formdir AND lo.source = 'E' AND lo.uor > 0)"; + // echo "\n"; // debugging + row_delete("shared_attributes", $where); } else if ($formdir == 'procedure_order') { $tres = sqlStatement("SELECT procedure_report_id FROM procedure_report " . "WHERE procedure_order_id = ?", array($formid)); @@ -234,7 +244,7 @@ if ($_POST['form_submit']) { $res = sqlStatement("SELECT * FROM forms WHERE pid = ?", array($patient)); while ($row = sqlFetchArray($res)) { - form_delete($row['formdir'], $row['form_id']); + form_delete($row['formdir'], $row['form_id'], $row['pid'], $row['encounter']); } row_delete("forms", "pid = '" . add_escape_custom($patient) . "'"); @@ -258,7 +268,7 @@ if ($_POST['form_submit']) { row_delete("issue_encounter", "encounter = '" . add_escape_custom($encounterid) . "'"); $res = sqlStatement("SELECT * FROM forms WHERE encounter = ?", array($encounterid)); while ($row = sqlFetchArray($res)) { - form_delete($row['formdir'], $row['form_id']); + form_delete($row['formdir'], $row['form_id'], $row['pid'], $row['encounter']); } row_delete("forms", "encounter = '" . add_escape_custom($encounterid) . "'"); @@ -272,8 +282,7 @@ if ($_POST['form_submit']) { if (! $formdir) { die("There is no form with id '" . text($formid) . "'"); } - - form_delete($formdir, $row['form_id']); + form_delete($formdir, $row['form_id'], $row['pid'], $row['encounter']); row_delete("forms", "id = '" . add_escape_custom($formid) . "'"); } else if ($issue) { if (!acl_check('admin', 'super')) { diff --git a/interface/patient_file/encounter/Services/ViewHelper.php b/interface/patient_file/encounter/Services/ViewHelper.php index 861d1e76e..9255ff6e1 100644 --- a/interface/patient_file/encounter/Services/ViewHelper.php +++ b/interface/patient_file/encounter/Services/ViewHelper.php @@ -181,7 +181,11 @@ class ViewHelper */ static function getLayoutBasedForms() { - $sql = "SELECT * FROM list_options WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title"; + $sql = "SELECT grp_form_id AS option_id, grp_title AS title, grp_aco_spec " . + "FROM layout_group_properties WHERE " . + "grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_activity = 1 " . + "ORDER BY grp_seq, grp_title"; + $result = sqlStatement($sql); $return = array(); if (sqlNumRows($result)) { @@ -189,14 +193,12 @@ class ViewHelper $optionId = $row['option_id']; $encodedOptionId = urlencode($optionId); $title = $row['title']; - $jobj = json_decode($row['notes'], true); - if (!empty($jobj['aco'])) { - $tmp = explode('|', $jobj['aco']); + if (!empty($row['grp_aco_spec'])) { + $tmp = explode('|', $row['grp_aco_spec']); if (!acl_check($tmp[0], $tmp[1], '', 'write') && !acl_check($tmp[0], $tmp[1], '', 'addonly')) { continue; } } - $row = [ 'href' => "{$GLOBALS['rootdir']}/patient_file/encounter/load_form.php?formname={$encodedOptionId}", 'name' => xl_form_title($title), diff --git a/interface/patient_file/encounter/delete_form.php b/interface/patient_file/encounter/delete_form.php index bb5392e43..7d061ed37 100644 --- a/interface/patient_file/encounter/delete_form.php +++ b/interface/patient_file/encounter/delete_form.php @@ -41,12 +41,21 @@ if (file_exists($deleteform)) { $returnurl = 'encounter_top.php'; if ($_POST['confirm']) { - // set the deleted flag of the indicated form - $sql = "update forms set deleted=1 where id= ?"; if ($_POST['id'] != "*" && $_POST['id'] != '') { + // set the deleted flag of the indicated form + $sql = "update forms set deleted=1 where id=?"; sqlInsert($sql, array($_POST['id'])); + // Delete the visit's "source=visit" attributes that are not used by any other form. + sqlStatement( + "DELETE FROM shared_attributes WHERE " . + "pid = ? AND encounter = ? AND field_id NOT IN (" . + "SELECT lo.field_id FROM forms AS f, layout_options AS lo WHERE " . + "f.pid = ? AND f.encounter = ? AND f.formdir LIKE 'LBF%' AND " . + "f.deleted = 0 AND " . + "lo.form_id = f.formdir AND lo.source = 'E' AND lo.uor > 0)", + array($pid, $encounter, $pid, $encounter) + ); } - // log the event newEvent("delete", $_SESSION['authUser'], $_SESSION['authProvider'], 1, "Form ".$_POST['formname']." deleted from Encounter ".$_POST['encounter']); diff --git a/interface/patient_file/encounter/find_code_dynamic.php b/interface/patient_file/encounter/find_code_dynamic.php new file mode 100644 index 000000000..d34219b1d --- /dev/null +++ b/interface/patient_file/encounter/find_code_dynamic.php @@ -0,0 +1,310 @@ + + * @copyright Copyright (c) 2015-2017 Rod Roark + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +require_once('../../globals.php'); +require_once($GLOBALS['srcdir'] . '/patient.inc'); +require_once($GLOBALS['srcdir'] . '/csv_like_join.php'); +require_once($GLOBALS['fileroot'] . '/custom/code_types.inc.php'); + +$info_msg = ""; + +// What we are picking from: codes, fields, lists or groups +$what = empty($_GET['what']) ? 'codes' : $_GET['what']; + +// For what == codes +$codetype = empty($_GET['codetype']) ? '' : $_GET['codetype']; +if (!empty($codetype)) { + $allowed_codes = split_csv_line($codetype); +} +// This is the html element of the target script where the selected code will be stored. +$target_element = empty($_GET['target_element']) ? '' : $_GET['target_element']; + +// For what == fields +$source = empty($_GET['source']) ? 'D' : $_GET['source']; + +// For what == groups +$layout_id = empty($_GET['layout_id']) ? '' : $_GET['layout_id']; +?> + + + +<?php echo xlt('Code Finder'); ?> + + + + + + + + + + + + + + + + + + + +
    + +\n"; +if ($what == 'codes') { + if (isset($allowed_codes)) { + if (count($allowed_codes) == 1) { + echo "\n"; + } else { + echo "\n"; + } + } else { + echo "\n"; + } + echo "  \n"; + echo "" . + xlt('Include Inactive') . "\n"; + echo "  \n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "\n"; +} +if ($what == 'lists') { + echo "\n"; +} +echo "

    \n"; +?> + + +
    \n"; echo "" . xlt('Tables') . "
    \n"; echo "\n"; @@ -341,15 +341,16 @@ if ($form_step == 101) { echo "\n"; - // Multi-select for layouts. + // Multi-select for layouts. echo "
    \n"; echo "" . xlt('Layouts') . "
    \n"; echo "\n"; @@ -436,9 +437,9 @@ if ($form_step == 102) { $cmd .= "echo \"DELETE FROM list_options WHERE list_id = '$listid';\" >> $EXPORT_FILE;"; $cmd .= "echo \"DELETE FROM list_options WHERE list_id = 'lists' AND option_id = '$listid';\" >> $EXPORT_FILE;"; } - $cmd .= $dumppfx . - " --where=\"list_id = 'lists' AND option_id = '$listid' OR list_id = '$listid'\" " . + " --where=\"list_id = 'lists' AND option_id = '$listid' OR list_id = '$listid' " . + "ORDER BY list_id != 'lists', seq, title\" " . escapeshellarg($sqlconf["dbase"]) . " list_options"; if (IS_WINDOWS) { # windows uses the & to join statements. @@ -458,31 +459,26 @@ if ($form_step == 102) { } else { $cmd .= "echo \"DELETE FROM layout_options WHERE form_id = '$layoutid';\" >> $EXPORT_FILE;"; } - - if (strpos($layoutid, 'LBF') === 0) { - if (IS_WINDOWS) { - # windows will place the quotes in the outputted code if they are there. we removed them here. - $cmd .= " echo DELETE FROM list_options WHERE list_id = 'lbfnames' AND option_id = '$layoutid'; >> $EXPORT_FILE & "; - } else { - $cmd .= "echo \"DELETE FROM list_options WHERE list_id = 'lbfnames' AND option_id = '$layoutid';\" >> $EXPORT_FILE;"; - } - - $cmd .= $dumppfx . - " --where=\"list_id = 'lbfnames' AND option_id = '$layoutid'\" " . - escapeshellarg($sqlconf["dbase"]) . " list_options" ; - if (IS_WINDOWS) { - # windows uses the & to join statements. - $cmd .= " >> $EXPORT_FILE & "; - } else { - $cmd .= " >> $EXPORT_FILE;"; - } + if (IS_WINDOWS) { + # windows will place the quotes in the outputted code if they are there. we removed them here. + $cmd .= "echo \"DELETE FROM layout_group_properties WHERE grp_form_id = '$layoutid';\" >> $EXPORT_FILE &;"; + } else { + $cmd .= "echo \"DELETE FROM layout_group_properties WHERE grp_form_id = '$layoutid';\" >> $EXPORT_FILE;"; + } + $cmd .= $dumppfx . + " --where=\"grp_form_id = '$layoutid'\" " . + escapeshellarg($sqlconf["dbase"]) . " layout_group_properties"; + if (IS_WINDOWS) { + # windows uses the & to join statements. + $cmd .= " >> $EXPORT_FILE & "; + } else { + $cmd .= " >> $EXPORT_FILE;"; } - $cmd .= $dumppfx . - " --where=\"form_id = '$layoutid'\" " . + " --where=\"form_id = '$layoutid' ORDER BY group_id, seq, title\" " . escapeshellarg($sqlconf["dbase"]) . " layout_options" ; if (IS_WINDOWS) { - # windows uses the & to join statements. + # windows uses the & to join statements. $cmd .= " >> $EXPORT_FILE & "; } else { $cmd .= " >> $EXPORT_FILE;"; diff --git a/interface/main/finder/patient_select.php b/interface/main/finder/patient_select.php index 34e848801..e0504e682 100644 --- a/interface/main/finder/patient_select.php +++ b/interface/main/finder/patient_select.php @@ -151,7 +151,7 @@ if ($popup) { $where = "1 = 1"; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; if (strpos($field_id, 'em_') === 0) { @@ -372,7 +372,7 @@ if (!$popup && preg_match('/^(\d+)\s*(.*)/', $patient, $matches) > 0) { "field_id NOT LIKE 'ss' AND " . "field_id NOT LIKE 'DOB' AND " . "field_id NOT LIKE 'pubpid' " . - "ORDER BY group_name, seq LIMIT 5"); + "ORDER BY group_id, seq LIMIT 5"); while ($trow = sqlFetchArray($tres)) { $extracols[$trow['field_id']] = $trow; echo "
    " . htmlspecialchars(xl($trow['title']), ENT_NOQUOTES) . "
    + + + + + + + + + + + + +
    ...
    + + +
    +

    +  +' onclick='newField()' /> +

    +
    + + + + + diff --git a/interface/patient_file/encounter/find_code_dynamic_ajax.php b/interface/patient_file/encounter/find_code_dynamic_ajax.php new file mode 100644 index 000000000..77776d450 --- /dev/null +++ b/interface/patient_file/encounter/find_code_dynamic_ajax.php @@ -0,0 +1,321 @@ + + * @copyright Copyright (c) 2015-2017 Rod Roark + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +require_once("../../globals.php"); +require_once("$srcdir/options.inc.php"); +require_once($GLOBALS['fileroot'] . '/custom/code_types.inc.php'); + +// Paging parameters. -1 means not applicable. +// +$iDisplayStart = isset($_GET['iDisplayStart' ]) ? 0 + $_GET['iDisplayStart' ] : -1; +$iDisplayLength = isset($_GET['iDisplayLength']) ? 0 + $_GET['iDisplayLength'] : -1; +$limit = ''; +if ($iDisplayStart >= 0 && $iDisplayLength >= 0) { + $limit = "LIMIT " . escape_limit($iDisplayStart) . ", " . escape_limit($iDisplayLength); +} +$searchTerm = isset($_GET['sSearch']) ? $_GET['sSearch'] : ''; + +// What we are picking from: codes, fields, lists or groups +$what = $_GET['what']; +$layout_id = ''; + +if ($what == 'codes') { + $codetype = $_GET['codetype']; + $prod = $codetype == 'PROD'; + $ncodetype = $code_types[$codetype]['id']; + $include_inactive = !empty($_GET['inactive']); +} else if ($what == 'fields') { + $source = empty($_GET['source']) ? 'D' : $_GET['source']; + if ($source == 'D') { + $layout_id = 'DEM'; + } else if ($source == 'H') { + $layout_id = 'HIS'; + } else if ($source == 'E') { + $layout_id = 'LBF%'; + } +} else if ($what == 'groups') { + if (!empty($_GET['layout_id'])) { + $layout_id = $_GET['layout_id']; + } +} + +$form_encounter_layout = array( + array('field_id' => 'date', + 'title' => xl('Visit Date'), + 'uor' => '1', + 'data_type' => '4', // Text-date + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'facility_id', + 'title' => xl('Service Facility'), + 'uor' => '1', + 'data_type' => '35', // Facilities + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'pc_catid', + 'title' => xl('Visit Category'), + 'uor' => '1', + 'data_type' => '18', // Visit Category + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'reason', + 'title' => xl('Reason for Visit'), + 'uor' => '1', + 'data_type' => '2', // Text + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'onset_date', + 'title' => xl('Date of Onset'), + 'uor' => '1', + 'data_type' => '4', // Text-date + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'referral_source', + 'title' => xl('Referral Source'), + 'uor' => '1', + 'data_type' => '1', // List + 'list_id' => 'refsource', + 'edit_options' => '', + ), + array('field_id' => 'shift', + 'title' => xl('Shift'), + 'uor' => '1', + 'data_type' => '1', // List + 'list_id' => 'shift', + 'edit_options' => '', + ), + array('field_id' => 'billing_facility', + 'title' => xl('Billing Facility'), + 'uor' => '1', + 'data_type' => '35', // Facilities + 'list_id' => '', + 'edit_options' => '', + ), + array('field_id' => 'voucher_number', + 'title' => xl('Voucher Number'), + 'uor' => '1', + 'data_type' => '2', // Text + 'list_id' => '', + 'edit_options' => '', + ), +); + +function feSearchSort($search = '', $column = 0, $reverse = false) +{ + global $form_encounter_layout; + $arr = array(); + foreach ($form_encounter_layout as $feitem) { + if ($search && stripos($feitem['field_id'], $search) === false && + stripos($feitem['title'], $search) === false ) { + continue; + } + $feitem['fld_length' ] = 20; + $feitem['max_length' ] = 0; + $feitem['titlecols' ] = 1; + $feitem['datacols' ] = 3; + $feitem['description'] = ''; + $feitem['fld_rows' ] = 0; + $key = $column ? 'title' : 'field_id'; + $arr[$feitem[$key]] = $feitem; + } + ksort($arr); + if ($reverse) { + $arr = array_reverse($arr); + } + return $arr; +} + +function genFieldIdString($row) +{ + return 'CID|' . json_encode($row); +} + +// Column sorting parameters. +// +$orderby = ''; +$ordermode = null; +$fe_column = 0; +$fe_reverse = false; +if (isset($_GET['iSortCol_0'])) { + for ($i = 0; $i < intval($_GET['iSortingCols']); ++$i) { + $iSortCol = intval($_GET["iSortCol_$i"]); + if ($_GET["bSortable_$iSortCol"] == "true") { + $sSortDir = escape_sort_order($_GET["sSortDir_$i"]); // ASC or DESC + // We are to sort on column # $iSortCol in direction $sSortDir. + $orderby .= $orderby ? ', ' : 'ORDER BY '; + + // Note the primary sort column and direction for later logic. + if ($i == 0) { + $fe_column = $iSortCol; + $fe_reverse = $sSortDir == 'DESC'; + } + + if ($what == 'codes') { + if ($iSortCol == 0) { + // $orderby .= $prod ? "d.drug_id $sSortDir, t.selector $sSortDir" : "c.code $sSortDir"; + $ordermode = array('code', 'description'); + } else { + // $orderby .= $prod ? "d.name $sSortDir" : "c.code_text $sSortDir"; + $ordermode = array('description', 'code'); + } + } else if ($what == 'fields') { + if ($source == 'V') { + // No action needed here. + } else { + // Remaining sources (D, H, E) come from a layout. + if ($iSortCol == 0) { + $orderby .= "lo.field_id $sSortDir"; + } else { + $orderby .= "lo.title $sSortDir"; + } + } + } else if ($what == 'lists') { + if ($iSortCol == 0) { + $orderby .= "li.list_id $sSortDir"; + } else { + $orderby .= "li.option_id $sSortDir"; + } + } else if ($what == 'groups') { + if ($iSortCol == 0) { + $orderby .= "code $sSortDir"; + } else { + $orderby .= "description $sSortDir"; + } + } + } + } +} + +if ($what == 'codes') { + // Nothing to do here. +} else if ($what == 'fields') { + if ($source == 'V') { + // No setup needed. + } else if ($source == 'E') { + $sellist = "lo.field_id, " . + "MIN(lo.group_id ) AS group_id, " . + "MIN(lo.title ) AS title, " . + "MIN(lo.data_type ) AS data_type, " . + "MIN(lo.uor ) AS uor, " . + "MIN(lo.fld_length ) AS fld_length, " . + "MIN(lo.max_length ) AS max_length, " . + "MIN(lo.list_id ) AS list_id, " . + "MIN(lo.titlecols ) AS titlecols, " . + "MIN(lo.datacols ) AS datacols, " . + "MIN(lo.edit_options) AS edit_options, " . + "MIN(lo.description ) AS description, " . + "MIN(lo.fld_rows ) AS fld_rows"; + $orderby = "GROUP BY lo.field_id $orderby"; + $from = "layout_options AS lo"; + $where1 = "WHERE lo.form_id LIKE '" . add_escape_custom($layout_id) . "' AND lo.uor > 0 AND lo.source = 'E'"; + if ($searchTerm !== "") { + $sSearch = add_escape_custom($searchTerm); + $where2 = "AND (lo.field_id LIKE '%$sSearch%' OR lo.title LIKE '%$sSearch%')"; + } + } else if ($source == 'D' || $source == 'H') { + $sellist = "lo.*"; + $from = "layout_options AS lo"; + $where1 = "WHERE lo.form_id LIKE " . add_escape_custom($layout_id) . " AND lo.uor > 0"; + if ($searchTerm !== "") { + $sSearch = add_escape_custom($searchTerm); + $where2 = "AND (lo.field_id LIKE '%$sSearch%' OR lo.title LIKE '%$sSearch%')"; + } + } +} else if ($what == 'lists') { + $sellist = "li.option_id AS code, li.title AS description"; + $from = "list_options AS li"; + $where1 = "WHERE li.list_id LIKE 'lists' AND li.activity = 1"; + if ($searchTerm !== "") { + $sSearch = add_escape_custom($searchTerm); + $where2 = "AND (li.list_id LIKE '%$sSearch%' OR li.title LIKE '%$sSearch%')"; + } +} else if ($what == 'groups') { + $sellist .= "DISTINCT lo.group_id AS code, lp.grp_title AS description"; + $from = "layout_options AS lo, layout_group_properties AS lp"; + $where1 = "WHERE lo.form_id LIKE '" . add_escape_custom($layout_id) . "' AND lp.grp_form_id = lo.form_id AND lp.grp_group_id = lo.group_id"; + if ($searchTerm !== "") { + $sSearch = add_escape_custom($searchTerm); + $where2 = "AND lp.grp_title LIKE '%$sSearch%'"; + } +} else { + error_log('Invalid request to find_code_dynamic_ajax.php'); + exit(); +} + +if ($what == 'fields' && $source == 'V') { + $fe_array = feSearchSort($searchTerm, $fe_column, $fe_reverse); + $iTotal = count($form_encounter_layout); + $iFilteredTotal = count($fe_array); +} else if ($what == 'codes') { + $iTotal = main_code_set_search($codetype, '', null, null, !$include_inactive, null, true); + $iFilteredTotal = main_code_set_search($codetype, $searchTerm, null, null, !$include_inactive, null, true); +} else { + // Get total number of rows with no filtering. + $iTotal = sqlNumRows(sqlStatement("SELECT $sellist FROM $from $where1 $orderby")); + // Get total number of rows after filtering. + $iFilteredTotal = sqlNumRows(sqlStatement("SELECT $sellist FROM $from $where1 $where2 $orderby")); +} + +// Build the output data array. +// +$out = array( + "sEcho" => intval($_GET['sEcho']), + "iTotalRecords" => $iTotal, + "iTotalDisplayRecords" => $iFilteredTotal, + "aaData" => array() +); + +if ($what == 'fields' && $source == 'V') { + foreach ($fe_array as $feitem) { + $arow = array('DT_RowId' => genFieldIdString($feitem)); + $arow[] = $feitem['field_id']; + $arow[] = $feitem['title']; + $out['aaData'][] = $arow; + } +} else if ($what == 'codes') { + $res = main_code_set_search($codetype, $searchTerm, null, null, !$include_inactive, $ordermode); + while ($row = sqlFetchArray($res)) { + $arow = array('DT_RowId' => genFieldIdString(array( + 'code' => $row['code'], + 'description' => $row['code_text'], + 'codetype' => $codetype, + ))); + $arow[] = str_replace('|', ':', rtrim($row['code'], '|')); + $arow[] = $row['code_text']; + $out['aaData'][] = $arow; + } +} else { + $query = "SELECT $sellist FROM $from $where1 $where2 $orderby $limit"; + $res = sqlStatement($query); + while ($row = sqlFetchArray($res)) { + $arow = array('DT_RowId' => genFieldIdString($row)); + if ($what == 'fields') { + $arow[] = $row['field_id']; + $arow[] = $row['title']; + } else { + $arow[] = str_replace('|', ':', rtrim($row['code'], '|')); + $arow[] = $row['description']; + } + $out['aaData'][] = $arow; + } +} + +// error_log($query); // debugging + +// Dump the output array as JSON. +// +echo json_encode($out); diff --git a/interface/patient_file/encounter/forms.php b/interface/patient_file/encounter/forms.php index d279ecc50..0ed4e1486 100644 --- a/interface/patient_file/encounter/forms.php +++ b/interface/patient_file/encounter/forms.php @@ -134,10 +134,6 @@ jQuery(document).ready( function($) { } ); - $(".onerow").mouseover(function() { $(this).toggleClass("highlight"); }); - $(".onerow").mouseout(function() { $(this).toggleClass("highlight"); }); - $(".onerow").click(function() { GotoForm(this); }); - $("#prov_edu_res").click(function() { if ( $('#prov_edu_res').prop('checked') ) { var mode = "add"; @@ -297,28 +293,19 @@ if (!isset($_GET['attachid'])) { + + + diff --git a/interface/patient_file/history/history_full.php b/interface/patient_file/history/history_full.php index d1e3c7143..c26842e12 100644 --- a/interface/patient_file/history/history_full.php +++ b/interface/patient_file/history/history_full.php @@ -206,6 +206,10 @@ $(document).ready(function(){ }); + + if (window.checkSkipConditions) { + checkSkipConditions(); + } }); @@ -233,13 +237,8 @@ div.tab { newHistoryData($pid); $result = getHistoryData($pid); } + $condition_str = ''; - $fres = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = 'HIS' AND uor > 0 " . - "ORDER BY group_name, seq"); - ?> - - LBF forms accordinf the form_id*/ $constraints = LBF_Validation::generate_validate_constraints("HIS"); ?> @@ -280,7 +279,14 @@ div.tab { + diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index 4f429fa0d..1ec3f6ff5 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -339,14 +339,15 @@ $(document).ready(function(){ $("#labdata_ps_expand").load("labdata_fragment.php"); 0 AND activity = 1 ORDER BY seq, title"); -while ($gfrow = sqlFetchArray($gfres)) { ?> - $("#_ps_expand").load("lbf_fragment.php?formname="); 0 AND grp_activity = 1 " . + "ORDER BY grp_seq, grp_title"); +while ($gfrow = sqlFetchArray($gfres)) { +?> + $("#_ps_expand").load("lbf_fragment.php?formname="); + - // fancy box enable_modals(); @@ -490,10 +491,34 @@ $(window).load(function() { @@ -1285,13 +1310,13 @@ if ($existVitals) { // This generates a section similar to Vitals for each LBF form that // supports charting. The form ID is used as the "widget label". // -$gfres = sqlStatement("SELECT option_id, title, notes FROM list_options WHERE " . - "list_id = 'lbfnames' AND " . - "option_value > 0 AND activity = 1 " . - "ORDER BY seq, title"); +$gfres = sqlStatement("SELECT grp_form_id AS option_id, grp_title AS title, grp_aco_spec " . + "FROM layout_group_properties WHERE " . + "grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_repeats > 0 AND grp_activity = 1 " . + "ORDER BY grp_seq, grp_title"); while ($gfrow = sqlFetchArray($gfres)) { - $jobj = json_decode($gfrow['notes'], true); - $LBF_ACO = empty($jobj['aco']) ? false : explode('|', $jobj['aco']); + // $jobj = json_decode($gfrow['notes'], true); + $LBF_ACO = empty($gfrow['grp_aco_spec']) ? false : explode('|', $gfrow['grp_aco_spec']); if ($LBF_ACO && !acl_check($LBF_ACO[0], $LBF_ACO[1])) { continue; } ?> diff --git a/interface/patient_file/summary/demographics_full.php b/interface/patient_file/summary/demographics_full.php index b24bb2c33..eca341811 100644 --- a/interface/patient_file/summary/demographics_full.php +++ b/interface/patient_file/summary/demographics_full.php @@ -58,7 +58,7 @@ if ($GLOBALS['insurance_information'] != '0') { $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'DEM' AND uor > 0 " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); ?> @@ -136,6 +136,10 @@ $(document).ready(function(){ return msg; // Gecko, WebKit, Chrome <34 } }); + + if (window.checkSkipConditions) { + checkSkipConditions(); + } }); var mypcc = ''; @@ -488,6 +492,7 @@ $display_style = 'block'; $group_seq=0; // this gives the DIV blocks unique IDs +$condition_str = ''; ?>
    @@ -802,6 +807,12 @@ foreach ($policy_types as $key => $value) {
    - - + diff --git a/interface/patient_file/summary/demographics_save.php b/interface/patient_file/summary/demographics_save.php index 1162ee2fd..447728441 100644 --- a/interface/patient_file/summary/demographics_save.php +++ b/interface/patient_file/summary/demographics_save.php @@ -32,7 +32,7 @@ $newdata = array(); $newdata['patient_data']['id'] = $_POST['db_id']; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; $field_id = $frow['field_id']; diff --git a/interface/patient_file/summary/stats_full.php b/interface/patient_file/summary/stats_full.php index 9f04dc708..e41cc1206 100644 --- a/interface/patient_file/summary/stats_full.php +++ b/interface/patient_file/summary/stats_full.php @@ -64,7 +64,7 @@ function refreshIssue(issue, title) { function dopclick(id,category) { top.restoreSession(); if (category == 0) category = ''; - dlgopen('add_edit_issue.php?issue=' + encodeURIComponent(id) + '&thistype=' + encodeURIComponent(category), '_blank', 550, 400); + dlgopen('add_edit_issue.php?issue=' + encodeURIComponent(id) + '&thistype=' + encodeURIComponent(category), '_blank', 950, 700); } // Process click on number of encounters. diff --git a/interface/patient_file/transaction/add_transaction.php b/interface/patient_file/transaction/add_transaction.php index 8672f6405..2e3d10c3f 100644 --- a/interface/patient_file/transaction/add_transaction.php +++ b/interface/patient_file/transaction/add_transaction.php @@ -22,9 +22,6 @@ * @link http://www.open-emr.org */ - - - require_once("../../globals.php"); require_once("$srcdir/transactions.inc"); require_once("$srcdir/options.inc.php"); @@ -45,6 +42,10 @@ $mode = empty($_POST['mode' ]) ? '' : $_POST['mode' ]; // $inmode = $_GET['inmode']; $body_onload_code = ""; +// Load array of properties for this layout and its groups. +$grparr = array(); +getLayoutProperties($form_id, $grparr); + if ($mode) { $sets = "title = ?, user = ?, groupname = ?, authorized = ?, date = NOW()"; $sqlBindArray = array($form_id, $_SESSION['authUser'], $_SESSION['authProvider'], $userauthorized); @@ -60,7 +61,7 @@ if ($mode) { $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq", array($form_id)); + "ORDER BY group_id, seq", array($form_id)); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; @@ -355,7 +356,21 @@ div.tab {
    - +\n"; +while ($ttrow = sqlFetchArray($ttres)) { + $thisid = $ttrow['grp_form_id']; + echo "\n"; +} +echo "\n"; +?>
    @@ -397,15 +412,15 @@ div.tab { 0 " . - "ORDER BY group_name, seq", array($form_id)); + "ORDER BY group_id, seq", array($form_id)); $last_group = ''; while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; - // Handle a data category (group) change. + $this_group = $frow['group_id']; + // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { $group_seq = substr($this_group, 0, 1); - $group_name = substr($this_group, 1); + $group_name = $grparr[$this_group]['grp_title']; $last_group = $this_group; if ($group_seq == 1) { echo "
  • "; @@ -422,144 +437,123 @@ while ($frow = sqlFetchArray($fres)) { ?>
    + 0 " . + "ORDER BY group_id, seq", array($form_id)); + +$last_group = ''; +$cell_count = 0; +$item_count = 0; +$display_style = 'block'; +$condition_str = ''; - 0 " . - "ORDER BY group_name, seq", array($form_id)); - - $last_group = ''; - $cell_count = 0; - $item_count = 0; - $display_style = 'block'; - $condition_str = ''; - - while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; - $titlecols = $frow['titlecols']; - $datacols = $frow['datacols']; - $data_type = $frow['data_type']; - $field_id = $frow['field_id']; - $list_id = $frow['list_id']; - - // Accumulate skip conditions into a JSON expression for the browser side. - // Cloned from interface/forms/LBF/new.php. - $conditions = empty($frow['conditions']) ? array() : unserialize($frow['conditions']); - foreach ($conditions as $condition) { - if (empty($condition['id'])) { - continue; - } - - $andor = empty($condition['andor']) ? '' : $condition['andor']; - if ($condition_str) { - $condition_str .= ",\n"; - } - - $condition_str .= "{" . - "target:'" . addslashes($field_id) . "', " . - "id:'" . addslashes($condition['id']) . "', " . - "itemid:'" . addslashes($condition['itemid']) . "', " . - "operator:'" . addslashes($condition['operator']) . "', " . - "value:'" . addslashes($condition['value']) . "', " . - "andor:'" . addslashes($andor) . "'}"; - } - - $currvalue = ''; - if (isset($trow[$field_id])) { - $currvalue = $trow[$field_id]; - } - - // Handle special-case default values. - if (!$currvalue && !$transid && $form_id == 'LBTref') { - if ($field_id == 'refer_date') { - $currvalue = date('Y-m-d'); - } else if ($field_id == 'body' && $transid > 0) { - $tmp = sqlQuery("SELECT reason FROM form_encounter WHERE " . - "pid = ? ORDER BY date DESC LIMIT 1", array($pid)); - if (!empty($tmp)) { - $currvalue = $tmp['reason']; - } - } - } - - // Handle a data category (group) change. - if (strcmp($this_group, $last_group) != 0) { - end_group(); - $group_seq = substr($this_group, 0, 1); - $group_name = substr($this_group, 1); - $last_group = $this_group; - $group_seq_esc = attr($group_seq); - if ($group_seq == 1) { - echo "
    "; - } else { - echo "
    "; - } - - echo " \n"; - $display_style = 'none'; - } - - // Handle starting of a new row. - if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { - end_row(); - echo " "; - } - - if ($item_count == 0 && $titlecols == 0) { - $titlecols = 1; - } - - // Handle starting of a new label cell. - if ($titlecols > 0) { - end_cell(); - $titlecols_esc = attr($titlecols); - echo ""; } - echo "
    "; - $cell_count += $titlecols; - } - - ++$item_count; - - echo ""; - - // Modified 6-09 by BM - Translate if applicable - if ($frow['title']) { - echo (text(xl_layout_label($frow['title'])) . ":"); - } else { - echo " "; - } - - echo ""; - - // Handle starting of a new data cell. - if ($datacols > 0) { - end_cell(); - $datacols_esc = attr($datacols); - echo " 0) { - echo " style='padding-left:5pt'"; - } - - echo ">"; - $cell_count += $datacols; - } - - ++$item_count; - generate_form_field($frow, $currvalue); - echo ""; - } - - end_group(); +while ($frow = sqlFetchArray($fres)) { + $this_group = $frow['group_id']; + $titlecols = $frow['titlecols']; + $datacols = $frow['datacols']; + $data_type = $frow['data_type']; + $field_id = $frow['field_id']; + $list_id = $frow['list_id']; + + // Accumulate action conditions into a JSON expression for the browser side. + accumActionConditions($field_id, $condition_str, $frow['conditions']); + + $currvalue = ''; + if (isset($trow[$field_id])) { + $currvalue = $trow[$field_id]; + } + + // Handle special-case default values. + if (!$currvalue && !$transid && $form_id == 'LBTref') { + if ($field_id == 'refer_date') { + $currvalue = date('Y-m-d'); + } else if ($field_id == 'body' && $transid > 0) { + $tmp = sqlQuery("SELECT reason FROM form_encounter WHERE " . + "pid = ? ORDER BY date DESC LIMIT 1", array($pid)); + if (!empty($tmp)) { + $currvalue = $tmp['reason']; + } + } + } + + // Handle a data category (group) change. + if (strcmp($this_group, $last_group) != 0) { + end_group(); + $group_seq = substr($this_group, 0, 1); + $group_name = $grparr[$this_group]['grp_title']; + $last_group = $this_group; + $group_seq_esc = attr($group_seq); + if ($group_seq == 1) { + echo "
    "; + } else { + echo "
    "; + } + + echo " \n"; + $display_style = 'none'; + } + + // Handle starting of a new row. + if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { + end_row(); + echo " "; + } + + if ($item_count == 0 && $titlecols == 0) { + $titlecols = 1; + } + + // Handle starting of a new label cell. + if ($titlecols > 0) { + end_cell(); + $titlecols_esc = attr($titlecols); + echo "
    "; + $cell_count += $titlecols; + } + + ++$item_count; + + echo ""; + + // Modified 6-09 by BM - Translate if applicable + if ($frow['title']) { + echo (text(xl_layout_label($frow['title'])) . ":"); + } else { + echo " "; + } + + echo ""; + + // Handle starting of a new data cell. + if ($datacols > 0) { + end_cell(); + $datacols_esc = attr($datacols); + echo " 0) { + echo " style='padding-left:5pt'"; + } + + echo ">"; + $cell_count += $datacols; + } + + ++$item_count; + generate_form_field($frow, $currvalue); + echo ""; +} +end_group(); ?> @@ -573,7 +567,7 @@ while ($frow = sqlFetchArray($fres)) { + <?php xl('Layout Editor', 'e'); ?> - - - - -
    - -

    - -

    - -\n"; -if ($source == 'V') { - foreach ($form_encounter_layout as $lrow) { - gen_sel_row($lrow); - } -} else { - if ($source == 'D' || $source == 'H') { - $res = sqlStatement( - "SELECT * FROM layout_options " . - "WHERE form_id = ? AND uor > 0 ORDER BY field_id", - array($source == 'D' ? 'DEM' : 'HIS') - ); - } else { - $res = sqlStatement( - "SELECT * FROM layout_options WHERE " . - "form_id LIKE ? AND uor > 0 AND source = ? ORDER BY field_id, form_id", - array('LBF%', 'E') - ); - } - - $last_field_id = ''; - while ($row = sqlFetchArray($res)) { - if ($row['field_id'] === $last_field_id) { - continue; - } - - $last_field_id = $row['field_id']; - gen_sel_row($row); - } -} - -echo "
    \n"; -?> - - -

    -

    -
    -  -' onclick='newField()' /> -
    -
    -

    - - -
    - - diff --git a/interface/super/layout_service_codes.php b/interface/super/layout_service_codes.php new file mode 100644 index 000000000..22cc5383e --- /dev/null +++ b/interface/super/layout_service_codes.php @@ -0,0 +1,230 @@ + + * @copyright Copyright (c) 2016 Rod Roark + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +require_once('../globals.php'); +require_once($GLOBALS['srcdir'] . '/acl.inc'); +require_once($GLOBALS['fileroot'] . '/custom/code_types.inc.php'); + +if (!acl_check('admin', 'super')) { + die(xlt('Not authorized')); +} + +$form_dryrun = !empty($_POST['form_dryrun']); + +function applyCode($layoutid, $codetype, $code, $description) +{ + global $thecodes; + if (!isset($thecodes[$layoutid])) { + $thecodes[$layoutid] = array(); + } + $thecodes[$layoutid]["$codetype:$code"] = $description; +} + +?> + + + +<?php echo xlt('Install Layout Service Codes'); ?> + + + + + + + + + $ct_arr) { + if (!$ct_arr['active'] || $ct_arr['nofs']) { + continue; + } + $tmp = "$codetype:$code"; + $relres = sqlStatement( + "SELECT code, code_text FROM codes WHERE code_type = ? AND " . + "(related_code LIKE ? OR related_code LIKE ? OR related_code LIKE ? OR related_code LIKE ?) " . + "AND active = 1 ORDER BY code", + array($ct_arr['id'], $tmp, "$tmp;%", "%;$tmp", "%;$tmp;%") + ); + while ($relrow = sqlFetchArray($relres)) { + applyCode($layoutid, $ct_key, $relrow['code'], $relrow['code_text']); + ++$codecount; + } + } + if ($codecount == 0) { + echo "

    " . xlt('No matches for') . " '" . text($tmp) . "'.

    \n"; + } + } // end while + fclose($eres); + + // Now zap the found service codes into the parameters for each layout. + foreach ($thecodes as $layoutid => $arr) { + $services = ''; + foreach ($arr as $key => $description) { + if ($services) { + $services .= ';'; + } + $services .= $key; + } + if (!$form_dryrun) { + sqlStatement( + "UPDATE layout_group_properties SET grp_services = ? WHERE " . + "grp_form_id = ? AND grp_group_id = ''", + array($services, $layoutid) + ); + } + } + } // end upload logic +} + +?> +
    + +
    + +

    + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + ' /> +
    +

    + +

    + +

    + +

    + + + + + + + +\n"; + + echo " \n"; + + echo " \n"; + + echo " \n"; + + echo " \n"; + echo " \n"; + } +} +?> +
    "; + if ($row['grp_mapping'] != $lastcat) { + $lastcat = $row['grp_mapping']; + echo text($lastcat); + } + echo " "; + if ($row['grp_form_id'] != $lastlayout) { + $lastlayout = $row['grp_form_id']; + echo text($row['grp_title']); + } + echo " "; + echo text($codestring); + echo "\n"; + list ($codetype, $code) = explode(':', $codestring); + $crow = sqlQuery( + "SELECT code_text FROM codes WHERE " . + "code_type = ? AND code = ? AND active = 1 " . + "ORDER BY id LIMIT 1", + array($code_types[$codetype]['id'], $code) + ); + echo text($crow['code_text']); + echo " 
    +

    + +
    + +
    + + diff --git a/interface/super/manage_site_files.php b/interface/super/manage_site_files.php index d242354b4..2543d7a4d 100644 --- a/interface/super/manage_site_files.php +++ b/interface/super/manage_site_files.php @@ -27,11 +27,10 @@ $my_files = array( 'letter_templates/custom_pdf.php', ); // Append LBF plugin filenames to the array. -$lres = sqlStatement('SELECT * FROM list_options ' . - "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title"); +$lres = sqlStatement('SELECT grp_form_id FROM layout_group_properties ' . + "WHERE grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_activity = 1 ORDER BY grp_seq, grp_title"); while ($lrow = sqlFetchArray($lres)) { - $option_id = $lrow['option_id']; // should start with LBF - $title = $lrow['title']; + $option_id = $lrow['grp_form_id']; // should start with LBF $my_files[] = "LBF/$option_id.plugin.php"; } diff --git a/interface/super/rules/library/RuleCriteriaLifestyle.php b/interface/super/rules/library/RuleCriteriaLifestyle.php index 714e547b5..8ac67e542 100644 --- a/interface/super/rules/library/RuleCriteriaLifestyle.php +++ b/interface/super/rules/library/RuleCriteriaLifestyle.php @@ -47,10 +47,10 @@ class RuleCriteriaLifestyle extends RuleCriteria function getOptions() { - $stmt = sqlStatement( - "SELECT field_id, title FROM layout_options " - ."WHERE form_id = 'HIS' AND group_name LIKE '%Lifestyle%'" + "SELECT lo.field_id, lo.title FROM layout_options AS lo, layout_group_properties AS lp " + . "WHERE lo.form_id = 'HIS' AND lp.grp_form_id = lo.form_id AND lp.grp_group_id = lo.group_id " + . "AND lp.grp_title LIKE '%Lifestyle%'" ); $options = array(); diff --git a/interface/super/show_groups_popup.php b/interface/super/show_groups_popup.php deleted file mode 100644 index dccf04e44..000000000 --- a/interface/super/show_groups_popup.php +++ /dev/null @@ -1,90 +0,0 @@ - - - - - -<?php xl('List groups', 'e'); ?> - - - - - - - - - -
    -

    -
      - 1) { - $xlgname = ">>  " . xl($gname) . ""; - } - - echo "
    • $gname $xlgname
    • "; -} -?> -
    -
    - - - - - diff --git a/interface/super/show_lists_popup.php b/interface/super/show_lists_popup.php deleted file mode 100644 index aa327569f..000000000 --- a/interface/super/show_lists_popup.php +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -<?php xl('List lists', 'e'); ?> - - - - - - - - - -
    -

    -
      -" . xl($row['title']) . ""; -} -?> -
    -
    - - - - - diff --git a/interface/themes/style_ash_blue.css b/interface/themes/style_ash_blue.css index e297a2a4d..21e5a5c11 100644 --- a/interface/themes/style_ash_blue.css +++ b/interface/themes/style_ash_blue.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_burgundy.css b/interface/themes/style_burgundy.css index c908b6961..c36c2d74d 100644 --- a/interface/themes/style_burgundy.css +++ b/interface/themes/style_burgundy.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_cadmium_yellow.css b/interface/themes/style_cadmium_yellow.css index 7a6a0eee9..41cce7c70 100644 --- a/interface/themes/style_cadmium_yellow.css +++ b/interface/themes/style_cadmium_yellow.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_chocolate.css b/interface/themes/style_chocolate.css index b226daec5..98d8275e7 100644 --- a/interface/themes/style_chocolate.css +++ b/interface/themes/style_chocolate.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_cobalt_blue.css b/interface/themes/style_cobalt_blue.css index e97ef09e7..2045f2584 100644 --- a/interface/themes/style_cobalt_blue.css +++ b/interface/themes/style_cobalt_blue.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_coral.css b/interface/themes/style_coral.css index ab71a7ae6..6b33f4c26 100644 --- a/interface/themes/style_coral.css +++ b/interface/themes/style_coral.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_deep_purple.css b/interface/themes/style_deep_purple.css index db77a50b0..c849ce3bc 100644 --- a/interface/themes/style_deep_purple.css +++ b/interface/themes/style_deep_purple.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_dune.css b/interface/themes/style_dune.css index 39a078b3e..91c24d39f 100644 --- a/interface/themes/style_dune.css +++ b/interface/themes/style_dune.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_emerald.css b/interface/themes/style_emerald.css index 02af603bf..8c57d5290 100644 --- a/interface/themes/style_emerald.css +++ b/interface/themes/style_emerald.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_forest_green.css b/interface/themes/style_forest_green.css index 1cd1bb259..37aaefac4 100644 --- a/interface/themes/style_forest_green.css +++ b/interface/themes/style_forest_green.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_light.css b/interface/themes/style_light.css index 9c6ca9c5a..2f7d23e2b 100644 --- a/interface/themes/style_light.css +++ b/interface/themes/style_light.css @@ -112,9 +112,9 @@ a:hover { top:0; background-color:#FFFFFF !important; z-index:100; - } +} - .menuBar .container{ +.menuBar ~ .container{ margin-top:95px; } @@ -1124,7 +1124,9 @@ div.notab-right { background-color: #d7d7d7; } #navigation-slide li a.collapsed_lv2:before, -#navigation-slide * li a.collapsed_lv2:before { +#navigation-slide * li a.collapsed_lv2:before, +#navigation-slide li a.collapsed_lv3:before, +#navigation-slide * li a.collapsed_lv3:before { content: " "; width: 0; height: 0; @@ -1142,7 +1144,9 @@ div.notab-right { background: #cbe6f7; } #navigation-slide li a.expanded_lv2:before, -#navigation-slide * li a.expanded_lv2:before { +#navigation-slide * li a.expanded_lv2:before, +#navigation-slide li a.expanded_lv3:before, +#navigation-slide * li a.expanded_lv3:before { content: " "; width: 0; height: 0; diff --git a/interface/themes/style_manila.css b/interface/themes/style_manila.css index 215937a45..7b28fa60d 100644 --- a/interface/themes/style_manila.css +++ b/interface/themes/style_manila.css @@ -1080,6 +1080,10 @@ font-size:9pt; background: none repeat scroll 0% 0% #FEF3CF; } +#navigation-slide ul li a.collapsed_lv3{ + background: none repeat scroll 0% 0% #eeeeee; +} + #navigation-slide ul li a.expanded_lv2{ background: #999; /* for non-css3 browsers */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefdcf', endColorstr='#fefdcf'); /* for IE */ @@ -1087,6 +1091,15 @@ font-size:9pt; background: -moz-linear-gradient(center top , #fefdcf,#fefdcf) repeat scroll 0% 0% transparent; background: none repeat scroll 0% 0% #fefdcf; } + +#navigation-slide ul li a.expanded_lv3{ + background: #999; /* for non-css3 browsers */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#eeeeee'); /* for IE */ + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#eeeeee)); /* for webkit browsers */ + background: -moz-linear-gradient(center top , #eeeeee,#eeeeee) repeat scroll 0% 0% transparent; + background: none repeat scroll 0% 0% #eeeeee; +} + body dl { background-color: #C9DBF2; border-bottom: 0.1pt solid black; diff --git a/interface/themes/style_mauve.css b/interface/themes/style_mauve.css index 75581897f..ed545c6e3 100644 --- a/interface/themes/style_mauve.css +++ b/interface/themes/style_mauve.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_mustard_green.css b/interface/themes/style_mustard_green.css index b3c24e765..3d00697ed 100644 --- a/interface/themes/style_mustard_green.css +++ b/interface/themes/style_mustard_green.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_olive.css b/interface/themes/style_olive.css index 9f6ab8a94..9f7bf88a4 100644 --- a/interface/themes/style_olive.css +++ b/interface/themes/style_olive.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_pdf.css b/interface/themes/style_pdf.css index c0296e9c8..faf6d7fc5 100644 --- a/interface/themes/style_pdf.css +++ b/interface/themes/style_pdf.css @@ -885,6 +885,20 @@ font-size:9pt; background: -moz-linear-gradient(top, #fefdcf, #ffac84); /* for firefox 3.6+ */ } +#navigation-slide ul li a.collapsed_lv3{ + background: #999; /* for non-css3 browsers */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', endColorstr='#eeeeee'); /* for IE */ + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), to(#eeeeee)); /* for webkit browsers */ + background: -moz-linear-gradient(top, #aaaaaa, #eeeeee); /* for firefox 3.6+ */ +} + +#navigation-slide ul li a.expanded_lv3{ + background: #999; /* for non-css3 browsers */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#aaaaaa'); /* for IE */ + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#aaaaaa)); /* for webkit browsers */ + background: -moz-linear-gradient(top, #eeeeee, #aaaaaa); /* for firefox 3.6+ */ +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_pink.css b/interface/themes/style_pink.css index cd9bf5969..695f72051 100644 --- a/interface/themes/style_pink.css +++ b/interface/themes/style_pink.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_powder_blue.css b/interface/themes/style_powder_blue.css index 2fd52e2bd..49bf03f59 100644 --- a/interface/themes/style_powder_blue.css +++ b/interface/themes/style_powder_blue.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_red.css b/interface/themes/style_red.css index 25b01276a..fe65a5ec9 100644 --- a/interface/themes/style_red.css +++ b/interface/themes/style_red.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_sienna.css b/interface/themes/style_sienna.css index a4b8606ac..3f26f1e5e 100644 --- a/interface/themes/style_sienna.css +++ b/interface/themes/style_sienna.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/themes/style_tangerine.css b/interface/themes/style_tangerine.css index 0b4272f86..5254d577e 100644 --- a/interface/themes/style_tangerine.css +++ b/interface/themes/style_tangerine.css @@ -1125,6 +1125,23 @@ div.notab-right { background: -moz-linear-gradient(top, #e7e6f9, #e7e6f9); /* for firefox 3.6+ 7870de*/ } +#navigation-slide ul li a.collapsed_lv3 { + background: #aaaaaa; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', + endColorstr='#aaaaaa'); + background: -webkit-gradient(linear, left top, left bottom, from(#aaaaaa), + to(#aaaaaa)); + background: -moz-linear-gradient(top, #aaaaaa, #aaaaaa); +} +#navigation-slide ul li a.expanded_lv3 { + background: #eeeeee; + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', + endColorstr='#eeeeee'); + background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), + to(#eeeeee)); + background: -moz-linear-gradient(top, #eeeeee, #eeeeee); +} + #sddm li { margin: 0; padding: 0; diff --git a/interface/usergroup/facility_user.php b/interface/usergroup/facility_user.php index 6e275ad8f..25210bee7 100644 --- a/interface/usergroup/facility_user.php +++ b/interface/usergroup/facility_user.php @@ -24,10 +24,6 @@ // // +------------------------------------------------------------------------------+ - - - - require_once("../globals.php"); require_once("$srcdir/options.inc.php"); require_once("$srcdir/acl.inc"); @@ -43,7 +39,7 @@ if (isset($_POST["mode"]) && $_POST["mode"] == "facility_user_id" && isset($_POS // Inserting/Updating new facility specific user information $fres = sqlStatement("SELECT * FROM `layout_options` " . "WHERE `form_id` = 'FACUSR' AND `uor` > 0 AND `field_id` != '' " . - "ORDER BY `group_name`, `seq`"); + "ORDER BY `group_id`, `seq`"); while ($frow = sqlFetchArray($fres)) { $value = get_layout_form_value($frow); $entry_id = sqlQuery("SELECT `id` FROM `facility_user_ids` WHERE `uid` = ? AND `facility_id` = ? AND `field_id` =?", array($_POST["user_id"],$_POST["fac_id"],$frow['field_id'])); @@ -109,7 +105,7 @@ for ($i=0; $row=sqlFetchArray($f_res); $i++) { // Collect layout information and store them in an array $l_res = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'FACUSR' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); $l_arr = array(); for ($i=0; $row=sqlFetchArray($l_res); $i++) { $l_arr[$i]=$row; diff --git a/interface/usergroup/facility_user_admin.php b/interface/usergroup/facility_user_admin.php index 89cc5c8d6..ba75516b0 100644 --- a/interface/usergroup/facility_user_admin.php +++ b/interface/usergroup/facility_user_admin.php @@ -126,7 +126,7 @@ $fac_info = sqlQuery("select * from `facility` where `id` = ?", array($_GET["fac // Collect layout information and store them in an array $l_res = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'FACUSR' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); $l_arr = array(); for ($i=0; $row=sqlFetchArray($l_res); $i++) { $l_arr[$i]=$row; diff --git a/library/ajax/code_attributes_ajax.php b/library/ajax/code_attributes_ajax.php new file mode 100644 index 000000000..fff63c3b5 --- /dev/null +++ b/library/ajax/code_attributes_ajax.php @@ -0,0 +1,118 @@ + + * @copyright Copyright (c) 2015-2017 Rod Roark + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +require_once("../../interface/globals.php"); +require_once("$fileroot/custom/code_types.inc.php"); +require_once("$fileroot/interface/drugs/drugs.inc.php"); + +function write_code_info($codetype, $code, $selector, $pricelevel) +{ + global $code_types; + + $wh = ''; // options for warehouse selection + + if ($codetype == 'PROD') { + $wrow = sqlQuery( + "SELECT default_warehouse FROM users WHERE username = ?", + array($_SESSION['authUser']) + ); + $defaultwh = empty($wrow['default_warehouse']) ? '' : $wrow['default_warehouse']; + // + $crow = sqlQuery( + "SELECT d.name, p.pr_price " . + "FROM drugs AS d " . + "LEFT JOIN prices AS p ON p.pr_id = d.drug_id AND p.pr_selector = ? AND p.pr_level = ? " . + "WHERE d.drug_id = ?", + array($selector, $pricelevel, $code) + ); + $desc = $crow['name']; + $price = empty($crow['pr_price']) ? 0 : (0 + $crow['pr_price']); + // + $lres = sqlStatement("SELECT * FROM list_options " . + "WHERE list_id = 'warehouse' AND activity = 1 ORDER BY seq, title"); + $wh .= ""; + while ($lrow = sqlFetchArray($lres)) { + $wh .= ""; + } + } else { + // not PROD + $cres = return_code_information($codetype, $code, false); + $desc = ''; + $price = 0; + if ($crow = sqlFetchArray($cres)) { + $desc = $crow['code_text']; + if ($code_types[$codetype]['fee']) { + if ($code_types[$codetype]['external'] == 0) { + $prow = sqlQuery( + "SELECT pr_price " . + "FROM prices WHERE pr_id = ? AND pr_selector = '' AND pr_level = ? " . + "LIMIT 1", + array($crow['id'], $pricelevel) + ); + if (!empty($prow['pr_price'])) { + $price = 0 + $prow['pr_price']; + } + } else { + // external code set with fees, prices table not supported + $price = 0 + $crow['fee']; + } + } + } + } + + // error_log("Warehouse string is: " . $wh); // debugging + + echo "code_attributes_handler(" . + "'" . addslashes($codetype) . "'," . + "'" . addslashes($code) . "'," . + "'" . addslashes($desc) . "'," . + "'" . addslashes($price) . "'," . + "'" . addslashes($wh) . "');"; +} + +$pricelevel = isset($_GET['pricelevel']) ? $_GET['pricelevel'] : ''; + +if (!empty($_GET['list'])) { + // This case supports packages of codes. + $arrcodes = explode('~', $_GET['list']); + foreach ($arrcodes as $codestring) { + if ($codestring === '') { + continue; + } + $arrcode = explode('|', $codestring); + $codetype = $arrcode[0]; + list($code, $modifier) = explode(":", $arrcode[1]); + $selector = isset($arrcode[2]) ? $arrcode[2] : ''; + write_code_info($codetype, $code, $selector, $pricelevel); + } +} else { + // This is the normal case of adding a single code. + $codetype = isset($_GET['codetype' ]) ? $_GET['codetype' ] : ''; + $code = isset($_GET['code' ]) ? $_GET['code' ] : ''; + $selector = isset($_GET['selector' ]) ? $_GET['selector' ] : ''; + write_code_info($codetype, $code, $selector, $pricelevel); +} diff --git a/library/formatting.inc.php b/library/formatting.inc.php index 0b1815b65..dc9b22a7b 100644 --- a/library/formatting.inc.php +++ b/library/formatting.inc.php @@ -28,7 +28,7 @@ function oeFormatShortDate($date = 'today', $showYear = true) $date = date('Y-m-d'); } - if (strlen($date) == 10) { + if (strlen($date) >= 10) { // assume input is yyyy-mm-dd if ($GLOBALS['date_display_format'] == 1) { // mm/dd/yyyy, note year is added below $newDate = substr($date, 5, 2) . '/' . substr($date, 8, 2); diff --git a/library/forms.inc b/library/forms.inc index 62b266839..68e423086 100644 --- a/library/forms.inc +++ b/library/forms.inc @@ -5,14 +5,14 @@ $GLOBALS['form_exit_url'] = "$rootdir/patient_file/encounter/encounter_top.php"; function getFormById($id, $cols = "*") { - $sql = "select $cols from forms where id='$id' order by date DESC limit 0,1"; + $sql = "select $cols from forms where id='$id' and deleted = 0 order by date DESC limit 0,1"; //echo $sql . "
    "; return sqlQuery($sql); } function getFormInfoById($id, $cols = "*") { - $sql = "select $cols from forms where id='$id' order by date DESC limit 0,1"; + $sql = "select $cols from forms where id = '$id' and deleted = 0 order by date DESC limit 0,1"; //echo $sql . "
    "; $result = sqlQuery($sql); if ($result['formdir'] == "newpatient") { @@ -28,14 +28,20 @@ function getFormInfoById($id, $cols = "*") function getFormsByPid($pid, $cols = "*") { - return sqlQuery("select $cols from forms where pid ='$pid'"); + return sqlQuery("select $cols from forms where pid = '$pid' and deleted = 0"); } -function getFormByEncounter($attendant_id, $encounter, $cols = "form_id, form_name", $name = "") -{ +function getFormByEncounter( + $attendant_id, + $encounter, + $cols = "form_id, form_name", + $name = "", + $orderby = "FIND_IN_SET(formdir,'vitals') DESC, date DESC" +) { + global $attendant_type; $arraySqlBind = array(); - $sql = "select $cols from forms where encounter = ? "; + $sql = "select $cols from forms where encounter = ? and deleted = 0 "; array_push($arraySqlBind, $encounter); if (!empty($name)) { $sql .= "and form_name=? "; @@ -49,8 +55,9 @@ function getFormByEncounter($attendant_id, $encounter, $cols = "form_id, form_na } array_push($arraySqlBind, $attendant_id); - // This puts vitals first in the list, and newpatient last: - $sql .= "ORDER BY FIND_IN_SET(formdir,'vitals') DESC, date DESC"; + + // Default $orderby puts vitals first in the list, and newpatient last: + $sql .= "ORDER BY $orderby"; $res = sqlStatement($sql, $arraySqlBind); @@ -105,7 +112,7 @@ function addForm( function authorizeForm($id, $authorized = "1") { - sqlQuery("update forms set authorized = '$authorized' where id = '$id'"); + sqlQuery("update forms set authorized = '$authorized' where id = '$id' and deleted = 0"); } function getEncounters($pid, $dateStart = '', $dateEnd = '', $encounterRuleType = '') @@ -166,18 +173,18 @@ function getProviderIdOfEncounter($encounter) function getFormNameByFormdirAndFormid($formdir, $form_id) { - return sqlQuery("select form_name from forms where formdir='$formdir' and form_id='$form_id'"); + return sqlQuery("select form_name from forms where formdir = '$formdir' and form_id = '$form_id' and deleted = 0"); } function getFormIdByFormdirAndFormid($formdir, $form_id) { - $result = sqlQuery("select id from forms where formdir = ? and form_id =? ", array( $formdir, $form_id )); + $result = sqlQuery("select id from forms where formdir = ? and form_id = ? and deleted = 0 ", array( $formdir, $form_id )); return $result['id']; } function getFormNameByFormdir($formdir) { - return sqlQuery("select form_name from forms where formdir='$formdir'"); + return sqlQuery("select form_name from forms where formdir = '$formdir' and deleted = 0"); } function getDocumentsByEncounter($patientID = null, $encounterID = null) diff --git a/library/ippf_issues.inc.php b/library/ippf_issues.inc.php index 5f1aad75e..049b073e2 100644 --- a/library/ippf_issues.inc.php +++ b/library/ippf_issues.inc.php @@ -61,7 +61,7 @@ function issue_ippf_gcac_save($issue) $sets = "id = '" . add_escape_custom($issue) . "'"; $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = 'GCA' AND uor > 0 AND field_id != '' AND edit_options != 'H' " . - "ORDER BY group_name, seq"); + "ORDER BY group_id, seq"); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; $value = get_layout_form_value($frow); @@ -86,16 +86,20 @@ function issue_ippf_gcac_form($issue, $thispid) echo "
    "; + echo ""; echo ""; } // static text. read-only, of course. else if ($data_type == 31) { - echo nl2br($frow['description']); + echo parse_static_text($frow); } //$data_type == 33 // Race and Ethnicity. After added support for backup lists, this is now the same as datatype 1; so have migrated it there. //$data_type == 33 @@ -1294,7 +1338,7 @@ function generate_print_field($frow, $currvalue) // generic single-selection list // Supports backup lists. - if ($data_type == 1 || $data_type == 26 || $data_type == 33) { + if (false && ($data_type == 1 || $data_type == 26 || $data_type == 33)) { if (empty($fld_length)) { if ($list_id == 'titles') { $fld_length = 3; @@ -1359,21 +1403,15 @@ function generate_print_field($frow, $currvalue) $currescaped . ""; } // date else if ($data_type == 4) { - $asof = ''; //not used here, but set to prevent a php warning when call optionalAge - $agestr = optionalAge($frow, $currvalue, $asof); - if ($agestr) { - echo "
    "; - } - + $age_asof_date = ''; + $agestr = optionalAge($frow, $currvalue, $age_asof_date, $description); if ($currvalue === '') { echo ' '; } else { echo text(oeFormatShortDate($currvalue)); - } - - // Optional display of age or gestational age. - if ($agestr) { - echo "
    " . text($agestr) . "
    "; + if ($agestr) { + echo " (" . text($agestr) . ")"; + } } } // provider list else if ($data_type == 10 || $data_type == 11) { @@ -1564,45 +1602,49 @@ function generate_print_field($frow, $currvalue) } echo $tmp; - } // a set of labeled checkboxes + } // a single checkbox or set of labeled checkboxes else if ($data_type == 21) { - // In this special case, fld_length is the number of columns generated. - $cols = max(1, $fld_length); - $avalue = explode('|', $currvalue); - $lres = sqlStatement("SELECT * FROM list_options " . - "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); - echo ""; - $tdpct = (int) (100 / $cols); - for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) { - $option_id = $lrow['option_id']; - if ($count % $cols == 0) { - if ($count) { - echo ""; - } - - echo ""; - } - - echo "
    "; + if (!$list_id) { echo ""; + } else { + // In this special case, fld_length is the number of columns generated. + $cols = max(1, $fld_length); + $avalue = explode('|', $currvalue); + $lres = sqlStatement("SELECT * FROM list_options " . + "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); + echo ""; + $tdpct = (int) (100 / $cols); + for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) { + $option_id = $lrow['option_id']; + if ($count % $cols == 0) { + if ($count) { + echo ""; + } - echo ">" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES); - echo ""; - } - - if ($count) { - echo ""; - if ($count > $cols) { - // Add some space after multiple rows of checkboxes. - $cols = htmlspecialchars($cols, ENT_QUOTES); - echo ""; + echo ""; + } + echo ""; + } + if ($count) { + echo ""; + if ($count > $cols) { + // Add some space after multiple rows of checkboxes. + $cols = htmlspecialchars($cols, ENT_QUOTES); + echo ""; + } } + echo "
    "; + echo "" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES); + echo "
    "; } - - echo "
    "; } // a set of labeled text input fields else if ($data_type == 22) { $tmp = explode('|', $currvalue); @@ -1732,7 +1774,7 @@ function generate_print_field($frow, $currvalue) echo "
    "; } // a set of labeled radio buttons - else if ($data_type == 27) { + else if ($data_type == 27 || $data_type == 1 || $data_type == 26 || $data_type == 33) { // In this special case, fld_length is the number of columns generated. $cols = max(1, $frow['fld_length']); $lres = sqlStatement("SELECT * FROM list_options " . @@ -1748,11 +1790,10 @@ function generate_print_field($frow, $currvalue) echo "
  • "; + echo ""; echo " 0 && $option_id == $currvalue)) { + if (strlen($currvalue) > 0 && $option_id == $currvalue) { + // Do not use defaults for these printable forms. echo " checked"; } @@ -1863,7 +1904,7 @@ function generate_print_field($frow, $currvalue) echo "
    "; } // static text. read-only, of course. else if ($data_type == 31) { - echo nl2br($frow['description']); + echo parse_static_text($frow); } else if ($data_type == 34) { echo ""; echo "
    "; @@ -1871,11 +1912,36 @@ function generate_print_field($frow, $currvalue) echo "
    "; } //facilities drop-down list else if ($data_type == 35) { - if (empty($currvalue)) { - $currvalue = 0; + // In this special case, fld_length is the number of columns generated. + $cols = max(1, $frow['fld_length']); + $lres = sqlStatement("SELECT id, name FROM facility ORDER BY name"); + echo ""; + $tdpct = (int) (100 / $cols); + for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) { + $option_id = $lrow['id']; + if ($count % $cols == 0) { + if ($count) { + echo ""; + } + echo ""; + } + echo ""; } - - dropdown_facility($selected = $currvalue, $name = "form_$field_id_esc", $allow_unspecified = true, $allow_allfacilities = false); + if ($count) { + echo ""; + if ($count > $cols) { + // Add some space after multiple rows of radio buttons. + echo ""; + } + } + echo "
    "; + echo " 0 && $option_id == $currvalue) { + // Do not use defaults for these printable forms. + echo " checked"; + } + echo ">" . htmlspecialchars($lrow['name']); + echo "
    "; } //Multi-select // Supports backup lists. else if ($data_type == 36) { @@ -1924,7 +1990,9 @@ function generate_print_field($frow, $currvalue) } } // Image from canvas drawing else if ($data_type == 40) { - echo ""; + if ($currvalue) { + echo ""; + } } } @@ -1939,10 +2007,9 @@ function generate_display_field($frow, $currvalue) $s = ''; - // generic selection list or the generic selection list with add on the fly - // feature, or radio buttons - // Supports backup lists for datatypes 1,26,33 - if ($data_type == 1 || $data_type == 26 || $data_type == 27 || $data_type == 33) { + // generic selection list or the generic selection list with add on the fly + // feature + if ($data_type == 1 || $data_type == 26 || $data_type == 33) { $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ? AND activity = 1", array($list_id,$currvalue)); $s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES); @@ -1963,20 +2030,16 @@ function generate_display_field($frow, $currvalue) else if ($data_type == 4) { $asof = ''; //not used here, but set to prevent a php warning when call optionalAge $s = ''; - $agestr = optionalAge($frow, $currvalue, $asof); - if ($agestr) { - $s .= "
    "; - } - + $description = (isset($frow['description']) ? htmlspecialchars(xl_layout_label($frow['description']), ENT_QUOTES) : ''); + $age_asof_date = ''; + $agestr = optionalAge($frow, $currvalue, $age_asof_date, $description); if ($currvalue === '') { $s .= ' '; } else { $s .= text(oeFormatShortDate($currvalue)); - } - - // Optional display of age or gestational age. - if ($agestr) { - $s .= "
    " . text($agestr) . "
    "; + if ($agestr) { + $s .= " (" . text($agestr) . ")"; + } } } // provider else if ($data_type == 10 || $data_type == 11) { @@ -2021,7 +2084,24 @@ function generate_display_field($frow, $currvalue) $s = htmlspecialchars($uname, ENT_NOQUOTES); } // billing code else if ($data_type == 15) { - $s = htmlspecialchars($currvalue, ENT_NOQUOTES); + $s = ''; + if (!empty($currvalue)) { + $relcodes = explode(';', $currvalue); + foreach ($relcodes as $codestring) { + if ($codestring === '') { + continue; + } + $tmp = lookup_code_descriptions($codestring); + if ($s !== '') { + $s .= '; '; + } + if (!empty($tmp)) { + $s .= $tmp; + } else { + $s .= $codestring . ' (' . xl('not found') . ')'; + } + } + } } // insurance company list else if ($data_type == 16) { $insprovs = getInsuranceProviders(); @@ -2045,22 +2125,36 @@ function generate_display_field($frow, $currvalue) array($currvalue) ); $s = htmlspecialchars($crow['pc_catname'], ENT_NOQUOTES); - } // a set of labeled checkboxes + } // a single checkbox or set of labeled checkboxes else if ($data_type == 21) { - $avalue = explode('|', $currvalue); - $lres = sqlStatement("SELECT * FROM list_options " . - "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); - $count = 0; - while ($lrow = sqlFetchArray($lres)) { - $option_id = $lrow['option_id']; - if (in_array($option_id, $avalue)) { - if ($count++) { - $s .= "
    "; + if (!$list_id) { + $s .= $currvalue ? '[ x ]' : '[    ]'; + } else { + // In this special case, fld_length is the number of columns generated. + $cols = max(1, $frow['fld_length']); + $avalue = explode('|', $currvalue); + $lres = sqlStatement("SELECT * FROM list_options " . + "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); + $s .= ""; + for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) { + $option_id = $lrow['option_id']; + $option_id_esc = text($option_id); + if ($count % $cols == 0) { + if ($count) { + $s .= ""; + } + $s .= ""; } - - // Added 5-09 by BM - Translate label if applicable - $s .= nl2br(htmlspecialchars(xl_list_label($lrow['title'])), ENT_NOQUOTES); + $s .= ""; } + if ($count) { + $s .= ""; + } + $s .= "
    "; + $checked = in_array($option_id, $avalue); + $s .= $checked ? '[ x ]' : '[    ]'; + $s .= ' ' . text(xl_list_label($lrow['title'])). '  '; + $s .= "
    "; } } // a set of labeled text input fields else if ($data_type == 22) { @@ -2164,14 +2258,41 @@ function generate_display_field($frow, $currvalue) $s .= "" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . " "; $restype = $restype ? xl('Yes') : xl('No'); - $s .= "" . htmlspecialchars($restype, ENT_NOQUOTES) . ""; - $s .= "" . htmlspecialchars($resnote, ENT_NOQUOTES) . ""; + $s .= "" . htmlspecialchars($restype, ENT_NOQUOTES) . " "; + $s .= "" . htmlspecialchars($resnote, ENT_NOQUOTES) . ""; $s .= ""; } $s .= ""; + } // a set of labeled radio buttons + else if ($data_type == 27) { + // In this special case, fld_length is the number of columns generated. + $cols = max(1, $frow['fld_length']); + $lres = sqlStatement("SELECT * FROM list_options " . + "WHERE list_id = ? ORDER BY seq, title", array($list_id)); + $s .= ""; + for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) { + $option_id = $lrow['option_id']; + $option_id_esc = text($option_id); + if ($count % $cols == 0) { + if ($count) { + $s .= ""; + } + $s .= ""; + } + $s .= ""; + } + if ($count) { + $s .= ""; + } + $s .= "
    "; + $checked = ((strlen($currvalue) == 0 && $lrow['is_default']) || + (strlen($currvalue) > 0 && $option_id == $currvalue)); + $s .= $checked ? '[ x ]' : '[    ]'; + $s .= ' ' . text(xl_list_label($lrow['title'])). '  '; + $s .= "
    "; } // special case for history of lifestyle status; 3 radio buttons and a date text field: - // VicarePlus :: A selection list for smoking status. + // VicarePlus :: A selection list for smoking status. else if ($data_type == 28 || $data_type == 32) { $tmp = explode('|', $currvalue); switch (count($tmp)) { @@ -2254,7 +2375,7 @@ function generate_display_field($frow, $currvalue) $s .= ""; } // static text. read-only, of course. else if ($data_type == 31) { - $s .= nl2br($frow['description']); + $s .= parse_static_text($frow); } else if ($data_type == 34) { $arr = explode("|*|*|*|", $currvalue); for ($i=0; $i"; + if ($currvalue) { + $s .= ""; + } } return $s; @@ -2328,9 +2451,10 @@ function generate_plaintext_field($frow, $currvalue) } // date else if ($data_type == 4) { $s = oeFormatShortDate($currvalue); + $description = (isset($frow['description']) ? htmlspecialchars(xl_layout_label($frow['description']), ENT_QUOTES) : ''); + $age_asof_date = ''; // Optional display of age or gestational age. - $asof=''; //not used here, but set to prevent a php warning when call optionalAge - $tmp = optionalAge($frow, $currvalue, $asof); + $tmp = optionalAge($frow, $currvalue, $age_asof_date, $description); if ($tmp) { $s .= ' ' . $tmp; } @@ -2385,18 +2509,21 @@ function generate_plaintext_field($frow, $currvalue) $s = $crow['pc_catname']; } // a set of labeled checkboxes else if ($data_type == 21) { - $avalue = explode('|', $currvalue); - $lres = sqlStatement("SELECT * FROM list_options " . - "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); - $count = 0; - while ($lrow = sqlFetchArray($lres)) { - $option_id = $lrow['option_id']; - if (in_array($option_id, $avalue)) { - if ($count++) { - $s .= "; "; + if (!$list_id) { + $s .= $currvalue ? xlt('Yes') : xlt('No'); + } else { + $avalue = explode('|', $currvalue); + $lres = sqlStatement("SELECT * FROM list_options " . + "WHERE list_id = ? AND activity = 1 ORDER BY seq, title", array($list_id)); + $count = 0; + while ($lrow = sqlFetchArray($lres)) { + $option_id = $lrow['option_id']; + if (in_array($option_id, $avalue)) { + if ($count++) { + $s .= "; "; + } + $s .= xl_list_label($lrow['title']); } - - $s .= xl_list_label($lrow['title']); } } } // a set of labeled text input fields @@ -2627,16 +2754,167 @@ function disp_end_group() } } +// Accumulate action conditions into a JSON expression for the browser side. +function accumActionConditions($field_id, &$condition_str, &$condarr) +{ + $conditions = empty($condarr) ? array() : unserialize($condarr); + $action = 'skip'; + foreach ($conditions as $key => $condition) { + if ($key === 'action') { + // If specified this should be the first array item. + if ($condition) { + $action = $condition; + } + continue; + } + if (empty($condition['id'])) { + continue; + } + $andor = empty($condition['andor']) ? '' : $condition['andor']; + if ($condition_str) { + $condition_str .= ",\n"; + } + $condition_str .= "{" . + "target:'" . addslashes($field_id) . "', " . + "action:'" . addslashes($action) . "', " . + "id:'" . addslashes($condition['id']) . "', " . + "itemid:'" . addslashes($condition['itemid']) . "', " . + "operator:'" . addslashes($condition['operator']) . "', " . + "value:'" . addslashes($condition['value']) . "', " . + "andor:'" . addslashes($andor) . "'}"; + } +} + +// This checks if the given field with the given value should have an action applied. +// Originally the only action was skip, but now you can also set the field to a specified value. +// It somewhat mirrors the checkSkipConditions function in options.js.php. +// If you use this for multiple layouts in the same script, you should +// clear $sk_layout_items before each layout. +function isSkipped(&$frow, $currvalue) +{ + global $sk_layout_items; + + // Accumulate an array of the encountered fields and their values. + // It is assumed that fields appear before they are tested by another field. + // TBD: Bad assumption? + $field_id = $frow['field_id']; + if (!is_array($sk_layout_items)) { + $sk_layout_items = array(); + } + $sk_layout_items[$field_id] = array('row' => $frow, 'value' => $currvalue); + + if (empty($frow['conditions'])) { + return false; + } + + $skiprows = unserialize($frow['conditions']); + $prevandor = ''; + $prevcond = false; + $datatype = $frow['data_type']; + $action = 'skip'; // default action if none specified + + foreach ($skiprows as $key => $skiprow) { + // id referenced field id + // itemid referenced array key if applicable + // operator "eq", "ne", "se" or "ns" + // value if eq or ne, some string to compare with + // andor "and", "or" or empty + + if ($key === 'action') { + // Action value is a string. It can be "skip", or "value=" followed by a value. + $action = $skiprow; + continue; + } + + if (empty($skiprow['id'])) { + continue; + } + + $id = $skiprow['id']; + if (!isset($sk_layout_items[$id])) { + error_log("Function isSkipped() cannot find skip source field '$id'."); + continue; + } + $itemid = $skiprow['itemid']; + $operator = $skiprow['operator']; + $skipval = $skiprow['value']; + $srcvalue = $sk_layout_items[$id]['value']; + $src_datatype = $sk_layout_items[$id]['row']['data_type']; + $src_list_id = $sk_layout_items[$id]['row']['list_id']; + + // Some data types use itemid and we have to dig for their value. + if ($src_datatype == 21 && $src_list_id) { // array of checkboxes + $tmp = explode('|', $srcvalue); + $srcvalue = in_array($itemid, $tmp); + } else if ($src_datatype == 22 || $src_datatype == 23 || $src_datatype == 25) { + $tmp = explode('|', $srcvalue); + $srcvalue = ''; + foreach ($tmp as $tmp2) { + if (strpos($tmp2, "$itemid:") === 0) { + if ($datatype == 22) { + $srcvalue = substr($tmp2, strlen($itemid) + 1); + } else { + $srcvalue = substr($tmp2, strlen($itemid) + 1, 1); + } + } + } + } + + // Compute the result of the test for this condition row. + // PHP's looseness with variable type conversion helps us here. + $condition = false; + if ($operator == 'eq') { + $condition = $srcvalue == $skipval; + } else if ($operator == 'ne') { + $condition = $srcvalue != $skipval; + } else if ($operator == 'se') { + $condition = $srcvalue == true; + } else if ($operator == 'ns') { + $condition = $srcvalue != true; + } else { + error_log("Unknown skip operator '$operator' for field '$field_id'."); + } + + // Logic to accumulate multiple conditions for the same target. + if ($prevandor == 'and') { + $condition = $condition && $prevcond; + } else if ($prevandor == 'or') { + $condition = $condition || $prevcond; + } + $prevandor = $skiprow['andor']; + $prevcond = $condition; + } + return $prevcond ? $action : ''; +} + +// Load array of names of the given layout and its groups. +function getLayoutProperties($formtype, &$grparr, $sel = "grp_title") +{ + if ($sel != '*' && strpos($sel, 'grp_group_id') === false) { + $sel = "grp_group_id, $sel"; + } + $gres = sqlStatement("SELECT $sel FROM layout_group_properties WHERE grp_form_id = ? " . + "ORDER BY grp_group_id", array($formtype)); + while ($grow = sqlFetchArray($gres)) { + $grparr[$grow['grp_group_id']] = $grow; + } +} + function display_layout_rows($formtype, $result1, $result2 = '') { global $item_count, $cell_count, $last_group, $CPR; + $grparr = array(); + getLayoutProperties($formtype, $grparr, '*'); + + $TOPCPR = empty($grparr['']['grp_columns']) ? 4 : $grparr['']['grp_columns']; + $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formtype)); + "ORDER BY group_id, seq", array($formtype)); while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; + $this_group = $frow['group_id']; $titlecols = $frow['titlecols']; $datacols = $frow['datacols']; $data_type = $frow['data_type']; @@ -2644,6 +2922,8 @@ function display_layout_rows($formtype, $result1, $result2 = '') $list_id = $frow['list_id']; $currvalue = ''; + $CPR = empty($grparr[$this_group]['grp_columns']) ? $TOPCPR : $grparr[$this_group]['grp_columns']; + if ($formtype == 'DEM') { if (strpos($field_id, 'em_') === 0) { // Skip employer related fields, if it's disabled. @@ -2668,7 +2948,7 @@ function display_layout_rows($formtype, $result1, $result2 = '') // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { - $group_name = substr($this_group, 1); + $group_name = $grparr[$this_group]['grp_title']; // totally skip generating the employer category, if it's disabled. if ($group_name === 'Employer' && $GLOBALS['omit_employers']) { continue; @@ -2686,15 +2966,9 @@ function display_layout_rows($formtype, $result1, $result2 = '') echo ""; if ($group_name) { echo ""; - //echo ""; - //echo "$group_name"; - - // Added 5-09 by BM - Translate label if applicable - echo htmlspecialchars(xl_layout_label($group_name), ENT_NOQUOTES); - + echo text(xl_layout_label($group_name)); $group_name = ''; } else { - //echo ""; echo " "; } @@ -2718,9 +2992,14 @@ function display_layout_rows($formtype, $result1, $result2 = '') ++$item_count; - // Added 5-09 by BM - Translate label if applicable + // Added 5-09 by BM - Translate label if applicable if ($frow['title']) { - echo htmlspecialchars(xl_layout_label($frow['title']).":", ENT_NOQUOTES); + $tmp = xl_layout_label($frow['title']); + echo text($tmp); + // Append colon only if label does not end with punctuation. + if (strpos('?!.,:-=', substr($tmp, -1, 1)) === false) { + echo ':'; + } } else { echo " "; } @@ -2748,52 +3027,57 @@ function display_layout_tabs($formtype, $result1, $result2 = '') { global $item_count, $cell_count, $last_group, $CPR; - $fres = sqlStatement("SELECT distinct group_name FROM layout_options " . - "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formtype)); + $grparr = array(); + getLayoutProperties($formtype, $grparr); + + $fres = sqlStatement("SELECT distinct group_id FROM layout_options " . + "WHERE form_id = ? AND uor > 0 " . + "ORDER BY group_id", array($formtype)); $first = true; while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; - $group_name = substr($this_group, 1); + $this_group = $frow['group_id']; + // $group_name = substr($this_group, 1); + $group_name = $grparr[$this_group]['grp_title']; if ($group_name === 'Employer' && $GLOBALS['omit_employers']) { continue; } - ?> +?>
  • > - "> - + +
  • - 0 " . - "ORDER BY group_name, seq", array($formtype)); + $grparr = array(); + getLayoutProperties($formtype, $grparr, '*'); + + $TOPCPR = empty($grparr['']['grp_columns']) ? 4 : $grparr['']['grp_columns']; + + $fres = sqlStatement("SELECT distinct group_id FROM layout_options " . + "WHERE form_id = ? AND uor > 0 " . + "ORDER BY group_id", array($formtype)); $first = true; while ($frow = sqlFetchArray($fres)) { - $this_group = isset($frow['group_name']) ? $frow['group_name'] : "" ; - $titlecols = isset($frow['titlecols']) ? $frow['titlecols'] : ""; - $datacols = isset($frow['datacols']) ? $frow['datacols'] : ""; - $data_type = isset($frow['data_type']) ? $frow['data_type'] : ""; - $field_id = isset($frow['field_id']) ? $frow['field_id'] : ""; - $list_id = isset($frow['list_id']) ? $frow['list_id'] : ""; - $currvalue = ''; + $this_group = isset($frow['group_id']) ? $frow['group_id'] : "" ; - if (substr($this_group, 1, 8) === 'Employer' && $GLOBALS['omit_employers']) { + if ($grparr[$this_group]['grp_columns'] === 'Employer' && $GLOBALS['omit_employers']) { continue; } + $CPR = empty($grparr[$this_group]['grp_columns']) ? $TOPCPR : $grparr[$this_group]['grp_columns']; + $subtitle = empty($grparr[$this_group]['grp_subtitle']) ? '' : $grparr[$this_group]['grp_subtitle']; $group_fields_query = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = ? AND uor > 0 AND group_name = ? " . - "ORDER BY seq", array($formtype, $this_group)); + "WHERE form_id = ? AND uor > 0 AND group_id = ? " . + "ORDER BY seq", array($formtype, $this_group)); ?>
    @@ -2807,8 +3091,7 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') $field_id = $group_fields['field_id']; $list_id = $group_fields['list_id']; $currvalue = ''; - $condition_str = get_conditions_str($condition_str, $group_fields); - + $edit_options = $group_fields['edit_options']; if ($formtype == 'DEM') { if (strpos($field_id, 'em_') === 0) { @@ -2832,20 +3115,34 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') } } + // Skip this field if action conditions call for that. + // Note this also accumulates info for subsequent skip tests. + $skip_this_field = isSkipped($group_fields, $currvalue) == 'skip'; + + // Skip this field if its do-not-print option is set. + if (strpos($edit_options, 'X') !== false) { + $skip_this_field = true; + } + // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { - $group_name = substr($this_group, 1); - // totally skip generating the employer category, if it's disabled. + $group_name = $grparr[$this_group]['grp_title']; + // totally skip generating the employer category, if it's disabled. if ($group_name === 'Employer' && $GLOBALS['omit_employers']) { continue; } - $last_group = $this_group; } // Handle starting of a new row. if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { disp_end_row(); + if ($subtitle) { + // Group subtitle exists and is not displayed yet. + echo "" . text($subtitle) . "\n"; + echo "\n"; + $subtitle = ''; + } echo ""; } @@ -2867,13 +3164,18 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') $field_id_label = 'label_'.$group_fields['field_id']; echo ""; - // Added 5-09 by BM - Translate label if applicable - if ($group_fields['title']) { - echo htmlspecialchars(xl_layout_label($group_fields['title']).":", ENT_NOQUOTES); + if ($skip_this_field) { + // No label because skipping + } else if ($group_fields['title']) { + $tmp = xl_layout_label($group_fields['title']); + echo text($tmp); + // Append colon only if label does not end with punctuation. + if (strpos('?!.,:-=', substr($tmp, -1, 1)) === false) { + echo ':'; + } } else { echo " "; } - echo ""; // Handle starting of a new data cell. @@ -2882,6 +3184,10 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') $datacols_esc = htmlspecialchars($datacols, ENT_QUOTES); $field_id = 'text_'.$group_fields['field_id']; echo ""; $cell_count += $datacols; } else { @@ -2890,7 +3196,9 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') } ++$item_count; - echo generate_display_field($group_fields, $currvalue); + if (!$skip_this_field) { + echo generate_display_field($group_fields, $currvalue); + } } disp_end_row(); @@ -2905,57 +3213,36 @@ function display_layout_tabs_data($formtype, $result1, $result2 = '') } } -function get_conditions_str($condition_str, $frow) -{ - $conditions = empty($frow['conditions']) ? array() : unserialize($frow['conditions']); - foreach ($conditions as $condition) { - if (empty($condition['id'])) { - continue; - } - - $andor = empty($condition['andor']) ? '' : $condition['andor']; - if ($condition_str) { - $condition_str .= ",\n"; - } - - $condition_str .= "{" . - "target:'" . addslashes($frow['field_id']) . "', " . - "id:'" . addslashes($condition['id']) . "', " . - "itemid:'" . addslashes($condition['itemid']) . "', " . - "operator:'" . addslashes($condition['operator']) . "', " . - "value:'" . addslashes($condition['value']) . "', " . - "andor:'" . addslashes($andor) . "'}"; - } - - return $condition_str; -} function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') { global $item_count, $cell_count, $last_group, $CPR,$condition_str; - $fres = sqlStatement("SELECT distinct group_name FROM layout_options " . - "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formtype)); + $grparr = array(); + getLayoutProperties($formtype, $grparr, '*'); + + $TOPCPR = empty($grparr['']['grp_columns']) ? 4 : $grparr['']['grp_columns']; + + $fres = sqlStatement("SELECT distinct group_id FROM layout_options " . + "WHERE form_id = ? AND uor > 0 " . + "ORDER BY group_id", array($formtype)); $first = true; + $condition_str = ''; + while ($frow = sqlFetchArray($fres)) { - $this_group = $frow['group_name']; - $group_name = substr($this_group, 1); - $group_name_esc = htmlspecialchars($group_name, ENT_QUOTES); - $titlecols = $frow['titlecols']; - $datacols = $frow['datacols']; - $data_type = $frow['data_type']; - $field_id = $frow['field_id']; - $list_id = $frow['list_id']; - $currvalue = ''; + $this_group = $frow['group_id']; + $group_name = $grparr[$this_group]['grp_title']; + $group_name_esc = text($group_name); - if (substr($this_group, 1, 8) === 'Employer' && $GLOBALS['omit_employers']) { + if ($grparr[$this_group]['grp_title'] === 'Employer' && $GLOBALS['omit_employers']) { continue; } + $CPR = empty($grparr[$this_group]['grp_columns']) ? $TOPCPR : $grparr[$this_group]['grp_columns']; + $subtitle = empty($grparr[$this_group]['grp_subtitle']) ? '' : $grparr[$this_group]['grp_subtitle']; $group_fields_query = sqlStatement("SELECT * FROM layout_options " . - "WHERE form_id = ? AND uor > 0 AND group_name = ? " . - "ORDER BY seq", array($formtype,$this_group)); + "WHERE form_id = ? AND uor > 0 AND group_id = ? " . + "ORDER BY seq", array($formtype, $this_group)); ?>
    @@ -2969,8 +3256,11 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') $field_id = $group_fields['field_id']; $list_id = $group_fields['list_id']; $backup_list = $group_fields['list_backup_id']; - $condition_str = get_conditions_str($condition_str, $group_fields); $currvalue = ''; + $action = 'skip'; + + // Accumulate action conditions into a JSON expression for the browser side. + accumActionConditions($field_id, $condition_str, $group_fields['conditions']); if ($formtype == 'DEM') { if (strpos($field_id, 'em_') === 0) { @@ -2996,8 +3286,7 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') // Handle a data category (group) change. if (strcmp($this_group, $last_group) != 0) { - $group_name = substr($this_group, 1); - // totally skip generating the employer category, if it's disabled. + // totally skip generating the employer category, if it's disabled. if ($group_name === 'Employer' && $GLOBALS['omit_employers']) { continue; } @@ -3008,6 +3297,12 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') // Handle starting of a new row. if (($titlecols > 0 && $cell_count >= $CPR) || $cell_count == 0) { disp_end_row(); + if ($subtitle) { + // Group subtitle exists and is not displayed yet. + echo "" . text($subtitle) . "\n"; + echo "\n"; + $subtitle = ''; + } echo ""; } @@ -3020,16 +3315,22 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') disp_end_cell(); $titlecols_esc = htmlspecialchars($titlecols, ENT_QUOTES); $field_id_label = 'label_'.$group_fields['field_id']; - echo ""; $cell_count += $titlecols; } ++$item_count; - // Added 5-09 by BM - Translate label if applicable if ($group_fields['title']) { - echo (htmlspecialchars(xl_layout_label($group_fields['title']), ENT_NOQUOTES).":"); + $tmp = xl_layout_label($group_fields['title']); + echo text($tmp); + // Append colon only if label does not end with punctuation. + if (strpos('?!.,:-=', substr($tmp, -1, 1)) === false) { + echo ':'; + } } else { echo " "; } @@ -3039,7 +3340,9 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') disp_end_cell(); $datacols_esc = htmlspecialchars($datacols, ENT_QUOTES); $field_id = 'text_'.$group_fields['field_id']; - echo ""; $cell_count += $datacols; } @@ -3064,21 +3367,25 @@ function display_layout_tabs_data_editable($formtype, $result1, $result2 = '') // function get_layout_form_value($frow, $prefix = 'form_') { - $maxlength = empty($frow['max_length']) ? 0 : intval($frow['max_length']); $data_type = $frow['data_type']; $field_id = $frow['field_id']; $value = ''; if (isset($_POST["$prefix$field_id"])) { if ($data_type == 21) { - // $_POST["$prefix$field_id"] is an array of checkboxes and its keys - // must be concatenated into a |-separated string. - foreach ($_POST["$prefix$field_id"] as $key => $val) { - if (strlen($value)) { - $value .= '|'; + if (!$frow['list_id']) { + if (!empty($_POST["form_$field_id"])) { + $value = xlt('Yes'); + } + } else { + // $_POST["$prefix$field_id"] is an array of checkboxes and its keys + // must be concatenated into a |-separated string. + foreach ($_POST["$prefix$field_id"] as $key => $val) { + if (strlen($value)) { + $value .= '|'; + } + $value .= $key; } - - $value .= $key; } } else if ($data_type == 22) { // $_POST["$prefix$field_id"] is an array of text fields to be imploded @@ -3169,7 +3476,7 @@ function generate_layout_validation($form_id) { $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq", array($form_id)); + "ORDER BY group_id, seq", array($form_id)); while ($frow = sqlFetchArray($fres)) { $data_type = $frow['data_type']; @@ -3194,6 +3501,7 @@ function generate_layout_validation($form_id) continue; } + echo " if (f.$fldname && !f.$fldname.disabled) {\n"; switch ($data_type) { case 1: case 11: @@ -3201,6 +3509,14 @@ function generate_layout_validation($form_id) case 13: case 14: case 26: + echo + " if (f.$fldname.selectedIndex <= 0) {\n" . + " alert(\"" . addslashes(xl('Please choose a value for')) . + ":\\n" . addslashes(xl_layout_label($fldtitle)) . "\");\n" . + " if (f.$fldname.focus) f.$fldname.focus();\n" . + " return false;\n" . + " }\n"; + break; case 33: echo " if (f.$fldname.selectedIndex <= 0) {\n" . @@ -3213,7 +3529,9 @@ function generate_layout_validation($form_id) " var i = 0;\n" . " for (; i < f.$fldname.length; ++i) if (f.$fldname[i].checked) break;\n" . " if (i >= f.$fldname.length) {\n" . - " errMsgs[errMsgs.length] = '" . addslashes(xl_layout_label($fldtitle)) . "'; \n" . + " alert(\"" . addslashes(xl('Please choose a value for')) . + ":\\n" . addslashes(xl_layout_label($fldtitle)) . "\");\n" . + " return false;\n" . " }\n"; break; case 2: @@ -3243,6 +3561,7 @@ function generate_layout_validation($form_id) ""; break; } + echo " }\n"; } } @@ -3502,7 +3821,7 @@ function lbf_current_value($frow, $formid, $encounter) // It is an error if the field does not exist, but don't crash. $tmp = sqlQuery("SHOW COLUMNS FROM $table WHERE Field = ?", array($field_id)); if (empty($tmp)) { - return false; + return '*?*'; } $pdrow = sqlQuery("SELECT `$field_id` AS field_value FROM $table WHERE pid = ? $orderby", array($pid)); @@ -3510,6 +3829,7 @@ function lbf_current_value($frow, $formid, $encounter) $currvalue = $pdrow['field_value']; } } else if ($source == 'E') { + $sarow = false; if ($encounter) { // Get value from shared_attributes of the current encounter. $sarow = sqlQuery( @@ -3517,7 +3837,7 @@ function lbf_current_value($frow, $formid, $encounter) "pid = ? AND encounter = ? AND field_id = ?", array($pid, $encounter, $field_id) ); - if (isset($sarow)) { + if (!empty($sarow)) { $currvalue = $sarow['field_value']; } } else if ($formid) { @@ -3536,6 +3856,12 @@ function lbf_current_value($frow, $formid, $encounter) } else { // New form and encounter not available, this should not happen. } + if (empty($sarow) && !$formid) { + // New form, see if there is a custom default from a plugin. + if (function_exists($deffname)) { + $currvalue = call_user_func($deffname); + } + } } else if ($source == 'V') { if ($encounter) { // Get value from the current encounter's form_encounter. @@ -3571,8 +3897,6 @@ function lbf_current_value($frow, $formid, $encounter) } } else { // New form, see if there is a custom default from a plugin. - // This logic does not apply to shared attributes because they do not - // have a "new form" concept. if (function_exists($deffname)) { $currvalue = call_user_func($deffname); } diff --git a/library/options.js.php b/library/options.js.php index 4265cb08c..e441df001 100644 --- a/library/options.js.php +++ b/library/options.js.php @@ -1,5 +1,5 @@ +// Copyright (C) 2014-2017 Rod Roark // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -16,7 +16,7 @@ // Called to recompute displayed age dynamically when the corresponding date is // changed. Must generate the same age formats as the oeFormatAge() function. // -function updateAgeString(fieldid, asof, format) { +function updateAgeString(fieldid, asof, format, description) { var datefld = document.getElementById('form_' + fieldid); var f = datefld.form; var age = ''; @@ -28,7 +28,8 @@ function updateAgeString(fieldid, asof, format) { var days = Math.round(msecs / (24 * 60 * 60 * 1000)); var weeks = Math.floor(days / 7); days = days % 7; - age = ' ' + + if (description == '') description = ''; + age = description + ' ' + weeks + (weeks == 1 ? ' ' : ' ') + ' ' + days + (days == 1 ? ' ' : ' '); } @@ -50,7 +51,8 @@ function updateAgeString(fieldid, asof, format) { age = age + ' ' + (ageInMonths == 1 ? '' : ''); } } - if (age != '') age = ' ' + age; + if (description == '') description = ''; + if (age != '') age = description + ' ' + age; } document.getElementById('span_' + fieldid).innerHTML = age; } @@ -60,7 +62,6 @@ function updateAgeString(fieldid, asof, format) { // var cskerror = false; // to avoid repeating error messages function checkSkipConditions() { - var myerror = cskerror; var prevandor = ''; var prevcond = false; @@ -71,6 +72,7 @@ function checkSkipConditions() { var operator = skipArray[i].operator; var value = skipArray[i].value; var is_radio = false; + var action = skipArray[i].action; var tofind = id; if (itemid) tofind += '[' + itemid + ']'; @@ -85,7 +87,6 @@ function checkSkipConditions() { } if (srcelem == null) srcelem = document.getElementById('radio_' + tofind); if (srcelem == null) srcelem = document.getElementById('form_' + tofind) ; - if (srcelem == null) srcelem = document.getElementById('text_' + tofind); if (srcelem == null) { @@ -158,36 +159,61 @@ function checkSkipConditions() { var j = i + 1; if (j < skipArray.length && skipArray[j].target == target) continue; - // At this point condition indicates if the target should be hidden. + // At this point condition indicates the target should be hidden or have its value set. - var trgelem1 = document.getElementById('label_id_' + target); - var trgelem2 = document.getElementById('value_id_' + target); + if (action == 'skip') { + var trgelem1 = document.getElementById('label_id_' + target); + var trgelem2 = document.getElementById('value_id_text_' + target); + if (trgelem2 == null) { + trgelem2 = document.getElementById('value_id_' + target); + } - if (trgelem1 == null && trgelem2 == null) { - var trgelem1 = document.getElementById('label_' + target); - var trgelem2 = document.getElementById('text_' + target); - if(trgelem2 == null){ - trgelem2 = document.getElementById('form_' + target); - } - if (trgelem1 == null && trgelem2 == null) { - if (!cskerror) alert(' "' + target + '"'); - myerror = true; - continue; - } - } - // If the item occupies a whole row then undisplay its row, otherwise hide its cells. - var colspan = 0; - if (trgelem1 && trgelem1.colSpan !=undefined ) - colspan += trgelem1.colSpan; - if (trgelem2 && trgelem2.colSpan !=undefined) - colspan += trgelem2.colSpan; - if (colspan < 4) { - if (trgelem1) trgelem1.style.visibility = condition ? 'hidden' : 'visible'; - if (trgelem2) trgelem2.style.visibility = condition ? 'hidden' : 'visible'; + if (trgelem1 == null && trgelem2 == null) { + var trgelem1 = document.getElementById('label_' + target); + var trgelem2 = document.getElementById('text_' + target); + if(trgelem2 == null){ + trgelem2 = document.getElementById('form_' + target); + } + if (trgelem1 == null && trgelem2 == null) { + if (!cskerror) alert(' "' + target + '"'); + myerror = true; + continue; + } + } + + // Find the target row and count its cells, accounting for colspans. + var trgrow = trgelem1 ? trgelem1.parentNode : trgelem2.parentNode; + var rowcells = 0; + for (var itmp = 0; itmp < trgrow.cells.length; ++itmp) { + rowcells += trgrow.cells[itmp].colSpan; + } + + // If the item occupies a whole row then undisplay its row, otherwise hide its cells. + var colspan = 0; + if (trgelem1) colspan += trgelem1.colSpan; + if (trgelem2) colspan += trgelem2.colSpan; + if (colspan < rowcells) { + if (trgelem1) trgelem1.style.visibility = condition ? 'hidden' : 'visible'; + if (trgelem2) trgelem2.style.visibility = condition ? 'hidden' : 'visible'; + } + else { + trgrow.style.display = condition ? 'none' : ''; + } } - else { - if (trgelem1) trgelem1.parentNode.style.display = condition ? 'none' : ''; - else trgelem2.parentNode.style.display = condition ? 'none' : ''; + else if (condition) { // action starts with "value=" + var trgelem = document.getElementById('form_' + target); + if (trgelem == null) { + if (!cskerror) alert('Cannot find a value target field "' + trgelem + '"'); + myerror = true; + continue; + } + var action_value = action.substring(6); + if (trgelem.type == 'checkbox') { + trgelem.checked = !(action_value == '0' || action_value == ''); + } + else { + trgelem.value = action_value; + } } } // If any errors, all show in the first pass and none in subsequent passes. diff --git a/library/patient.inc b/library/patient.inc index fdc9c23d1..420bbd933 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -207,7 +207,12 @@ function genFacilityTitle($repname = '', $facid = 0) $s = ''; $s .= "\n"; $s .= " \n"; - $s .= " \n"; + if (empty($logo)) { + $s .= " \n"; + } else { + $s .= " \n"; + $s .= " \n"; + } $s .= "
    $repname$repname$logo$repname\n"; $r = getFacility($facid); if (!empty($r)) { @@ -655,7 +660,10 @@ function getPatientId($pid = "%", $given = "pid, id, lname, fname, mname, provid function getByPatientDemographics($searchTerm = "%", $given = "pid, id, lname, fname, mname, providerID, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS", $orderby = "lname ASC, fname ASC", $limit = "all", $start = "0") { - $layoutCols = sqlStatement("SELECT field_id FROM layout_options WHERE form_id='DEM' AND group_name not like (? ) AND uor !=0", array("%".Employer."%")); + $layoutCols = sqlStatement( + "SELECT field_id FROM layout_options WHERE form_id = 'DEM' AND field_id not like ? AND uor !=0", + array('em\_%') + ); $sqlBindArray = array(); $where = ""; diff --git a/library/registry.inc b/library/registry.inc index 4b02f541d..ede859aac 100644 --- a/library/registry.inc +++ b/library/registry.inc @@ -117,3 +117,68 @@ function getTherapyGroupCategories() return array(''); } + +// This gets an array including both standard and LBF visit form types, +// one row per form type, sorted by category, priority, is lbf, name. +// +function getFormsByCategory($state = '1', $lbfonly = false) +{ + $all = array(); + if (!$lbfonly) { + // First get the traditional form types from the registry table. + $sql = "SELECT category, nickname, name, state, directory, id, sql_run, " . + "unpackaged, date, priority, aco_spec FROM registry WHERE " . + "state LIKE ? ORDER BY category, priority, name"; + $res = sqlStatement($sql, array($state)); + if ($res) { + while ($row = sqlFetchArray($res)) { + // Skip fee_sheet from list of registered forms. + if ($row['directory'] != 'fee_sheet') { + // Flag this entry as not LBF + $row['LBF'] = false; + $all[] = $row; + } + } + } + } + + // Merge LBF form types into the registry array of form types. + // Note that the mapping value is used as the category name. + $lres = sqlStatement("SELECT * FROM layout_group_properties " . + "WHERE grp_form_id LIKE 'LBF%' AND grp_group_id = '' AND grp_activity = 1 " . + "ORDER BY grp_mapping, grp_seq, grp_title"); + while ($lrow = sqlFetchArray($lres)) { + $rrow = array(); + $rrow['category'] = $lrow['grp_mapping'] ? $lrow['grp_mapping'] : 'Clinical'; + $rrow['name'] = $lrow['grp_title']; + $rrow['nickname'] = $lrow['grp_title']; + $rrow['directory'] = $lrow['grp_form_id']; // should start with LBF + $rrow['priority'] = $lrow['grp_seq']; + $rrow['aco_spec'] = $lrow['grp_aco_spec']; + $rrow['LBF'] = true; // Flag this form as LBF + $all[] = $rrow; + } + + // Sort by category, priority, is lbf, name. + usort($all, function ($a, $b) { + // Anonymous functions supported as of PHP 5.3. Yay! + if ($a['category'] == $b['category']) { + if ($a['priority'] == $b['priority']) { + if ($a['LBF'] == $b['LBF']) { + $name1 = $a['nickname'] ? $a['nickname'] : $a['name']; + $name2 = $b['nickname'] ? $b['nickname'] : $b['name']; + if ($name1 == $name2) { + return 0; + } + return $name1 < $name2 ? -1 : 1; + } else { + // Sort LBF with the same priority after standard forms + return $b['LBF'] ? -1 : 1; + } + } + return $a['priority'] < $b['priority'] ? -1 : 1; + } + return $a['category'] < $b['category'] ? -1 : 1; + }); + return $all; +} diff --git a/library/report.inc b/library/report.inc index 4cc804581..5ddf24afe 100644 --- a/library/report.inc +++ b/library/report.inc @@ -231,7 +231,7 @@ function lbt_report($id, $formname) $arr = array(); $fres = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . - "ORDER BY group_name, seq", array($formname)); + "ORDER BY group_id, seq", array($formname)); while ($frow = sqlFetchArray($fres)) { $field_id = $frow['field_id']; $currvalue = lbt_current_value($frow, $id); diff --git a/library/sql_upgrade_fx.php b/library/sql_upgrade_fx.php index f326d492b..f6cdb899d 100644 --- a/library/sql_upgrade_fx.php +++ b/library/sql_upgrade_fx.php @@ -339,6 +339,140 @@ function MigrateTableEngine($table, $engine) return true; } +function convertLayoutProperties() +{ + $res = sqlStatement("SELECT DISTINCT form_id FROM layout_options ORDER BY form_id"); + while ($row = sqlFetchArray($res)) { + $form_id = $row['form_id']; + $props = array( + 'title' => 'Unknown', + 'mapping' => 'Core', + 'notes' => '', + 'activity' => '1', + 'option_value' => '0', + ); + if (substr($form_id, 0, 3) == 'LBF') { + $props = sqlQuery( + "SELECT title, mapping, notes, activity, option_value FROM list_options WHERE list_id = 'lbfnames' AND option_id = ?", + array($form_id) + ); + if (empty($props)) { + continue; + } + if (empty($props['mapping'])) { + $props['mapping'] = 'Clinical'; + } + } else if (substr($form_id, 0, 3) == 'LBT') { + $props = sqlQuery( + "SELECT title, mapping, notes, activity, option_value FROM list_options WHERE list_id = 'transactions' AND option_id = ?", + array($form_id) + ); + if (empty($props)) { + continue; + } + if (empty($props['mapping'])) { + $props['mapping'] = 'Transactions'; + } + } else if ($form_id == 'DEM') { + $props['title'] = 'Demographics'; + } else if ($form_id == 'HIS') { + $props['title'] = 'History'; + } else if ($form_id == 'FACUSR') { + $props['title'] = 'Facility Specific User Information'; + } else if ($form_id == 'CON') { + $props['title'] = 'Contraception Issues'; + } else if ($form_id == 'GCA') { + $props['title'] = 'Abortion Issues'; + } else if ($form_id == 'SRH') { + $props['title'] = 'IPPF SRH Data'; + } + + $query = "INSERT INTO layout_group_properties SET " . + "grp_form_id = ?, " . + "grp_group_id = '', " . + "grp_title = ?, " . + "grp_mapping = ?, " . + "grp_activity = ?, " . + "grp_repeats = ?"; + $sqlvars = array($form_id, $props['title'], $props['mapping'], $props['activity'], $props['option_value']); + if ($props['notes']) { + $jobj = json_decode($props['notes'], true); + if (isset($jobj['columns'])) { + $query .= ", grp_columns = ?"; + $sqlvars[] = $jobj['columns']; + } + if (isset($jobj['size'])) { + $query .= ", grp_size = ?"; + $sqlvars[] = $jobj['size']; + } + if (isset($jobj['issue'])) { + $query .= ", grp_issue_type = ?"; + $sqlvars[] = $jobj['issue']; + } + if (isset($jobj['aco'])) { + $query .= ", grp_aco_spec = ?"; + $sqlvars[] = $jobj['aco']; + } + if (isset($jobj['services'])) { + $query .= ", grp_services = ?"; + // if present but empty, means all services + $sqlvars[] = $jobj['services'] ? $jobj['services'] : '*'; + } + if (isset($jobj['products'])) { + $query .= ", grp_products = ?"; + // if present but empty, means all products + $sqlvars[] = $jobj['products'] ? $jobj['products'] : '*'; + } + if (isset($jobj['diags'])) { + $query .= ", grp_diags = ?"; + // if present but empty, means all diags + $sqlvars[] = $jobj['diags'] ? $jobj['diags'] : '*'; + } + } + sqlStatement($query, $sqlvars); + + $gres = sqlStatement( + "SELECT DISTINCT group_name FROM layout_options WHERE form_id = ? ORDER BY group_name", + array($form_id) + ); + + // For each group within this layout... + while ($grow = sqlFetchArray($gres)) { + $group_name = $grow['group_name']; + $group_id = ''; + $title = ''; + $a = explode('|', $group_name); + foreach ($a as $tmp) { + $group_id .= substr($tmp, 0, 1); + $title = substr($tmp, 1); + } + sqlStatement( + "UPDATE layout_options SET group_id = ? WHERE form_id = ? AND group_name = ?", + array($group_id, $form_id, $group_name) + ); + $query = "INSERT IGNORE INTO layout_group_properties SET " . + "grp_form_id = ?, " . + "grp_group_id = ?, " . + "grp_title = '" . add_escape_custom($title) . "'"; + // grp_title not using $sqlvars because of a bug causing '' to become '0'. + $sqlvars = array($form_id, $group_id); + /**************************************************************** + if ($props['notes']) { + if (isset($jobj['columns'])) { + $query .= ", grp_columns = ?"; + $sqlvars[] = $jobj['columns']; + } + if (isset($jobj['size'])) { + $query .= ", grp_size = ?"; + $sqlvars[] = $jobj['size']; + } + } + ****************************************************************/ + // echo $query; foreach ($sqlvars as $tmp) echo " '$tmp'"; echo "
    \n"; // debugging + sqlStatement($query, $sqlvars); + } // end group + } // end form +} /** * Upgrade or patch the database with a selected upgrade/patch file. @@ -732,6 +866,13 @@ function upgradeFromSqlFile($filename) if ($skipping) { echo "Skipping section $line
    \n"; } + } else if (preg_match('/^#ConvertLayoutProperties/', $line)) { + if ($skipping) { + echo "Skipping section $line
    \n"; + } else { + echo "Converting layout properties ...
    \n"; + convertLayoutProperties(); + } } else if (preg_match('/^#EndIf/', $line)) { $skipping = false; } diff --git a/library/validation/LBF_Validation.php b/library/validation/LBF_Validation.php index d5a3adb90..a9177be3c 100644 --- a/library/validation/LBF_Validation.php +++ b/library/validation/LBF_Validation.php @@ -40,7 +40,7 @@ class LBF_Validation FROM layout_options LEFT JOIN list_options ON layout_options.validation = list_options.option_id AND list_options.list_id = 'LBF_Validations' AND list_options.activity = 1 WHERE layout_options.form_id = ? AND layout_options.uor > 0 AND layout_options.field_id != '' - ORDER BY layout_options.group_name, layout_options.seq ", + ORDER BY layout_options.group_id, layout_options.seq ", array($form_id) ); $constraints=array(); diff --git a/myportal/soap_service/server_existingpatient.php b/myportal/soap_service/server_existingpatient.php index 20b3a3e2c..81f0001b4 100644 --- a/myportal/soap_service/server_existingpatient.php +++ b/myportal/soap_service/server_existingpatient.php @@ -193,7 +193,7 @@ class existingpatient case 'P2': $query="select * from layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; @@ -228,7 +228,7 @@ class existingpatient case 'P7': $query=" select * from layout_options WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; diff --git a/myportal/soap_service/server_newpatient.php b/myportal/soap_service/server_newpatient.php index 40965c4f9..bdde1d414 100644 --- a/myportal/soap_service/server_newpatient.php +++ b/myportal/soap_service/server_newpatient.php @@ -62,7 +62,7 @@ class newpatient case 'P2': $query="select * from layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; //for building patient Demo Date of Birth @@ -92,7 +92,7 @@ class newpatient // Demo building from layout options. case 'P7': $query=" select * from layout_options WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - " ORDER BY group_name, seq"; + " ORDER BY group_id, seq"; return array($query); break; diff --git a/myportal/soap_service/server_newpatienttoapprove.php b/myportal/soap_service/server_newpatienttoapprove.php index d050b4285..7a60f6e7f 100644 --- a/myportal/soap_service/server_newpatienttoapprove.php +++ b/myportal/soap_service/server_newpatienttoapprove.php @@ -200,7 +200,7 @@ class newpatienttoapprove case 'P2': $query="select * from layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; @@ -250,7 +250,7 @@ class newpatienttoapprove case 'P7': $query=" select * from layout_options WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; diff --git a/myportal/soap_service/server_oemruser.php b/myportal/soap_service/server_oemruser.php index eb2bf6b95..9551ec28d 100644 --- a/myportal/soap_service/server_oemruser.php +++ b/myportal/soap_service/server_oemruser.php @@ -93,7 +93,7 @@ class OEMRUser case 'P2': $query="select * from layout_options " . "WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - "ORDER BY group_name, seq"; + "ORDER BY group_id, seq"; return array($query); break; @@ -137,7 +137,7 @@ class OEMRUser case 'P7': $query=" select * from layout_options WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' " . - " ORDER BY group_name, seq"; + " ORDER BY group_id, seq"; return array($query); break; diff --git a/sites/default/referral_template.html b/sites/default/referral_template.html index ceb6d9bc0..bda811f49 100644 --- a/sites/default/referral_template.html +++ b/sites/default/referral_template.html @@ -54,16 +54,24 @@ margin: 0 0 0 0; } .ftitlecell1 { + width: 33%; vertical-align: top; text-align: left; font-size: 14pt; font-weight: bold; } .ftitlecell2 { + width: 33%; vertical-align: top; text-align: right; font-size: 9pt; - padding-right: 10pt; + } + .ftitlecellm { + width: 34%; + vertical-align: top; + text-align: center; + font-size: 14pt; + font-weight: bold; } hr { border: 0; @@ -97,27 +105,44 @@
    + - - + + + - +
    {label_clinic_id}{ref_pid}{label_client_id}{pt_pubpid} 
    {label_date}{ref_refer_date} {ref_refer_date} 
    +
     
    {label_history_summary}: + + + + + + + + + + +
    {label_bp}  {v_bps}/{v_bpd}   {label_ht}  {v_height}   {label_wt}  {v_weight} 
    + @@ -183,23 +208,27 @@ {header1} {label_subhead_patient} - @@ -282,23 +311,27 @@ {header2} {label_subhead_referred} - diff --git a/sql/5_0_0-to-5_0_1_upgrade.sql b/sql/5_0_0-to-5_0_1_upgrade.sql index 5b20623af..39ac6f6c5 100644 --- a/sql/5_0_0-to-5_0_1_upgrade.sql +++ b/sql/5_0_0-to-5_0_1_upgrade.sql @@ -617,3 +617,47 @@ UPDATE `user_settings` SET `setting_value`='style_light.css' WHERE `setting_labe OR `setting_value`='style_purple.css' OR `setting_value`='style_radiant.css' OR `setting_value`='style_sky_blue.css'); + +#IfNotColumnType facility country_code varchar(30) +ALTER TABLE `facility` CHANGE `country_code` `country_code` varchar(30) NOT NULL default ''; +#EndIf + +#IfNotColumnType layout_options group_name varchar(255) +ALTER TABLE `layout_options` CHANGE `group_name` `group_name` varchar(255) NOT NULL default ''; +#EndIf + +#IfMissingColumn forms issue_id +ALTER TABLE `forms` ADD COLUMN `issue_id` bigint(20) NOT NULL default 0 COMMENT 'references lists.id to identify a case'; +#EndIf + +#IfMissingColumn forms provider_id +ALTER TABLE `forms` ADD COLUMN `provider_id` bigint(20) NOT NULL default 0 COMMENT 'references users.id to identify a provider'; +#EndIf + +#IfNotTable layout_group_properties +CREATE TABLE `layout_group_properties` ( + grp_form_id varchar(31) not null, + grp_group_id varchar(31) not null default '' comment 'empty when representing the whole form', + grp_title varchar(63) not null default '' comment 'descriptive name of the form or group', + grp_subtitle varchar(63) not null default '' comment 'for display under the title', + grp_mapping varchar(31) not null default '' comment 'the form category', + grp_seq int(11) not null default 0 comment 'optional order within mapping', + grp_activity tinyint(1) not null default 1, + grp_repeats int(11) not null default 0, + grp_columns int(11) not null default 0, + grp_size int(11) not null default 0, + grp_issue_type varchar(75) not null default '', + grp_aco_spec varchar(63) not null default '', + grp_services varchar(4095) not null default '', + grp_products varchar(4095) not null default '', + grp_diags varchar(4095) not null default '', + PRIMARY KEY (grp_form_id, grp_group_id) +) ENGINE=InnoDB; +ALTER TABLE layout_options ADD COLUMN group_id VARCHAR(31) NOT NULL default '' AFTER group_name; +#ConvertLayoutProperties +ALTER TABLE layout_options DROP COLUMN group_name; +DELETE FROM list_options WHERE list_id = 'lbfnames'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'lbfnames'; +DELETE FROM list_options WHERE list_id = 'transactions'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'transactions'; +#EndIf diff --git a/sql/database.sql b/sql/database.sql index dffc839be..8fcfddd85 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -1812,6 +1812,8 @@ CREATE TABLE `forms` ( `deleted` tinyint(4) DEFAULT '0' NOT NULL COMMENT 'flag indicates form has been deleted', `formdir` longtext, `therapy_group_id` INT(11) DEFAULT NULL, + `issue_id` bigint(20) NOT NULL default 0 COMMENT 'references lists.id to identify a case', + `provider_id` bigint(20) NOT NULL default 0 COMMENT 'references users.id to identify a provider', PRIMARY KEY (`id`), KEY `pid_encounter` (`pid`, `encounter`), KEY `form_id` (`form_id`) @@ -2744,7 +2746,26 @@ CREATE TABLE `lang_custom` ( ----------------------------------------------------------- --- +CREATE TABLE `layout_group_properties` ( + grp_form_id varchar(31) not null, + grp_group_id varchar(31) not null default '' comment 'empty when representing the whole form', + grp_title varchar(63) not null default '' comment 'descriptive name of the form or group', + grp_subtitle varchar(63) not null default '' comment 'for display under the title', + grp_mapping varchar(31) not null default '' comment 'the form category', + grp_seq int(11) not null default 0 comment 'optional order within mapping', + grp_activity tinyint(1) not null default 1, + grp_repeats int(11) not null default 0, + grp_columns int(11) not null default 0, + grp_size int(11) not null default 0, + grp_issue_type varchar(75) not null default '', + grp_aco_spec varchar(63) not null default '', + grp_services varchar(4095) not null default '', + grp_products varchar(4095) not null default '', + grp_diags varchar(4095) not null default '', + PRIMARY KEY (grp_form_id, grp_group_id) +) ENGINE=InnoDB; + +-- -- Table structure for table `layout_options` -- @@ -2752,7 +2773,7 @@ DROP TABLE IF EXISTS `layout_options`; CREATE TABLE `layout_options` ( `form_id` varchar(31) NOT NULL default '', `field_id` varchar(31) NOT NULL default '', - `group_name` varchar(31) NOT NULL default '', + `group_id` varchar(31) NOT NULL default '', `title` varchar(63) NOT NULL default '', `seq` int(11) NOT NULL default '0', `data_type` tinyint(3) NOT NULL default '0', @@ -2773,181 +2794,203 @@ CREATE TABLE `layout_options` ( PRIMARY KEY (`form_id`,`field_id`,`seq`) ) ENGINE=InnoDB; --- --- Dumping data for table `layout_options` --- - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'title', '1Who', 'Name', 1, 1, 1, 0, 0, 'titles', 1, 1, '', 'N', 'Title', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'fname', '1Who', '', 2, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'First Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'mname', '1Who', '', 3, 2, 1, 2, 63, '', 0, 0, '', 'C', 'Middle Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'lname', '1Who', '', 4, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'Last Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pubpid', '1Who', 'External ID', 5, 2, 1, 10, 15, '', 1, 1, '', 'ND', 'External identifier', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'DOB', '1Who', 'DOB', 6, 4, 2, 10, 10, '', 1, 1, '', 'D', 'Date of Birth', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'sex', '1Who', 'Sex', 7, 1, 2, 0, 0, 'sex', 1, 1, '', 'N', 'Sex', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'ss', '1Who', 'S.S.', 8, 2, 1, 11, 11, '', 1, 1, '', '', 'Social Security Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'drivers_license', '1Who', 'License/ID', 9, 2, 1, 15, 63, '', 1, 1, '', '', 'Drivers License or State ID', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'status', '1Who', 'Marital Status', 10, 1, 1, 0, 0, 'marital', 1, 3, '', '', 'Marital Status', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericname1', '1Who', 'User Defined', 11, 2, 1, 15, 63, '', 1, 3, '', '', 'User Defined Field', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericval1', '1Who', '', 12, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericname2', '1Who', '', 13, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericval2', '1Who', '', 14, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'squad', '1Who', 'Squad', 15, 13, 0, 0, 0, '', 1, 3, '', '', 'Squad Membership', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pricelevel', '1Who', 'Price Level', 16, 1, 0, 0, 0, 'pricelevel', 1, 1, '', '', 'Discount Level', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'billing_note', '1Who', 'Billing Note', 17, 2, 1, 60, 0, '', 1, 3, '', '', 'Patient Level Billing Note (Collections)', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'street', '2Contact', 'Address', 1, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'city', '2Contact', 'City', 2, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'state', '2Contact', 'State', 3, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'postal_code', '2Contact', 'Postal Code', 4, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'country_code', '2Contact', 'Country', 5, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'county', '2Contact', 'County', 5, 26, 1, 0, 0, 'county', 1, 1, '', '', 'County', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'mothersname', '2Contact', 'Mother''s Name', 6, 2, 1, 20, 63, '', 1, 1, '', '', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'contact_relationship', '2Contact', 'Emergency Contact', 8, 2, 1, 10, 63, '', 1, 1, '', 'C', 'Emergency Contact Person', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_contact', '2Contact', 'Emergency Phone', 9, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Emergency Contact Phone Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_home', '2Contact', 'Home Phone', 10, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Home Phone Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_biz', '2Contact', 'Work Phone', 11, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Work Phone Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_cell', '2Contact', 'Mobile Phone', 12, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Cell Phone Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'email', '2Contact', 'Contact Email', 13, 2, 1, 30, 95, '', 1, 1, '', '', 'Contact Email Address', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'email_direct', '2Contact', 'Trusted Email', 14, 2, 1, 30, 95, '', 1, 1, '', '', 'Trusted Direct Email Address', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'providerID', '3Choices', 'Provider', 1, 11, 1, 0, 0, '', 1, 3, '', '', 'Provider', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'ref_providerID', '3Choices', 'Referring Provider', 2, 11, 1, 0, 0, '', 1, 3, '', '', 'Referring Provider', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pharmacy_id', '3Choices', 'Pharmacy', 3, 12, 1, 0, 0, '', 1, 3, '', '', 'Preferred Pharmacy', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_notice', '3Choices', 'HIPAA Notice Received', 4, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Did you receive a copy of the HIPAA Notice?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_voice', '3Choices', 'Allow Voice Message', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow telephone messages?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_message', '3Choices', 'Leave Message With', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'With whom may we leave a message?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_mail', '3Choices', 'Allow Mail Message', 7, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow email messages?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_allowsms' , '3Choices', 'Allow SMS' , 8, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow SMS (text messages)?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_allowemail', '3Choices', 'Allow Email', 9, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow Email?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_imm_reg_use', '3Choices', 'Allow Immunization Registry Use', 10, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_imm_info_share', '3Choices', 'Allow Immunization Info Sharing', 11, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_health_info_ex', '3Choices', 'Allow Health Information Exchange', 12, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_patient_portal', '3Choices', 'Allow Patient Portal', 13, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'care_team', '3Choices', 'Care Team', 14, 11, 1, 0, 0, '', 1, 1, '', '', '', 0) ; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'cmsportal_login', '3Choices', 'CMS Portal Login', 15, 2, 1, 30, 60, '', 1, 1, '', '', 'CMS Portal Login ID', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'imm_reg_status' , '3Choices', 'Immunization Registry Status' ,16, 1, 1,1,0, 'immunization_registry_status', 1, 1, '', '', 'Immunization Registry Status', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'imm_reg_stat_effdate' , '3Choices', 'Immunization Registry Status Effective Date' ,17, 4, 1,10,10, '', 1, 1, '', '', 'Immunization Registry Status Effective Date', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'publicity_code' , '3Choices', 'Publicity Code' ,18, 1, 1,1,0, 'publicity_code', 1, 1, '', '', 'Publicity Code', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'publ_code_eff_date' , '3Choices', 'Publicity Code Effective Date' ,19, 4, 1,10,10, '', 1, 1, '', '', 'Publicity Code Effective Date', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'protect_indicator' , '3Choices', 'Protection Indicator' ,20, 1, 1,1,0, 'yesno', 1, 1, '', '', 'Protection Indicator', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'prot_indi_effdate' , '3Choices', 'Protection Indicator Effective Date' ,21, 4, 1,10,10, '', 1, 1, '', '', 'Protection Indicator Effective Date', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'occupation', '4Employer', 'Occupation', 1, 26, 1, 0, 0, 'Occupation', 1, 1, '', '', 'Occupation', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'industry', '4Employer', 'Industry', 1, 26, 1, 0, 0, 'Industry', 1, 1, '', '', 'Industry', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_name', '4Employer', 'Employer Name', 2, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Employer Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_street', '4Employer', 'Employer Address', 3, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_city', '4Employer', 'City', 4, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_state', '4Employer', 'State', 5, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_postal_code', '4Employer', 'Postal Code', 6, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_country', '4Employer', 'Country', 7, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'language', '5Stats', 'Language', 1, 1, 1, 0, 0, 'language', 1, 3, '', '', 'Preferred Language', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`,`list_backup_id`) VALUES ('DEM', 'ethnicity', '5Stats', 'Ethnicity', 2, 33, 1, 0, 0, 'ethnicity', 1, 1, '', '', 'Ethnicity', 0, 'ethrace'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`,`list_backup_id`) VALUES ('DEM', 'race', '5Stats', 'Race', 3, 36, 1, 0, 0, 'race', 1, 1, '', '', 'Race', 0, 'ethrace'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'financial_review', '5Stats', 'Financial Review Date', 4, 2, 1, 10, 20, '', 1, 1, '', 'D', 'Financial Review Date', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'family_size', '5Stats', 'Family Size', 4, 2, 1, 20, 63, '', 1, 1, '', '', 'Family Size', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'monthly_income', '5Stats', 'Monthly Income', 5, 2, 1, 20, 63, '', 1, 1, '', '', 'Monthly Income', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'homeless', '5Stats', 'Homeless, etc.', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'Homeless or similar?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'interpretter', '5Stats', 'Interpreter', 7, 2, 1, 20, 63, '', 1, 1, '', '', 'Interpreter needed?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'migrantseasonal', '5Stats', 'Migrant/Seasonal', 8, 2, 1, 20, 63, '', 1, 1, '', '', 'Migrant or seasonal worker?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'contrastart', '5Stats', 'Contraceptives Start',9,4,0,10,10,'',1,1,'','','Date contraceptive services initially provided', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'referral_source', '5Stats', 'Referral Source',10, 26, 1, 0, 0, 'refsource', 1, 1, '', '', 'How did they hear about us', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'vfc', '5Stats', 'VFC', 12, 1, 1, 20, 0, 'eligibility', 1, 1, '', '', 'Eligibility status for Vaccine for Children supplied vaccine', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'religion', '5Stats', 'Religion', 13, 1, 1, 0, 0, 'religious_affiliation', 1, 3, '', '', 'Patient Religion', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'deceased_date', '6Misc', 'Date Deceased', 1, 4, 1, 20, 20, '', 1, 3, '', 'D', 'If person is deceased, then enter date of death.', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'deceased_reason', '6Misc', 'Reason Deceased', 2, 2, 1, 30, 255, '', 1, 3, '', '', 'Reason for Death', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext1', '6Misc', 'User Defined Text 1', 3, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext2', '6Misc', 'User Defined Text 2', 4, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext3', '6Misc', 'User Defined Text 3', 5,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext4', '6Misc', 'User Defined Text 4', 6,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext5', '6Misc', 'User Defined Text 5', 7,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext6', '6Misc', 'User Defined Text 6', 8,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext7', '6Misc', 'User Defined Text 7', 9,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext8', '6Misc', 'User Defined Text 8',10,2,0,10,63,'',1,1,'','','User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist1', '6Misc', 'User Defined List 1',11, 1, 0, 0, 0, 'userlist1', 1, 1, '', '', 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist2', '6Misc', 'User Defined List 2',12, 1, 0, 0, 0, 'userlist2', 1, 1, '', '', 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist3', '6Misc', 'User Defined List 3',13, 1, 0, 0, 0, 'userlist3', 1, 1, '', '' , 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist4', '6Misc', 'User Defined List 4',14, 1, 0, 0, 0, 'userlist4', 1, 1, '', '' , 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist5', '6Misc', 'User Defined List 5',15, 1, 0, 0, 0, 'userlist5', 1, 1, '', '' , 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist6', '6Misc', 'User Defined List 6',16, 1, 0, 0, 0, 'userlist6', 1, 1, '', '' , 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist7', '6Misc', 'User Defined List 7',17, 1, 0, 0, 0, 'userlist7', 1, 1, '', '' , 'User Defined', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'regdate' , '6Misc', 'Registration Date' ,18, 4, 0,10,10, '' , 1, 1, '', 'D', 'Start Date at This Clinic', 0); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_date' ,'1Referral','Referral Date' , 1, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_from' ,'1Referral','Refer By' , 2,10,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_external' ,'1Referral','External Referral' , 3, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'External referral?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_to' ,'1Referral','Refer To' , 4,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','body' ,'1Referral','Reason' , 5, 3,2,30, 0,'' ,1,1,'' ,'' ,'Reason for referral', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_diag' ,'1Referral','Referrer Diagnosis' , 6, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_risk_level','1Referral','Risk Level' , 7, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_vitals' ,'1Referral','Include Vitals' , 8, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_related_code','1Referral','Requested Service' , 9,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_date' ,'2Counter-Referral','Reply Date' ,10, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_from' ,'2Counter-Referral','Reply From' ,11, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis' ,12, 2,1,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_final_diag','2Counter-Referral','Final Diagnosis' ,13, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_documents' ,'2Counter-Referral','Documents' ,14, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_findings' ,'2Counter-Referral','Findings' ,15, 3,1,30, 0,'' ,1,1,'' ,'' ,'Findings by specialist', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_services' ,'2Counter-Referral','Services Provided' ,16, 3,1,30, 0,'' ,1,1,'' ,'' ,'Service provided by specialist', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_recommend' ,'2Counter-Referral','Recommendations' ,17, 3,1,30, 0,'' ,1,1,'' ,'' ,'Recommendations by specialist', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_rx_refer' ,'2Counter-Referral','Prescriptions/Referrals',18, 3,1,30, 0,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist', 3); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTptreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTphreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTlegal','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTbill' ,'body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext11' ,'1General' ,'Risk Factors',1,21,1,0,0,'riskfactors',1,1,'','' ,'Risk Factors', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exams' ,'1General' ,'Exams/Tests' ,2,23,1,0,0,'exams' ,1,1,'','' ,'Exam and test results', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_father' ,'2Family History','Father' , 1, 2,1,20, 0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_father' ,'2Family History','Diagnosis Code' , 2,15,1, 0,255,'',1,1,'','', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_mother' ,'2Family History','Mother' , 3, 2,1,20, 0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_mother' ,'2Family History','Diagnosis Code' , 4,15,1, 0,255,'',1,1,'','', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_siblings' ,'2Family History','Siblings' , 5, 2,1,20, 0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_siblings' ,'2Family History','Diagnosis Code' , 6,15,1, 0,255,'',1,1,'','', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_spouse' ,'2Family History','Spouse' , 7, 2,1,20, 0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_spouse' ,'2Family History','Diagnosis Code' , 8,15,1, 0,255,'',1,1,'','', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_offspring','2Family History','Offspring' , 9, 2,1,20, 0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_offspring' ,'2Family History','Diagnosis Code' ,10,15,1, 0,255,'',1,1,'','', '', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_cancer' ,'3Relatives','Cancer' ,1, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_tuberculosis' ,'3Relatives','Tuberculosis' ,2, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_diabetes' ,'3Relatives','Diabetes' ,3, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_high_blood_pressure','3Relatives','High Blood Pressure',4, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_heart_problems' ,'3Relatives','Heart Problems' ,5, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_stroke' ,'3Relatives','Stroke' ,6, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_epilepsy' ,'3Relatives','Epilepsy' ,7, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_mental_illness' ,'3Relatives','Mental Illness' ,8, 2,1,20,0,'',1,1,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_suicide' ,'3Relatives','Suicide' ,9, 2,1,20,0,'',1,3,'','' ,'', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','coffee' ,'4Lifestyle','Coffee' ,2,28,1,20,0,'',1,3,'','' ,'Caffeine consumption', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','tobacco' ,'4Lifestyle','Tobacco' ,1,32,1,0,0,'smoking_status',1,3,'','' ,'Tobacco use', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','alcohol' ,'4Lifestyle','Alcohol' ,3,28,1,20,0,'',1,3,'','' ,'Alcohol consumption', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','recreational_drugs' ,'4Lifestyle','Recreational Drugs' ,4,28,1,20,0,'',1,3,'','' ,'Recreational drug use', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','counseling' ,'4Lifestyle','Counseling' ,5,28,1,20,0,'',1,3,'','' ,'Counseling activities', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exercise_patterns' ,'4Lifestyle','Exercise Patterns' ,6,28,1,20,0,'',1,3,'','' ,'Exercise patterns', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','hazardous_activities','4Lifestyle','Hazardous Activities',7,28,1,20,0,'',1,3,'','' ,'Hazardous activities', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','sleep_patterns' ,'4Lifestyle','Sleep Patterns' ,8, 2,1,20,0,'',1,3,'','' ,'Sleep patterns', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','seatbelt_use' ,'4Lifestyle','Seatbelt Use' ,9, 2,1,20,0,'',1,3,'','' ,'Seatbelt use', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_1' ,'5Other','Name/Value' ,1, 2,1,10,255,'',1,1,'','' ,'Name 1', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_1' ,'5Other','' ,2, 2,1,10,255,'',0,0,'','' ,'Value 1', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_2' ,'5Other','Name/Value' ,3, 2,1,10,255,'',1,1,'','' ,'Name 2', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_2' ,'5Other','' ,4, 2,1,10,255,'',0,0,'','' ,'Value 2', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','additional_history','5Other','Additional History',5, 3,1,30, 0,'',1,3,'' ,'' ,'Additional history notes', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea11' ,'5Other','User Defined Area 11',6,3,0,30,0,'',1,3,'','','User Defined', 3); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea12' ,'5Other','User Defined Area 12',7,3,0,30,0,'',1,3,'','','User Defined', 3); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('FACUSR', 'provider_id', '1General', 'Provider ID', 1, 2, 1, 15, 63, '', 1, 1, '', '', 'Provider ID at Specified Facility', 0); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiansname' , '8Guardian', 'Name' ,10, 2, 1,25,63, '', 1, 1, '', '', 'Guardian Name', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianrelationship' , '8Guardian', 'Relationship' ,20, 1, 1,0,0, 'next_of_kin_relationship', 1, 1, '', '', 'Relationship', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiansex' , '8Guardian', 'Sex' ,30, 1, 1,0,0, 'sex', 1, 1, '', '', 'Sex', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianaddress' , '8Guardian', 'Address' ,40, 2, 1,25,63, '', 1, 1, '', '', 'Address', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiancity' , '8Guardian', 'City' ,50, 2, 1,15,63, '', 1, 1, '', '', 'City', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianstate' , '8Guardian', 'State' ,60, 26, 1,0,0, 'state', 1, 1, '', '', 'State', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianpostalcode' , '8Guardian', 'Postal Code' ,70, 2, 1,6,63, '', 1, 1, '', '', 'Postal Code', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiancountry' , '8Guardian', 'Country' ,80, 26, 1,0,0, 'country', 1, 1, '', '', 'Country', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianphone' , '8Guardian', 'Phone' ,90, 2, 1,20,63, '', 1, 1, '', '', 'Phone', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianworkphone' , '8Guardian', 'Work Phone' ,100, 2, 1,20,63, '', 1, 1, '', '', 'Work Phone', 0); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianemail' , '8Guardian', 'Email' ,110, 2, 1,20,63, '', 1, 1, '', '', 'Guardian Email Address', 0); ------------------------------------------------------------ +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '' , 'Demographics', 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '1', 'Who' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '2', 'Contact' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '3', 'Choices' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '4', 'Employer' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '5', 'Stats' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '6', 'Misc' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('DEM', '8', 'Guardian' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'title', '1', 'Name', 1, 1, 1, 0, 0, 'titles', 1, 1, '', 'N', 'Title', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'fname', '1', '', 2, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'First Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'mname', '1', '', 3, 2, 1, 2, 63, '', 0, 0, '', 'C', 'Middle Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'lname', '1', '', 4, 2, 2, 10, 63, '', 0, 0, '', 'CD', 'Last Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pubpid', '1', 'External ID', 5, 2, 1, 10, 15, '', 1, 1, '', 'ND', 'External identifier', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'DOB', '1', 'DOB', 6, 4, 2, 10, 10, '', 1, 1, '', 'D', 'Date of Birth', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'sex', '1', 'Sex', 7, 1, 2, 0, 0, 'sex', 1, 1, '', 'N', 'Sex', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'ss', '1', 'S.S.', 8, 2, 1, 11, 11, '', 1, 1, '', '', 'Social Security Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'drivers_license', '1', 'License/ID', 9, 2, 1, 15, 63, '', 1, 1, '', '', 'Drivers License or State ID', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'status', '1', 'Marital Status', 10, 1, 1, 0, 0, 'marital', 1, 3, '', '', 'Marital Status', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericname1', '1', 'User Defined', 11, 2, 1, 15, 63, '', 1, 3, '', '', 'User Defined Field', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericval1', '1', '', 12, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericname2', '1', '', 13, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'genericval2', '1', '', 14, 2, 1, 15, 63, '', 0, 0, '', '', 'User Defined Field', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'squad', '1', 'Squad', 15, 13, 0, 0, 0, '', 1, 3, '', '', 'Squad Membership', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pricelevel', '1', 'Price Level', 16, 1, 0, 0, 0, 'pricelevel', 1, 1, '', '', 'Discount Level', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'billing_note', '1', 'Billing Note', 17, 2, 1, 60, 0, '', 1, 3, '', '', 'Patient Level Billing Note (Collections)', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'street', '2', 'Address', 1, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'city', '2', 'City', 2, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'state', '2', 'State', 3, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'postal_code', '2', 'Postal Code', 4, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'country_code', '2', 'Country', 5, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'county', '2', 'County', 5, 26, 1, 0, 0, 'county', 1, 1, '', '', 'County', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'mothersname', '2', 'Mother''s Name', 6, 2, 1, 20, 63, '', 1, 1, '', '', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'contact_relationship', '2', 'Emergency Contact', 8, 2, 1, 10, 63, '', 1, 1, '', 'C', 'Emergency Contact Person', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_contact', '2', 'Emergency Phone', 9, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Emergency Contact Phone Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_home', '2', 'Home Phone', 10, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Home Phone Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_biz', '2', 'Work Phone', 11, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Work Phone Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'phone_cell', '2', 'Mobile Phone', 12, 2, 1, 20, 63, '', 1, 1, '', 'P', 'Cell Phone Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'email', '2', 'Contact Email', 13, 2, 1, 30, 95, '', 1, 1, '', '', 'Contact Email Address', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'email_direct', '2', 'Trusted Email', 14, 2, 1, 30, 95, '', 1, 1, '', '', 'Trusted Direct Email Address', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'providerID', '3', 'Provider', 1, 11, 1, 0, 0, '', 1, 3, '', '', 'Provider', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'ref_providerID', '3', 'Referring Provider', 2, 11, 1, 0, 0, '', 1, 3, '', '', 'Referring Provider', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'pharmacy_id', '3', 'Pharmacy', 3, 12, 1, 0, 0, '', 1, 3, '', '', 'Preferred Pharmacy', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_notice', '3', 'HIPAA Notice Received', 4, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Did you receive a copy of the HIPAA Notice?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_voice', '3', 'Allow Voice Message', 5, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow telephone messages?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_message', '3', 'Leave Message With', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'With whom may we leave a message?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_mail', '3', 'Allow Mail Message', 7, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow email messages?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_allowsms' , '3', 'Allow SMS' , 8, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow SMS (text messages)?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'hipaa_allowemail', '3', 'Allow Email', 9, 1, 1, 0, 0, 'yesno', 1, 1, '', '', 'Allow Email?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_imm_reg_use', '3', 'Allow Immunization Registry Use', 10, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_imm_info_share', '3', 'Allow Immunization Info Sharing', 11, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_health_info_ex', '3', 'Allow Health Information Exchange', 12, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'allow_patient_portal', '3', 'Allow Patient Portal', 13, 1, 1, 0, 0, 'yesno', 1, 1, '', '', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'care_team', '3', 'Care Team', 14, 11, 1, 0, 0, '', 1, 1, '', '', '', 0) ; +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'cmsportal_login', '3', 'CMS Portal Login', 15, 2, 1, 30, 60, '', 1, 1, '', '', 'CMS Portal Login ID', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'imm_reg_status' , '3', 'Immunization Registry Status' ,16, 1, 1,1,0, 'immunization_registry_status', 1, 1, '', '', 'Immunization Registry Status', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'imm_reg_stat_effdate' , '3', 'Immunization Registry Status Effective Date' ,17, 4, 1,10,10, '', 1, 1, '', '', 'Immunization Registry Status Effective Date', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'publicity_code' , '3', 'Publicity Code' ,18, 1, 1,1,0, 'publicity_code', 1, 1, '', '', 'Publicity Code', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'publ_code_eff_date' , '3', 'Publicity Code Effective Date' ,19, 4, 1,10,10, '', 1, 1, '', '', 'Publicity Code Effective Date', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'protect_indicator' , '3', 'Protection Indicator' ,20, 1, 1,1,0, 'yesno', 1, 1, '', '', 'Protection Indicator', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'prot_indi_effdate' , '3', 'Protection Indicator Effective Date' ,21, 4, 1,10,10, '', 1, 1, '', '', 'Protection Indicator Effective Date', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'occupation', '4', 'Occupation', 1, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Occupation', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'industry', '4', 'Industry', 1, 26, 1, 0, 0, 'Industry', 1, 1, '', '', 'Industry', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_name', '4', 'Employer Name', 2, 2, 1, 20, 63, '', 1, 1, '', 'C', 'Employer Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_street', '4', 'Employer Address', 3, 2, 1, 25, 63, '', 1, 1, '', 'C', 'Street and Number', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_city', '4', 'City', 4, 2, 1, 15, 63, '', 1, 1, '', 'C', 'City Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_state', '4', 'State', 5, 26, 1, 0, 0, 'state', 1, 1, '', '', 'State/Locality', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_postal_code', '4', 'Postal Code', 6, 2, 1, 6, 63, '', 1, 1, '', '', 'Postal Code', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'em_country', '4', 'Country', 7, 26, 1, 0, 0, 'country', 1, 1, '', '', 'Country', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'language', '5', 'Language', 1, 26, 1, 0, 0, 'language', 1, 1, '', '', 'Preferred Language', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'ethnicity', '5', 'Ethnicity', 2, 33, 1, 0, 0, 'ethnicity', 1, 1, '', '', 'Ethnicity', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'race', '5', 'Race', 3, 33, 1, 0, 0, 'race', 1, 1, '', '', 'Race', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'financial_review', '5', 'Financial Review Date', 4, 2, 1, 10, 20, '', 1, 1, '', 'D', 'Financial Review Date', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'family_size', '5', 'Family Size', 4, 2, 1, 20, 63, '', 1, 1, '', '', 'Family Size', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'monthly_income', '5', 'Monthly Income', 5, 2, 1, 20, 63, '', 1, 1, '', '', 'Monthly Income', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'homeless', '5', 'Homeless, etc.', 6, 2, 1, 20, 63, '', 1, 1, '', '', 'Homeless or similar?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'interpretter', '5', 'Interpreter', 7, 2, 1, 20, 63, '', 1, 1, '', '', 'Interpreter needed?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'migrantseasonal', '5', 'Migrant/Seasonal', 8, 2, 1, 20, 63, '', 1, 1, '', '', 'Migrant or seasonal worker?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'contrastart', '5', 'Contraceptives Start',9,4,0,10,10,'',1,1,'','','Date contraceptive services initially provided', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'referral_source', '5', 'Referral Source',10, 26, 1, 0, 0, 'refsource', 1, 1, '', '', 'How did they hear about us', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'vfc', '5', 'VFC', 12, 1, 1, 20, 0, 'eligibility', 1, 1, '', '', 'Eligibility status for Vaccine for Children supplied vaccine', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'religion', '5', 'Religion', 13, 1, 1, 0, 0, 'religious_affiliation', 1, 3, '', '', 'Patient Religion', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'deceased_date', '6', 'Date Deceased', 1, 4, 1, 20, 20, '', 1, 3, '', 'D', 'If person is deceased, then enter date of death.', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'deceased_reason', '6', 'Reason Deceased', 2, 2, 1, 30, 255, '', 1, 3, '', '', 'Reason for Death', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext1', '6', 'User Defined Text 1', 3, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext2', '6', 'User Defined Text 2', 4, 2, 0, 10, 63, '', 1, 1, '', '', 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext3', '6', 'User Defined Text 3', 5,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext4', '6', 'User Defined Text 4', 6,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext5', '6', 'User Defined Text 5', 7,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext6', '6', 'User Defined Text 6', 8,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext7', '6', 'User Defined Text 7', 9,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'usertext8', '6', 'User Defined Text 8',10,2,0,10,63,'',1,1,'','','User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist1', '6', 'User Defined List 1',11, 1, 0, 0, 0, 'userlist1', 1, 1, '', '', 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist2', '6', 'User Defined List 2',12, 1, 0, 0, 0, 'userlist2', 1, 1, '', '', 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist3', '6', 'User Defined List 3',13, 1, 0, 0, 0, 'userlist3', 1, 1, '', '' , 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist4', '6', 'User Defined List 4',14, 1, 0, 0, 0, 'userlist4', 1, 1, '', '' , 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist5', '6', 'User Defined List 5',15, 1, 0, 0, 0, 'userlist5', 1, 1, '', '' , 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist6', '6', 'User Defined List 6',16, 1, 0, 0, 0, 'userlist6', 1, 1, '', '' , 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'userlist7', '6', 'User Defined List 7',17, 1, 0, 0, 0, 'userlist7', 1, 1, '', '' , 'User Defined', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'regdate' , '6', 'Registration Date' ,18, 4, 0,10,10, '' , 1, 1, '', 'D', 'Start Date at This Clinic', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiansname' , '8', 'Name' ,10, 2, 1,25,63, '', 1, 1, '', '', 'Guardian Name', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianrelationship' , '8', 'Relationship' ,20, 1, 1,0,0, 'next_of_kin_relationship', 1, 1, '', '', 'Relationship', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiansex' , '8', 'Sex' ,30, 1, 1,0,0, 'sex', 1, 1, '', '', 'Sex', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianaddress' , '8', 'Address' ,40, 2, 1,25,63, '', 1, 1, '', '', 'Address', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiancity' , '8', 'City' ,50, 2, 1,15,63, '', 1, 1, '', '', 'City', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianstate' , '8', 'State' ,60, 26, 1,0,0, 'state', 1, 1, '', '', 'State', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianpostalcode' , '8', 'Postal Code' ,70, 2, 1,6,63, '', 1, 1, '', '', 'Postal Code', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardiancountry' , '8', 'Country' ,80, 26, 1,0,0, 'country', 1, 1, '', '', 'Country', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianphone' , '8', 'Phone' ,90, 2, 1,20,63, '', 1, 1, '', '', 'Phone', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianworkphone' , '8', 'Work Phone' ,100, 2, 1,20,63, '', 1, 1, '', '', 'Work Phone', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('DEM', 'guardianemail' , '8', 'Email' ,110, 2, 1,20,63, '', 1, 1, '', '', 'Guardian Email Address', 0); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTref', '' , 'Referral' , 'Transactions'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTref', '1', 'Referral' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTref', '2', 'Counter-Referral', '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_date' ,'1','Referral Date' , 1, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_from' ,'1','Refer By' , 2,10,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_external' ,'1','External Referral' , 3, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'External referral?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_to' ,'1','Refer To' , 4,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','body' ,'1','Reason' , 5, 3,2,30, 0,'' ,1,1,'' ,'' ,'Reason for referral', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_diag' ,'1','Referrer Diagnosis' , 6, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_risk_level','1','Risk Level' , 7, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_vitals' ,'1','Include Vitals' , 8, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','refer_related_code','1','Requested Service' , 9,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_date' ,'2','Reply Date' ,10, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_from' ,'2','Reply From' ,11, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_init_diag' ,'2','Presumed Diagnosis' ,12, 2,1,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_final_diag','2','Final Diagnosis' ,13, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_documents' ,'2','Documents' ,14, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_findings' ,'2','Findings' ,15, 3,1,30, 0,'' ,1,1,'' ,'' ,'Findings by specialist', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_services' ,'2','Services Provided' ,16, 3,1,30, 0,'' ,1,1,'' ,'' ,'Service provided by specialist', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_recommend' ,'2','Recommendations' ,17, 3,1,30, 0,'' ,1,1,'' ,'' ,'Recommendations by specialist', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTref','reply_rx_refer' ,'2','Prescriptions/Referrals',18, 3,1,30, 0,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist', 3); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTptreq', '' , 'Patient Request', 'Transactions'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTptreq', '1', '' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTptreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTphreq', '' , 'Physician Request', 'Transactions'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTphreq', '1', '' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTphreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTlegal', '' , 'Legal', 'Transactions'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTlegal', '1', '' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTlegal','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTbill', '' , 'Billing', 'Transactions'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBTbill', '1', '' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBTbill' ,'body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '' , 'History' , 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '1', 'General' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '2', 'Family History', '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '3', 'Relatives' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '4', 'Lifestyle' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('HIS', '5', 'Other' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext11' ,'1' ,'Risk Factors',1,21,1,0,0,'riskfactors',1,1,'','' ,'Risk Factors', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exams' ,'1' ,'Exams/Tests' ,2,23,1,0,0,'exams' ,1,1,'','' ,'Exam and test results', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_father' ,'2','Father' , 1, 2,1,20, 0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_father' ,'2','Diagnosis Code' , 2,15,1, 0,255,'',1,1,'','', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_mother' ,'2','Mother' , 3, 2,1,20, 0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_mother' ,'2','Diagnosis Code' , 4,15,1, 0,255,'',1,1,'','', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_siblings' ,'2','Siblings' , 5, 2,1,20, 0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_siblings' ,'2','Diagnosis Code' , 6,15,1, 0,255,'',1,1,'','', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_spouse' ,'2','Spouse' , 7, 2,1,20, 0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_spouse' ,'2','Diagnosis Code' , 8,15,1, 0,255,'',1,1,'','', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_offspring','2','Offspring' , 9, 2,1,20, 0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','dc_offspring' ,'2','Diagnosis Code' ,10,15,1, 0,255,'',1,1,'','', '', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_cancer' ,'3','Cancer' ,1, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_tuberculosis' ,'3','Tuberculosis' ,2, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_diabetes' ,'3','Diabetes' ,3, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_high_blood_pressure','3','High Blood Pressure',4, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_heart_problems' ,'3','Heart Problems' ,5, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_stroke' ,'3','Stroke' ,6, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_epilepsy' ,'3','Epilepsy' ,7, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_mental_illness' ,'3','Mental Illness' ,8, 2,1,20,0,'',1,1,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_suicide' ,'3','Suicide' ,9, 2,1,20,0,'',1,3,'','' ,'', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','coffee' ,'4','Coffee' ,2,28,1,20,0,'',1,3,'','' ,'Caffeine consumption', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','tobacco' ,'4','Tobacco' ,1,32,1,0,0,'smoking_status',1,3,'','' ,'Tobacco use', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','alcohol' ,'4','Alcohol' ,3,28,1,20,0,'',1,3,'','' ,'Alcohol consumption', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','recreational_drugs' ,'4','Recreational Drugs' ,4,28,1,20,0,'',1,3,'','' ,'Recreational drug use', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','counseling' ,'4','Counseling' ,5,28,1,20,0,'',1,3,'','' ,'Counseling activities', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exercise_patterns' ,'4','Exercise Patterns' ,6,28,1,20,0,'',1,3,'','' ,'Exercise patterns', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','hazardous_activities','4','Hazardous Activities',7,28,1,20,0,'',1,3,'','' ,'Hazardous activities', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','sleep_patterns' ,'4','Sleep Patterns' ,8, 2,1,20,0,'',1,3,'','' ,'Sleep patterns', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','seatbelt_use' ,'4','Seatbelt Use' ,9, 2,1,20,0,'',1,3,'','' ,'Seatbelt use', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_1' ,'5','Name/Value' ,1, 2,1,10,255,'',1,1,'','' ,'Name 1', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_1' ,'5','' ,2, 2,1,10,255,'',0,0,'','' ,'Value 1', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_2' ,'5','Name/Value' ,3, 2,1,10,255,'',1,1,'','' ,'Name 2', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_2' ,'5','' ,4, 2,1,10,255,'',0,0,'','' ,'Value 2', 0); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','additional_history','5','Additional History',5, 3,1,30, 0,'',1,3,'' ,'' ,'Additional history notes', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea11' ,'5','User Defined Area 11',6,3,0,30,0,'',1,3,'','','User Defined', 3); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea12' ,'5','User Defined Area 12',7,3,0,30,0,'',1,3,'','','User Defined', 3); + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('FACUSR', '' , 'Facility Specific User Information', 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('FACUSR', '1', 'General' , '' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('FACUSR', 'provider_id', '1', 'Provider ID', 1, 2, 1, 15, 63, '', 1, 1, '', '', 'Provider ID at Specified Facility', 0); +-- -------------------------------------------------------- -- -- Table structure for table `list_options` @@ -3404,7 +3447,7 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ( INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'exams' ,'Exams/Tests' , 7,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'feesheet' ,'Fee Sheet' , 8,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'language' ,'Language' , 9,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'lbfnames' ,'Layout-Based Visit Forms',9,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'lbfnames' ,'Layout-Based Visit Forms',9,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'marital' ,'Marital Status' ,10,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'pricelevel' ,'Price Level' ,11,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'ethrace' ,'Race/Ethnicity' ,12,0); @@ -3654,12 +3697,11 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ( INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('eligibility', 'eligible', 'Eligible', 10, 0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('eligibility', 'ineligible', 'Ineligible', 20, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists', 'transactions', 'Layout-Based Transaction Forms', 9, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTref' , 'Referral' , 10, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTptreq', 'Patient Request' , 20, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTphreq', 'Physician Request', 30, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTlegal', 'Legal' , 40, 0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTbill' , 'Billing' , 50, 0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists', 'transactions', 'Layout-Based Transaction Forms', 9, 0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTptreq', 'Patient Request' , 20, 0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTphreq', 'Physician Request', 30, 0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTlegal', 'Legal' , 40, 0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('transactions', 'LBTbill' , 'Billing' , 50, 0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists' ,'payment_adjustment_code','Payment Adjustment Code', 1,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('payment_adjustment_code', 'family_payment', 'Family Payment', 20, 0); diff --git a/sql/ippf_layout.sql b/sql/ippf_layout.sql index a4c99e3d4..95b6d77b1 100644 --- a/sql/ippf_layout.sql +++ b/sql/ippf_layout.sql @@ -15,19 +15,39 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('contrameth','no' ,'None' ,16,0,0); DELETE FROM list_options WHERE list_id = 'mcreason'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'sef','Side Effects of Current Method' , 1,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pop','Partner Opposes' , 2,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'eco','Economic (cost)' , 3,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'com','Method Too Complicated' , 4,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'med','Medical/Health Condition' , 5,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'men','Menopause' , 6,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'rel','Religious' , 7,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mov','Personal - Moved Away' , 8,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prv','Personal - Privacy' , 9,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oop','Personal - Social/Family Pressure',10,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'con','Personal - Lacks Confidence' ,11,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prg','Wants to Become Pregnant' ,12,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oth','Other' ,13,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'sef','Side Effects of Current Method' , 1,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pop','Partner Opposes' , 2,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'eco','Economic (cost)' , 3,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'com','Method Too Complicated' , 4,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'med','Medical/Health Condition' , 5,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'men','Menopause' , 6,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'rel','Religious' , 7,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mov','Personal - Moved Away' , 8,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prv','Personal - Privacy' , 9,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oop','Personal - Social/Family Pressure',10,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'con','Personal - Lacks Confidence' ,11,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prg','Wants to Become Pregnant' ,12,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oth','Other' ,13,0,0); + +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'eco','Economic (cost)' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mda','Medical - Allergy' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mdb','Medical - Breast Feeding' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mdc','Medical - Contraindication' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'men','Medical - Menopause' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'sef','Medical - Side Effects of Current Method', 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'com','Method Too Complicated' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'fop','Personal - Family Pressure/Advice' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'con','Personal - Fear of Infertility' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oth','Personal - Other Reason' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pop','Personal - Partner Opposes' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'rel','Personal - Religious' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pse','Personal - Side Effects Concern' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oop','Personal - Social Pressure/Friend Advice', 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prg','Planning Pregnancy' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'stc','Sterilization of Client' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'stp','Sterilization of Partner' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'nav','Unavailable at Clinic' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'uns','Unspecified - No Reason Provided' , 1,0,0); DELETE FROM list_options WHERE list_id = 'abreasons'; INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('abreasons' ,'lif','Danger to life of pregnant woman' , 1,0,0); @@ -51,550 +71,736 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('lists' ,'flowtype' ,'Flow Types' ,59,0,0); DELETE FROM codes WHERE code_type = '11'; -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Oral Contraceptives - OC - Method Specific Counselling', '111100119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Oral Contraceptives - OC - OTHER', '111100999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Oral Contraceptives - COC & POC - Initial Consultation', '111101110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Oral Contraceptives - COC & POC - Follow up/Resupply', '111101111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Oral Contraceptives - COC & POC - OTHER', '111101999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Injectable Contraceptives - Method Specific Counselling', '111110119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Injectable Contraceptives - OTHER', '111110999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Combined Injectable Contraceptives (1 month) - Initial Consultation', '111111110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Combined Injectable Contraceptives (1 month) - Follow up/Resupply', '111111111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Combined Injectable Contraceptives (1 month) - OTHER', '111111999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (2 months) - Initial Consultation', '111112110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (2 months) - Follow up/Resupply', '111112111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (2 months) - OTHER', '111112999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (3 months) - Initial Consultation', '111113110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (3 months) - Follow up/Resupply', '111113111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Progestogen Only Injectables (3 months) - OTHER', '111113999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal Implants - Removal', '111120112', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal Implants - Method Specific Counselling', '111120119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal Implants - OTHER', '111120999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 6 rods - Initial Consultation/Insertion', '111122110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 6 rods - Follow up/Reinsertion', '111122111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 6 rods - OTHER', '111122999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 2 rods - Initial Consultation/Insertion', '111123110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 2 rods - Follow up/Reinsertion', '111123111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 2 rods - OTHER', '111123999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 1 rod - Initial Consultation/Insertion', '111124110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 1 rod - Follow up/Reinsertion', '111124111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Subdermal implants 1 rod - OTHER', '111124999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other hormonal methods - OTHER', '111130999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Transdermal Patch (1 month) - Initial Consultation', '111132110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Transdermal Patch (1 month) - Follow up/Resupply', '111132111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Transdermal Patch (1 month) - Method Specific Counselling', '111132119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Transdermal Patch (1 month) - OTHER', '111132999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Vaginal Ring (1 month) - Initial Consultation', '111133110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Vaginal Ring (1 month) - Follow up/Resupply', '111133111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Vaginal Ring (1 month) - Method Specific Counselling', '111133119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Other methods - Vaginal Ring (1 month) - OTHER', '111133999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms (Male and Female) - OTHER', '112140999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Male Condom - Initial Consultation', '112141110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Male Condom - Follow up/Resupply', '112141111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Male Condom - Method Specific Counselling', '112141119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Male Condom - OTHER', '112141999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Female Condom - Initial Consultation', '112142110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Female Condom - Follow up/Resupply', '112142111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Female Condom - Method Specific Counselling', '112142119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Condoms - Female Condom - OTHER', '112142999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Diaphragm / Cervical Cap - Method Specific Counselling', '112150119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Diaphragm / Cervical Cap - OTHER', '112150999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Diaphragm - Initial Consultation', '112151110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Diaphragm - Follow up/Resupply', '112151111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Diaphragm - OTHER', '112151999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Cervical Cap - Initial Consultation', '112152010', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Cervical Cap - Follow up/Resupply', '112152011', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Cervical Cap - OTHER', '112152999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Method Specific Counselling', '112160119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - OTHER', '112160999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Initial Consultation', '112161110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Follow up/Resupply', '112161111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - OTHER', '112161999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Strip - Initial Consultation', '112162110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Strip - Follow up/Resupply', '112162111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Tabs/Strip - OTHER', '112162999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Cans - Initial Consultation', '112163110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Cans - Follow up/Resupply', '112163111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Foam Cans - OTHER', '112163999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Cream & Jelly - Initial Consultation', '112164110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Cream & Jelly - Follow up/Resupply', '112164111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Cream & Jelly - OTHER', '112164999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Pessaries / C-film - Initial Consultation', '112165110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Pessaries / C-film - Follow up/Resupply', '112165111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - Spermicides - Pessaries / C-film - OTHER', '112165999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Removal', '113170112', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Method Specific Counselling', '113170119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - OTHER', '113170999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Hormone releasing IUD (5 years) - Initial Consultation/Insertion', '113171110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Hormone releasing IUD (5 years) - Follow up/Reinsertion', '113171111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Hormone releasing IUD (5 years) - OTHER', '113171999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Copper releasing IUD (10 years) - Initial Consultation/Insertion', '113172110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Copper releasing IUD (10 years) - Follow up/Reinsertion', '113172111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraceptives - IUD - Copper releasing IUD (10 years) - OTHER', '113172999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - Voluntary Surgical Contraception (VSC) - OTHER', '120180999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Reversal', '121181112', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Method Specific Counselling', '121181119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Minilaparatomy - Follow up', '121181211', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Minilaparatomy - Contraceptive Surgery', '121181213', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Laparoscopy - Follow up', '121181311', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Laparoscopy - Contraceptive Surgery', '121181313', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Laparotomy - Follow up', '121181411', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - Laparotomy - Contraceptive Surgery', '121181413', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Female VSC - OTHER', '121181999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - Reversal', '122182112', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - Method Specific Counselling', '122182119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - Incisional vasectomy - Follow up (Sperm count)', '122182211', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - Incisional vasectomy - Contraceptive Surgery', '122182213', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Follow up (Sperm count)', '122182311', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Contraceptive Surgery', '122182313', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception Surgical - Male VSC - OTHER', '122182999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - Awareness-Based Methods - OTHER', '130190999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Method Specific Counselling', '131191119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Initial Consultation/Training', '131191210', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Follow up/Training', '131191211', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Calendar Based Method (CBM) - Initial Consultation/Training', '131191310', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Calendar Based Method (CBM) - Follow up/Training', '131191311', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Sympto-thermal method - Initial Consultation/Training', '131191410', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Sympto-thermal method - Follow up/Training', '131191411', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Standard days method - Initial Consultation/Training', '131191510', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Standard days method - Follow up/Training', '131191511', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Basal Body Temperature (BBT) - Initial Consultation/Training', '131191610', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception FAB Methods - Basal Body Temperature (BBT) - Follow up/Training', '131191611', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - FAB Methods - OTHER', '131191999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - FP General Counselling', '141200118', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - FP General Counselling - Combined Counselling (FP - HIV/AIDS incl. Dual protection', '141200218', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Contraception - FP General Counselling - OTHER', '141200999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Emergency Contraception Services - OTHER', '145210999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC - Counselling', '145211119', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC - Counselling - OTHER', '145211999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC - Combined Oral Contraceptives - Yuzpe - Contraceptive Supply (Treatment)', '145212110', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC - Combined Oral Contraceptives - Yuzpe - Follow Up', '145212111', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Progestogen Only Pills - Contraceptive Supply (Treatment)', '145212210', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Progestogen Only Pills - Follow Up', '145212211', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Dedicated Product - Contraceptive Supply (Treatment)', '145212310', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Dedicated Product - Follow Up', '145212311', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Copper releasing IUD - DIU Insertion (Treatment)', '145212410', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC Copper releasing IUD - Follow Up', '145212411', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'EC - Therapeutic - OTHER', '145212999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Services - OTHER', '252220999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Counselling - Pre - Abortion Counseling', '252221129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Counselling - Counselling on HIV Testing', '252221229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Counselling - OTHER', '252221999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - Exclusion of Anaemia (Haemoglobin/Hematocrit tests)', '252222121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - Tests for ABO and Rhesus (Rh) blood groups typing', '252222221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - Exclusion of ectopic pregnancy (through ultrasound)', '252222321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - Cervical cytology (Pap smear citology test)', '252222421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - HIV testing', '252222521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Diagnosis - OTHER', '252222999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Induced (Surgical) - Dilatation And Curettage (D&C)', '252223123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Induced (Surgical) - Dilatation And Evacuation (D&E) (2nd trimester of pregnancy)', '252223223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Induced (Surgical) - Manual Vacuum Aspiration (MVA)', '252223323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Induced (Surgical) - OTHER', '252223999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Care - Induced Abortion (Medical) - Pharmaceutical/Medical', '252224122', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Care - Induced Abortion (Medical) - OTHER', '252224999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion (Incomplete Abortion) - Surgical / D&C', '252225123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion (Incomplete Abortion) - Surgical / MVA', '252225223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion (Incomplete Abortion) - Medical / Pharmaceutical', '252225722', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion (Incomplete Abortion) - Surgical/Medical OTHER', '252225999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Care - Post - Follow-up incl. Uterine Involution Monitoring & Bimanual Pelvic Exam.', '252226120', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Care - Post - OTHER', '252226999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Counselling - Post Abortion Counseling - Including Family Planning', '252227129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Abortion Counselling - Post Abortion Counseling - OTHER', '252227999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Services - OTHER', '253230999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment- Anti Retro Viral (ARV)', '253231122', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment - Opportunistic Infection (OI)', '253231222', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment - Post Exposure Prophylaxis (PEP)', '253231322', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment - Psycho-Social Support', '253231422', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment - Home Care', '253231522', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Consult - Treatment - OTHER', '253231999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Antibody Lab Tests - ELISA (Blood) Test', '253232121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Antibody Lab Tests - Western Blot (WB) Assay', '253232221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Antibody Lab Tests - Indirect Immunofluorescence Assay (IFA)', '253232321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - Rapid Test (Murex-SUDS)', '253232421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - OTHER', '253232999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - Urine Test for HIV', '253233121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - Assessment of Immunologic Function (Viral Load)', '253233221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - Assessment of Immunologic Function (CD4 count)', '253233321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Other Lab Tests - OTHER', '253233999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Prevention Counselling', '253234129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Prevention Counselling - OTHER', '253234999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Counselling - PRE Voluntary Counselling & Testing (VCT)', '253235129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Counselling - POST Test (Positive) - Clients Only', '253235229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Counseling - POST Test (Negative)', '253235329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Counseling - POST Test (Positive) - Sexual Partners', '253235429', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'HIV/AIDS Counseling - OTHER', '253235999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Services - OTHER', '254240999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Counseling - Prevention Counseling', '254241129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Counseling - POST Test', '254241229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Counseling - OTHER', '254241999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Consultation - Follow Up', '254242120', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Consultation - OTHER', '254242999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Bacterial Vaginosis', '254243121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Candidiasis', '254243221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Chancroid', '254243321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Chlamydia', '254243421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Gonorrhea', '254243521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - OTHER', '254243999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Herpes Simplex (HSV)', '254244121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Human Papillomavirus (HPV)', '254244221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Syphilis', '254244321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Trichomoniasis', '254244421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Hepatitis B', '254244521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Test - Part I & II OTHER', '254244999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Treatment - Syndromic diagnosis with clinical treatment', '254245122', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Treatment - Etiological diagnosis with clinical treatment', '254245222', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'STI/RTI Treatment - OTHER', '254245999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Services - OTHER', '255250999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Biopsy - Conization', '255251123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Biopsy - Needle Biopsy', '255251223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Biopsy - Aspiration Biopsy', '255251323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Biopsy - Dilatation & Curretage (D&C)', '255251423', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Biopsy - OTHER', '255251999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Colposcopy', '255252123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Laparoscopy', '255252223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Hysteroscopy', '255252323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Culdoscopy', '255252423', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Hysteretomy', '255252523', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Ovariectomy', '255252623', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Mastectomy', '255252723', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - Lumpectomy', '255252823', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Endoscopy - OTHER', '255252999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - Radiography - Hysterosalpingography', '255253121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - Radiography - Mammography', '255253221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - Ultrasonography', '255253321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - Tomography', '255253421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - Dexa, Bone Density Scan', '255253521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Diagnostic Imaging - OTHER', '255253999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Exam - Manual Pelvic Exam (includes Palpation)', '255254121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Exam - Manual Breast Exam', '255254221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Exam - Vaginal Smears Sampling (Pap smear)', '255254321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Exam - Consultation without pelvic exam', '255254421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Exam - OTHER', '255254999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Lab Test - Cytology Analysis', '255255121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Lab Test - OTHER', '255255999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Therapies - Menopause Consultations, Hormonal Replacement Therapy', '255256122', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Therapies - Menstrual regulation', '255256222', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Therapies - Female Genital Mutilation Treatment of Complications', '255256322', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Therapies - OTHER', '255256999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Surgeries - Cryosurgery - Cervical', '255257123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Surgeries - Cauterization (Cervical / Vaginal)', '255257223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Surgeries - Female Genital Mutilation Reconstructive Surgery', '255257323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Surgeries - OTHER', '255257999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - Menopause Consultations, Counseling', '255258129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - Pap Smear, Importance (pre test guidance)', '255258229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - Pap Smear, Abnormal Results (post test follow-up guidance)', '255258329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - Breast Exam Results, Mammography/Biopsy', '255258429', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - Female Genital Mutilation', '255258529', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gynecological Counselling - OTHER', '255258999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetric Services - OTHER', '256260999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Diagnosis - Fetoscopy', '256261121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Diagnosis - Ultrasonography, Pre-natal', '256261221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Diagnosis - Pelvimetry', '256261321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Diagnosis - Placental Function Tests', '256261421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Diagnosis - OTHER', '256261999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Care - Uterine Monitoring', '256262121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Care - Fetal Monitoring', '256262221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Care - Immunisations', '256262422', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Care - OTHER', '256262999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Counselling - Pre Natal Care Info', '256263129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Counselling - Unplanned Pregnancy', '256263229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Counselling - HIV Prevention and Testing', '256263329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre natal Counselling - OTHER', '256263999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Lab Tests - Pregnancy Tests - Agglutination Inhibition - Urine 1 test', '256264121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Lab Tests - Pregnancy Tests - Radioimmunoasays - Blood test', '256264221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Lab Tests - Pregnancy Tests - OTHER', '256264999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Urine 1', '256265121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Glicemia de Jejum', '256265221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Hemoglobin (HB)', '256265321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Blood Type', '256265421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - VDRL', '256265521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - HIV', '256265621', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Amniocentesis', '256265721', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - Chorionic Villi Sampling', '256265821', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Pre-Natal Lab Tests - OTHER', '256265999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Surgery - Child Birth, Vaginal Delivery', '256267123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Surgery - Child Birth, Cesarean Delivery', '256267223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Surgery - Emergency Obstetric Care (EmOC)', '256267323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Surgery - OTHER', '256267999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post natal Care - Consultation including Uterine Involution Monitoring', '256268120', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post natal Care - OTHER', '256268999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post-Natal Counselling - FP Methods', '256269129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post-Natal Counselling - Breastfeeding Advice', '256269229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post-Natal Counselling - HIV Counselling', '256269329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Obstetrics - Post-Natal Counselling - OTHER', '256269999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Services - OTHER', '257270999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Endoscopy - Cystoscopy', '257271123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Endoscopy - Ureteroscopy', '257271223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Endoscopy - OTHER', '257271999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnostic Imaging - Urography', '257272121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnostic Imaging - OTHER', '257272999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnosis Other - Exam', '257273121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnosis Other - Prostate Cancer Screening', '257273221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnosis Other - Peniscopy', '257273321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnosis Other - Other Urogenital Services', '257273421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Diagnosis Other - OTHER', '257273999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Male Surgery - Biopsy', '257274123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Male Surgery - Circumcision', '257274223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Male Surgery - Other Surgical Services', '257274323', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Urological Male Surgery - OTHER', '257274999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility/Subfertility - OTHER', '258280999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Biopsy - Endometrial biopsy', '258281123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Biopsy - Testicular biopsy', '258281223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Biopsy - OTHER', '258281999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Endoscopy - Laparoscopy', '258282123', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Endoscopy - Histeroscopy', '258282223', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Endoscopy - OTHER', '258282999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Diagnostic Imaging - Histerosalpingography', '258283121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Diagnostic Imaging - Ovarian ultrasound', '258283221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Diagnostic Imaging - Transvaginal ecography', '258283321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Diagnostic Imaging - OTHER', '258283999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Post-coital test or Sims-Huhner test', '258284121', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Fallopian Tube Patency Tests', '258284221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Clomiphene citrate challenge test (CCCT)', '258284321', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Semen analysis', '258284421', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Basal Temperature', '258284521', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Mucose Analysis', '258284621', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Sperm Count', '258284721', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Spermiogram', '258284821', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - Hormonal analysis', '258284921', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Lab Test - OTHER', '258284999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Ovulation Induction', '258286122', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Embryo Transfer', '258286222', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Fertilization in Vitro', '258286322', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Gamete Intrafallopian Transfer', '258286422', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Artificial Insemination', '258286522', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Oocyte Donation', '258286622', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - Zygote Intrafallopian Transfer', '258286722', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility Treatment - OTHER', '258286999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility/Subfertility Consultation', '258288120', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility/Subfertility Consultation - OTHER', '258288999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility/Subfertility Counseling', '258289129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Infertility/Subfertility Counseling - OTHER', '258289999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Specialized Counselling Services - OTHER', '260290999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Individual Counseling', '261291129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Support Groups for Survivors', '261291229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Legal Counseling', '261291329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Intimate Partner Sexual Abuse', '261291429', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Intimate Partner Physical Abuse', '261291529', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Intimate Partner Emotional Abuse', '261291629', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - NonIntimate Partner Sexual Assalt/Rape', '261291729', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - Screening Only - Gender Based Violence (GBV)', '261291829', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - GBV - OTHER', '261291999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Domestic Violence, Child Abuse', '262292129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Domestic Violence, Screening Only Child Abuse', '262292229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Domestic Violence - OTHER', '262292999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Family - Parent/Child Relationship', '262293129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Family- Family Conflict', '262293229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Family, Delinquency', '262293329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Family - OTHER', '262293999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Pre-Marital including Pre-Marital Family Planning', '262294129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Marital - Relationship, Partner Negotiation', '262294229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Marital - Sexuality / Sexual Disfunction', '262294329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Marital - OTHER', '262294999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Youth - Life Skills Counseling', '262295129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Youth - Sexuality', '262295229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Youth - Telephone / Internet Hotline Counseling', '262295329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Youth - SRH Counselling', '262295429', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Youth - OTHER', '262295999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Male - SRH Counselling', '262296129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Male - Sexuality', '262296229', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Male - GBV', '262296329', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counselling - Male - OTHER', '262296999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counseling - Other - Sexuality Issues ( 25 years and over)', '263297129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Counseling - OTHER', '263297999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other SRH Medical Services - Consultation', '269298120', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other SRH Medical Services - Diagnostic Test', '269298221', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other SRH Medical Services - Therapy / Treatment', '269298322', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other SRH Medical Services - Surgery', '269298423', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other SRH Medical Services - OTHER', '269298999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Medical Specialties - System Oriented Services - OTHER', '371300999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Angiology - Consultation', '371301130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Angiology - Diagnostic Test', '371301231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Angiology - Therapy / Treatment', '371301332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Angiology - Surgery', '371301433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Angiology - OTHER', '371301999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Cardiology - Consultation', '371311130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Cardiology - Diagnostic EKG', '371311231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Cardiology - Therapy / Treatment', '371311332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Cardiology - Surgery', '371311433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Cardiology - OTHER', '371311999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry - Diagnosis', '371321131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry -Therapy / Treatment', '371321232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry - Orthodontics', '371321332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry - Periodontics', '371321432', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry - Surgery', '371321533', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dentistry - OTHER', '371321999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dermatology - Consultation', '371331130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dermatology - Diagnostic Test', '371331231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dermatology - Therapy / Treatment', '371331332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dermatology - Surgery', '371331433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Dermatology - OTHER', '371331999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Endocrinology - Consultation', '371341130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Endocrinology - Diagnostic Test', '371341231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Endocrinology - Therapy / Treatment', '371341332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Endocrinology - Surgery', '371341433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Endocrinology - OTHER', '371341999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gastroenterology - Consultation', '371351130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gastroenterology - Diagnostic Test', '371351231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gastroenterology - Therapy / Treatment', '371351332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gastroenterology - Surgery', '371351433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Gastroenterology - OTHER', '371351999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Genetics - Counselling', '371361129', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Genetics - Consultation', '371361230', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Genetics - Diagnostic Test', '371361331', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Genetics - Therapy / Treatment', '371361432', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Genetics - OTHER', '371361999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Nephrology - Consultation', '371371130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Nephrology - Diagnostic Test', '371371231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Nephrology - Therapy / Treatment', '371371332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Nephrology - Surgery', '371371433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Nephrology - OTHER', '371371999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neumology - Consultation', '371381130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neumology - Diagnostic Test', '371381231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neumology - Therapy / Treatment', '371381332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neumology - Surgery', '371381433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neumology - OTHER', '371381999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neurology - Consultation', '371391130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neurology - Diagnostic Exam', '371391231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neurology - Therapy / Treatment', '371391332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neurology - Surgery', '371391433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Neurology - OTHER', '371391999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Ophtalmology - Consultation', '371401130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Ophtalmology - Diagnostic Exam', '371401231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Ophtalmology - Therapy / Treatment', '371401332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Ophtalmology - Surgery', '371401433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Ophtalmology - OTHER', '371401999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Orthopedics - Consultation', '371411130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Orthopedics - Diagnostic Exam', '371411231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Orthopedics - Therapy / Treatment', '371411332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Orthopedics - Surgery', '371411433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Orthopedics - OTHER', '371411999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Othorhinolaringology - Consultation', '371421130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Othorhinolaringology - Diagnostic Exam', '371421231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Othorhinolaringology - Therapy / Treatment', '371421332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Othorhinolaringology - Surgery', '371421433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Othorhinolaringology - OTHER', '371421999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Podology - Consultation', '371431130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Podology - Diagnostic Exam', '371431231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Podology - Therapy / Treatment', '371431332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Podology - Surgery', '371431433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Podology - OTHER', '371431999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rheumatology - Consultation', '371441130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rheumatology - Diagnostic Exam', '371441231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rheumatology - Therapy / Treatment', '371441332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rheumatology - Surgery', '371441433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rheumatology - OTHER', '371441999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Medical Specialties - Disease Oriented Services - OTHER', '372500999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Optometry - Consultation', '372501130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Optometry - Diagnostic Exam', '372501231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Optometry - OTHER', '372501999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychiatry - Diagnostic consultation', '372511131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychiatry - Therapy / Treatment', '372511232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychiatry - OTHER', '372511999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychology - Diagnostic consultation', '372521131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychology - Therapy / Treatment', '372521232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Psychology - OTHER', '372521999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Radiology - Diagnostic Imaging', '372531131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Radiology - Therapy / Treatment', '372531232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Radiology - OTHER', '372531999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Oncology - Diagnostic Test', '372541131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Oncology - Therapy / Treatment', '372541232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Oncology - Surgery', '372541333', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Oncology - OTHER', '372541999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Allergy - Consultation', '372551130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Allergy - Diagnostic Test', '372551231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Allergy - Therapy / Treatment', '372551332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Allergy - OTHER', '372551999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Immunology - Consultation', '372561130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Immunology - Diagnostic Test', '372561231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Immunology - OTHER', '372561999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Medical Specialties - Community Oriented Services - OTHER', '373600999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Hypertension Screening', '373601131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Physical Exam', '373601231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Weight & Vital Signs', '373601331', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Diabetes Screening', '373601431', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Urinalysis', '373601531', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Cholesterol screening', '373601631', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Nutrition Counseling', '373601729', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - Diet/Weight Control Counseling', '373601829', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Family Health - OTHER', '373601999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Geriatrics - Consultation', '373621130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Geriatrics - Diagnostic Test', '373621231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Geriatrics - Therapy / Treatment', '373621332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Geriatrics - OTHER', '373621999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Consultation', '373641130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Diagnostic - Neonatal Screening (at Birth)', '373641231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Diagnostic - Well Baby Care / Infant Health Check', '373641331', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Therapy / Treatment - Nutrition', '373641432', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Therapy / Treatment - Immunization', '373641532', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Therapy / Treatment - Oral rehydration (ORT/ORS)', '373641632', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Therapy / Treatment - Neonatal Intensive Care', '373641732', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - Surgery - Circumcision', '373641833', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pediatrics - OTHER', '373641999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Physical Medicine & Rehabilitation - Consultation', '373661130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Physical Medicine & Rehabilitation - Diagnostic Test', '373661231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Physical Medicine & Rehabilitation - Therapy / Treatment', '373661332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Physical Medicine & Rehabilitation - Surgery', '373661433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Physical Medicine & Rehabilitation - OTHER', '373661999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Preventive Medicine - Consultation', '373671130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Preventive Medicine - Diagnostic Test', '373671231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Preventive Medicine - OTHER', '373671999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Emergency Medicine - Evaluation', '373681131', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Emergency Medicine - Initial Treatment', '373681232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Emergency Medicine - Emergency Surgery', '373681333', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Emergency Medicine - OTHER', '373681999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hospitalization - Ambulatory (1 day)', '373691140', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hospitalization - Extended (>1day)', '373691241', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hospitalization - OTHER', '373691999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Medical Specialties - Diagnostic/Therapeutic Procedures - OTHER', '374700999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hematology - Consultation', '374701130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hematology - Diagnostic Test', '374701231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hematology - Therapy / Treatment', '374701332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Hematology - OTHER', '374701999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Toxicology - Consultation', '374721130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Toxicology - Diagnostic tests', '374721231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Toxicology - Therapy / Treatment', '374721332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Toxicology - OTHER', '374721999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chemical Patology - Consultation', '374741130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chemical Patology - Diagnostic Test', '374741231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chemical Patology - OTHER', '374751999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pathology - Consultation', '374761130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pathology - Diagnostic Test', '374761231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Pathology - OTHER', '374761999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Microbiology - Consultation', '374781130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Microbiology - Diagnostic Test', '374781231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Microbiology - OTHER', '374781999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Medical Specialties - Other Services - OTHER', '375800999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chiropractice - Consultation', '375801130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chiropractice - Therapy / Treatment', '375801232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Chiropractice - OTHER', '375801999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Osteophaty - Consultation', '375811130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Osteophaty - Therapy / Treatment', '375811232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Osteophaty - Diagnostic Test', '375811331', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Osteophaty - OTHER', '375811999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Plastic Surgery - Consultation', '375821130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Plastic Surgery - Therapy / Treatment', '375821232', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Plastic Surgery - Surgery', '375821333', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Plastic Surgery - OTHER', '375821999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - Consultation', '375831130', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - Diagnostic Test', '375831231', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - Therapy / Treatment', '375831332', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - Surgery', '375831433', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - Counselling', '375831539', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non SRH Medical Services - OTHER', '375831999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'ALL OTHER NON SRH SERVICES - OTHER', '380910999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Sales & Rentals - OTHER', '380911999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Sales of Medicines', '381912150', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Sales Medical Supplies', '381912250', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Sales Medical Equipment', '381912350', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Sales - OTHER', '381913999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rental Medical Infrastructure', '382914450', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rental Medical Infrastructure', '382914450', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Rental Medical Equipment / Infrastructure - OTHER', '382915999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non Medical Products & Services - Sales of IEC Materials', '491990190', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non Medical Products & Services - Other Generic Products', '491990999', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non Medical Products & Services - Sales of IEC Services', '492992090', 11, '' ); -INSERT INTO codes ( code_text, code, code_type, modifier ) VALUES ( 'Other Non Medical Products & Services - OTHER', '492992999', 11, '' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '110000000', '', 'FAMILY PLANNING METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100000', '', 'CONTRACEPTIVES - ORAL CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100119', '', 'Contraceptives - Oral Contraceptives - OC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100999', '', 'Contraceptives - Oral Contraceptives - OC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101000', '', 'CONTRACEPTIVES - COMBINED & PROGESTOGEN-ONLY ORAL CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101110', '', 'Contraceptives - Oral Contraceptives - COC & POC - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101111', '', 'Contraceptives - Oral Contraceptives - COC & POC - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101999', '', 'Contraceptives - Oral Contraceptives - COC & POC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110000', '', 'CONTRACEPTIVES - INJECTABLE CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110119', '', 'Contraceptives - Injectable Contraceptives - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110999', '', 'Contraceptives - Injectable Contraceptives - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111000', '', 'CONTRACEPTIVES - COMBINED INJECTABLE CONTRACEPTIVES - CIC' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111110', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111111', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111999', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112000', '', 'CONTRACEPTIVES - PROGESTOGEN ONLY INJECTABLES (2 MONTHS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112110', '', 'Contraceptives - Progestogen Only Injectables (2 months) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112111', '', 'Contraceptives - Progestogen Only Injectables (2 months) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112999', '', 'Contraceptives - Progestogen Only Injectables (2 months) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113000', '', 'CONTRACEPTIVES - PROGESTOGEN ONLY INJECTABLES (3 MONTHS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113110', '', 'Contraceptives - Progestogen Only Injectables (3 months) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113111', '', 'Contraceptives - Progestogen Only Injectables (3 months) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113999', '', 'Contraceptives - Progestogen Only Injectables (3 months) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120112', '', 'Contraceptives - Subdermal Implants - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120119', '', 'Contraceptives - Subdermal Implants - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120999', '', 'Contraceptives - Subdermal Implants - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 6 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122110', '', 'Contraceptives - Subdermal implants 6 rods - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122111', '', 'Contraceptives - Subdermal implants 6 rods - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122999', '', 'Contraceptives - Subdermal implants 6 rods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 2 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123110', '', 'Contraceptives - Subdermal implants 2 rods - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123111', '', 'Contraceptives - Subdermal implants 2 rods - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123999', '', 'Contraceptives - Subdermal implants 2 rods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 1 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124110', '', 'Contraceptives - Subdermal implants 1 rod - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124111', '', 'Contraceptives - Subdermal implants 1 rod - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124999', '', 'Contraceptives - Subdermal implants 1 rod - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111130000', '', 'CONTRACEPTIVES - OTHER HORMONAL METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111130999', '', 'Contraceptives - Other hormonal methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132000', '', 'CONTRACEPTIVES - OTHER - TRANSDERMAL PATCH (1 month)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132110', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132111', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132119', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132999', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133000', '', 'CONTRACEPTIVES - OTHER - VAGINAL RING (1 month)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133110', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133111', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133119', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133999', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112140000', '', 'CONTRACEPTIVES - CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112140999', '', 'Contraceptives - Condoms (Male and Female) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141000', '', 'CONTRACEPTIVES - MALE CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141110', '', 'Contraceptives - Condoms - Male Condom - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141111', '', 'Contraceptives - Condoms - Male Condom - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141119', '', 'Contraceptives - Condoms - Male Condom - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141999', '', 'Contraceptives - Condoms - Male Condom - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142000', '', 'CONTRACEPTIVES - FEMALE CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142110', '', 'Contraceptives - Condoms - Female Condom - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142111', '', 'Contraceptives - Condoms - Female Condom - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142119', '', 'Contraceptives - Condoms - Female Condom - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142999', '', 'Contraceptives - Condoms - Female Condom - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150000', '', 'CONTRACEPTIVES - TYPES OF DIAPHRAGMS / CERVICAL CAPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150119', '', 'Contraceptives - Diaphragm / Cervical Cap - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150999', '', 'Contraceptives - Diaphragm / Cervical Cap - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151000', '', 'CONTRACEPTIVES - DIAPHRAGMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151110', '', 'Contraceptives - Diaphragm - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151111', '', 'Contraceptives - Diaphragm - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151999', '', 'Contraceptives - Diaphragm - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152000', '', 'CONTRACEPTIVES - CERVICAL CAPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152010', '', 'Contraceptives - Cervical Cap - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152011', '', 'Contraceptives - Cervical Cap - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152999', '', 'Contraceptives - Cervical Cap - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160000', '', 'CONTRACEPTIVES - SPERMICIDES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160119', '', 'Contraceptives - Spermicides - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160999', '', 'Contraceptives - Spermicides - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM TABS/TUBE/SUPPOSITIORIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161110', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161111', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161999', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM TAB/STRIPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162110', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162111', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162999', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM CANS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163110', '', 'Contraceptives - Spermicides - Foam Cans - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163111', '', 'Contraceptives - Spermicides - Foam Cans - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163999', '', 'Contraceptives - Spermicides - Foam Cans - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164000', '', 'CONTRACEPTIVES - SPERMICIDES - CREAM & JELLY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164110', '', 'Contraceptives - Spermicides - Cream & Jelly - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164111', '', 'Contraceptives - Spermicides - Cream & Jelly - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164999', '', 'Contraceptives - Spermicides - Cream & Jelly - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165000', '', 'CONTRACEPTIVES - SPERMICIDES - PESSARIES / C-FILM' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165110', '', 'Contraceptives - Spermicides - Pessaries / C-film - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165111', '', 'Contraceptives - Spermicides - Pessaries / C-film - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165999', '', 'Contraceptives - Spermicides - Pessaries / C-film - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170000', '', 'CONTRACEPTIVES - IUD' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170112', '', 'Contraceptives - IUD - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170119', '', 'Contraceptives - IUD - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170999', '', 'Contraceptives - IUD - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171000', '', 'CONTRACEPTIVES - IUD (5 years)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171110', '', 'Contraceptives - IUD (5 years) - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171111', '', 'Contraceptives - IUD (5 years) - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171999', '', 'Contraceptives - IUD (5 years) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172000', '', 'CONTRACEPTIVES - IUD (10 years)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172110', '', 'Contraceptives - IUD (10 years) - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172111', '', 'Contraceptives - IUD (10 years) - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172999', '', 'Contraceptives - IUD (10 years) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '120180000', '', 'CONTRACEPTION - VOLUNTARY SURGICAL CONTRACEPTION (VSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '120180999', '', 'Contraception - Voluntary Surgical Contraception (VSC) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181000', '', 'CONTRACEPTION - FEMALE VOLUNTARY SURGICAL CONTRACEPTION (FVSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181112', '', 'Contraception Surgical - Female VSC - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181119', '', 'Contraception Surgical - Female VSC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181211', '', 'Contraception Surgical - Female VSC - Minilaparatomy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181213', '', 'Contraception Surgical - Female VSC - Minilaparatomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181311', '', 'Contraception Surgical - Female VSC - Laparoscopy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181313', '', 'Contraception Surgical - Female VSC - Laparoscopy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181411', '', 'Contraception Surgical - Female VSC - Laparotomy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181413', '', 'Contraception Surgical - Female VSC - Laparotomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181999', '', 'Contraception Surgical - Female VSC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182000', '', 'CONTRACEPTION - MALE VOLUNTARY SURGICAL CONTRACEPTION (MVSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182112', '', 'Contraception Surgical - Male VSC - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182119', '', 'Contraception Surgical - Male VSC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182211', '', 'Contraception Surgical - Male VSC - Incisional vasectomy - Follow up (Sperm count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182213', '', 'Contraception Surgical - Male VSC - Incisional vasectomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182311', '', 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Follow up (Sperm count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182313', '', 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182999', '', 'Contraception Surgical - Male VSC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '130190000', '', 'CONTRACEPTION - AWARENESS-BASED METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '130190999', '', 'Contraception - Awareness-Based Methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191000', '', 'CONTRACEPTION - FERTILITY AWARENESS-BASED METHODS (FABM)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191119', '', 'Contraception FAB Methods - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191210', '', 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191211', '', 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191310', '', 'Contraception FAB Methods - Calendar Based Method (CBM) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191311', '', 'Contraception FAB Methods - Calendar Based Method (CBM) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191410', '', 'Contraception FAB Methods - Sympto-thermal method - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191411', '', 'Contraception FAB Methods - Sympto-thermal method - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191510', '', 'Contraception FAB Methods - Standard days method - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191511', '', 'Contraception FAB Methods - Standard days method - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191610', '', 'Contraception FAB Methods - Basal Body Temperature (BBT) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191611', '', 'Contraception FAB Methods - Basal Body Temperature (BBT) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191999', '', 'Contraception - FAB Methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200000', '', 'FAMILY PLANNING GENERAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200118', '', 'Contraception - FP General Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200218', '', 'Contraception - FP General Counselling - Combined Counselling (FP - HIV/AIDS incl. Dual protection' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200999', '', 'Contraception - FP General Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145210000', '', 'EMERGENCY CONTRACEPTION SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145210999', '', 'Emergency Contraception Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211000', '', 'EC - COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211119', '', 'EC - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211999', '', 'EC - Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212000', '', 'EC - THERAPEUTIC' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212110', '', 'EC - Combined Oral Contraceptives - Yuzpe - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212111', '', 'EC - Combined Oral Contraceptives - Yuzpe - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212210', '', 'EC Progestogen Only Pills - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212211', '', 'EC Progestogen Only Pills - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212310', '', 'EC Dedicated Product - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212311', '', 'EC Dedicated Product - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212410', '', 'EC Copper releasing IUD - DIU Insertion (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212411', '', 'EC Copper releasing IUD - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212999', '', 'EC - Therapeutic - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '250000000', '', 'SRH (NON FAMILY PLANNING) SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252220000', '', 'ABORTION SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252220999', '', 'Abortion Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221000', '', 'ABORTION / PRE ABORTION COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221129', '', 'Abortion / Pre Abortion Counselling - Pregnancy options Counseling - Including Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221229', '', 'Abortion / Pre Abortion Counselling - Counselling on HIV Testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221329', '', 'Abortion / Pre Abortion Counselling Harm Reduction Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221999', '', 'Abortion / Pre Abortion Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222000', '', 'ABORTION / PRE-ABORTION DIAGNOSTICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222121', '', 'Abortion Diagnosis - Exclusion of Anaemia (Haemoglobin and/or Hematocrit tests)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222221', '', 'Abortion Diagnosis - Tests for ABO and Rhesus (Rh) blood groups typing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222321', '', 'Abortion Diagnosis - Exclusion of ectopic pregnancy (through ultrasound)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222421', '', 'Abortion Diagnosis - Cervical cytology (Pap test or visual acid test)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222521', '', 'Abortion Diagnosis - HIV testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222999', '', 'Abortion Diagnosis - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223000', '', 'ABORTION / INDUCED - SURGICAL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223123', '', 'Abortion Induced (Surgical) - Dilatation And Curettage (D&C)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223223', '', 'Abortion Induced (Surgical) - Dilatation And Evacuation (D&E) (2nd trimester of pregnancy)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223323', '', 'Abortion Induced (Surgical) - Vacuum Aspiration (Manual or Electrical)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223999', '', 'Abortion Induced (Surgical) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224000', '', 'ABORTION (MEDICAL)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224122', '', 'Abortion Induced (Medical) - Drug induced (combination of mifepristone and misopristol))' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224222', '', 'Abortion Induced (Medical) - Drug induced (Misoprostol Only)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224999', '', 'Abortion Induced (Medical) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225000', '', 'ABORTION / INCOMPLETE ABORTION TREATMENT (SURGICAL/MEDICAL)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225123', '', 'Abortion (Incomplete Abortion) - Surgical treatment / D&C or D&E' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225223', '', 'Abortion (Incomplete Abortion) - Surgical treatment / Vacuum aspiration' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225722', '', 'Abortion (Incomplete Abortion) - Medical treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225999', '', 'Abortion (Incomplete Abortion) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226000', '', 'ABORTION / POST ABORTION FOLLOW UP' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226120', '', 'Abortion - Post - Follow-up incl. Uterine Involution Monitoring & Bimanual Pelvic Exam.' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226999', '', 'Abortion - Post Abortion Follow-up - OTHER (including treatment of complications)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227000', '', 'ABORTION / POST ABORTION COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227129', '', 'Abortion Counselling - Post Abortion Counseling - Including Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227229', '', 'Abortion Counselling Harm Reduction Follow-up Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227999', '', 'Abortion Counselling - Post Abortion Counseling and family planning counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253230000', '', 'HIV and AIDS SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253230999', '', 'HIV and AIDS Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231000', '', 'HIV and AIDS TREATMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231122', '', 'HIV and AIDS - Treatment- Anti Retro Viral (ARV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231222', '', 'HIV and AIDS - Treatment - Opportunistic Infection (OI)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231322', '', 'HIV and AIDS - Treatment - Post Exposure Prophylaxis (PEP)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231422', '', 'HIV and AIDS - Treatment - Psycho-Social Support' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231522', '', 'HIV and AIDS - Treatment - Home Care' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231999', '', 'HIV and AIDS - Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232000', '', 'HIV and AIDS DIAGNOSTIC LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232121', '', 'HIV and AIDS Diagnostic Lab Tests - ELISA (Blood) Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232221', '', 'HIV and AIDS Diagnostic Lab Tests - Western Blot (WB) Assay' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232321', '', 'HIV and AIDS Diagnostic Lab Tests - Indirect Immunofluorescence Assay (IFA)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232421', '', 'HIV and AIDS Diagnostic Lab Tests - Rapid Test (Murex-SUDS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232521', '', 'HIV and AIDS Diagnostic Lab tests - Urine Test for HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232999', '', 'HIV and AIDS Lab Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233000', '', 'HIV and AIDS STAGING AND MONITORING TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233121', '', 'HIV and AIDS Other Lab Tests - Urine Test for HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233221', '', 'HIV and AIDS Staging and monitoring Tests - Assessment of Immunologic Function (Viral Load)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233321', '', 'HIV and AIDS Staging and monitoring Tests - Assessment of Immunologic Function (CD4 count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233999', '', 'HIV and AIDS Staging and monitoring Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234000', '', 'HIV and AIDS PREVENTION COUNSELING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234129', '', 'HIV and AIDS Prevention Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234999', '', 'HIV and AIDS Prevention Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235000', '', 'HIV and AIDS PRE/POST TEST COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235129', '', 'HIV and AIDS Counselling - PRE Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235229', '', 'HIV and AIDS Counselling - POST Test (Positive) - Clients Only' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235329', '', 'HIV and AIDS Counseling - POST Test (Negative)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235429', '', 'HIV and AIDS Counseling - POST Test (Positive) - Sexual Partners' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235529', '', 'HIV and AIDS Counselling - POST Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235999', '', 'HIV and AIDS Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254240000', '', 'STI/RTI SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254240999', '', 'STI/RTI Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241000', '', 'STI/RTI PREVENTION / POST TEST COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241129', '', 'STI/RTI Counseling - Prevention Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241229', '', 'STI/RTI Counseling - POST Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241999', '', 'STI/RTI Prevention / Post Test Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242000', '', 'STI/RTI CONSULTATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242120', '', 'STI/RTI Consultation - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242999', '', 'STI/RTI Consultation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243000', '', 'STI/RTI LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243121', '', 'STI/RTI Test - Bacterial Vaginosis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243221', '', 'STI/RTI Test - Candidiasis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243321', '', 'STI/RTI Test - Chancroid' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243421', '', 'STI/RTI Test - Chlamydia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243521', '', 'STI/RTI Test - Gonorrhea' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243999', '', 'STI/RTI Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244000', '', 'STI/RTI LAB TESTS (CONTINUED)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244121', '', 'STI/RTI Test - Herpes Simplex (HSV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244221', '', 'STI/RTI Test - Human Papillomavirus (HPV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244321', '', 'STI/RTI Test - Syphilis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244421', '', 'STI/RTI Test - Trichomoniasis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244521', '', 'STI/RTI Test - Hepatitis A and B' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244621', '', 'STI/RTI Test - Hepatitis A' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244721', '', 'STI/RTI Test - Hepatitis B' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244999', '', 'STI/RTI Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245000', '', 'STI/RTI TREATMENT (including prophylactics)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245122', '', 'STI/RTI Treatment - based on syndromic approach' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245222', '', 'STI/RTI Treatment - Etiological diagnosis with clinical treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245322', '', 'STI/RTI Treatment - Hepatitis A vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245422', '', 'STI/RTI Treatment - Hepatitis B vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245522', '', 'STI/RTI Treatment - HPV vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245999', '', 'STI/RTI Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246000', '', 'STI/RTI TREATMENT 1' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246122', '', 'STI Treatment for Bacterial Vaginosis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246222', '', 'STI Treatment for Candidiasis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246322', '', 'STI Treatment for Chancroid based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246422', '', 'STI Treatment for Chlamydia based on positive lab tes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246522', '', 'STI Treatment for Gonorrhea based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247000', '', 'STI/RTI TREATMENT 2' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247122', '', 'STI Treatment for Herpes Simplex (HSV) based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247222', '', 'STI Treatment for Human Papillomavirus (HPV) based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247322', '', 'STI Treatment for Syphilis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247422', '', 'STI Treatment for Trichomoniasis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247522', '', 'STI Treatment for Hepatitis A based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247622', '', 'STI Treatment for Hepatitis B based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247999', '', 'STI/RTI Treatment based on laboratory diagnostic tests -OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255250000', '', 'GYNECOLOGICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255250999', '', 'Gynecological Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251000', '', 'GYNECOLOGICAL BIOPSY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251123', '', 'Gynecological Biopsy - Conization' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251223', '', 'Gynecological Biopsy - Needle Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251323', '', 'Gynecological Biopsy - Aspiration Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251423', '', 'Gynecological Biopsy - Dilatation & Curretage (D&C)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251999', '', 'Gynecological Biopsy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252000', '', 'GYNECOLOGICAL ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252123', '', 'Gynecological Endoscopy - Colposcopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252223', '', 'Gynecological Endoscopy - Laparoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252323', '', 'Gynecological Endoscopy - Hysteroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252423', '', 'Gynecological Endoscopy - Culdoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252523', '', 'Gynecological Endoscopy - Hysteretomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252623', '', 'Gynecological Endoscopy - Ovariectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252723', '', 'Gynecological Endoscopy - Mastectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252823', '', 'Gynecological Endoscopy - Lumpectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252999', '', 'Gynecological Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253000', '', 'GYNECOLOGICAL DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253121', '', 'Gynecological Diagnostic Imaging - Radiography - Hysterosalpingography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253221', '', 'Gynecological Diagnostic Imaging - Radiography - Mammography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253321', '', 'Gynecological Diagnostic Imaging - Ultrasonography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253421', '', 'Gynecological Diagnostic Imaging - Tomography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253521', '', 'Gynecological Diagnostic Imaging - Dexa, Bone Density Scan' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253999', '', 'Gynecological Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254000', '', 'GYNECOLOGICAL EXAM DIAGNOSIS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254121', '', 'Gynecological Exam - Manual Pelvic Exam (includes Palpation)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254221', '', 'Gynecological Exam - Manual Breast Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254321', '', 'Gynecological Exam - Cervical cancer screening (Pap smear)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254421', '', 'Gynecological Exam - Consultation without pelvic exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254521', '', 'Gynecological Exam Cervical cancer screening Visual Inspection (VIA or VILI)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254621', '', 'Gynecological Exam Cervical cancer screening - Liquid-based cytology (sampling procedure)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254721', '', 'Gynecological Exam Cervical cancer screening - HPV DNA test (sampling procedure)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254999', '', 'Gynecological Exam - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255000', '', 'GYNECOLOGICAL CYTOLOGIC TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255121', '', 'Gynecological Lab Test - Cytology Analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255221', '', 'Gynecological Lab Test - Cytology Analysis - Liquid-based cytology' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255321', '', 'Gynecological Lab Test -Cervical cancer screening - HPV DNA test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255999', '', 'Gynecological Lab Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256000', '', 'GYNECOLOGICAL THERAPIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256122', '', 'Gynecological Therapies - Menopause Consultations, Hormonal Replacement Therapy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256222', '', 'Gynecological Therapies - Menstrual regulation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256322', '', 'Gynecological Therapies - Female Genital Mutilation Treatment of Complications' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256422', '', 'Gynecological Therapies Treatment of erratic menstruation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256999', '', 'Gynecological Therapies - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257000', '', 'GYNECOLOGICAL SURGERIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257123', '', 'Gynecological Surgeries - Cryosurgery - Cervical' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257223', '', 'Gynecological Surgeries - Cauterization (Cervical / Vaginal)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257323', '', 'Gynecological Surgeries - Female Genital Mutilation Reconstructive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257999', '', 'Gynecological Surgeries - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258000', '', 'GYNECOLOGICAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258129', '', 'Gynecological Counselling - Menopause Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258229', '', 'Gynecological Counselling - Pap Smear - Pre-test counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258329', '', 'Gynecological Counselling - Pap Smear, Abnormal Results (post test follow-up)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258429', '', 'Gynecological Counselling - Breast Exam Results, Mammography/Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258529', '', 'Gynecological Counselling - Female Genital Mutilation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258629', '', 'Gynecological Counselling- Pap smear - Post-test counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258999', '', 'Gynecological Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256260000', '', 'OBSTETRICS SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256260999', '', 'Obstetric Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261000', '', 'OBSTETRICS - PRE NATAL DIAGNOSTIC PROCEDURES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261121', '', 'Obstetrics - Pre-Natal Diagnostic - Fetoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261221', '', 'Obstetrics - Pre-Natal Diagnostic - Ultrasonography, Pre-natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261321', '', 'Obstetrics - Pre-Natal Diagnostic - Pelvimetry' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261421', '', 'Obstetrics - Pre-Natal Diagnostic - Placental Function Tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261999', '', 'Obstetrics - Pre-Natal Diagnostic - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262000', '', 'OBSTETRICS - PRE NATAL CARE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262121', '', 'Obstetrics - Pre natal Care - Uterine Monitoring' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262221', '', 'Obstetrics - Pre natal Care - Fetal Monitoring' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262422', '', 'Obstetrics - Pre natal Care - Immunisations' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262999', '', 'Obstetrics - Pre natal Care - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263000', '', 'OBSTETRICS - PRE NATAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263129', '', 'Obstetrics - Pre natal Counselling - Pre Natal Care Info' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263229', '', 'Obstetrics - Pre natal Counselling - Unplanned Pregnancy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263329', '', 'Obstetrics - Pre natal Counselling - HIV Prevention and Testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263999', '', 'Obstetrics - Pre natal Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264000', '', 'OBSTETRICS - PREGNANCY TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264121', '', 'Obstetrics - Pregnancy Tests - Agglutination Inhibition - Urine 1 test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264221', '', 'Obstetrics - Pregnancy Tests - Radioimmunoasays - Blood test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264999', '', 'Obstetrics - Pregnancy Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265000', '', 'OBSTETRICS - PRE NATAL LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265121', '', 'Obstetrics - Pre-Natal Lab Tests - Urine 1' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265221', '', 'Obstetrics - Pre-Natal Lab Tests - Fasting blood sugar' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265321', '', 'Obstetrics - Pre-Natal Lab Tests - Hemoglobin (HB)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265421', '', 'Obstetrics - Pre-Natal Lab Tests - Blood Type' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265521', '', 'Obstetrics - Pre-Natal Lab Tests - VDRL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265621', '', 'Obstetrics - Pre-Natal Lab Tests - HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265721', '', 'Obstetrics - Pre-Natal Lab Tests - Amniocentesis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265821', '', 'Obstetrics - Pre-Natal Lab Tests - Chorionic Villi Sampling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265999', '', 'Obstetrics - Pre-Natal Lab Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267000', '', 'OBSTETRICS - CHILD BIRTH' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267123', '', 'Obstetrics - Child Birth, Vaginal Delivery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267223', '', 'Obstetrics - Child Birth, Cesarean Delivery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267323', '', 'Obstetrics - Emergency Obstetric Care (EmOC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267999', '', 'Obstetrics - Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268000', '', 'OBSTETRICS - POST NATAL CARE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268120', '', 'Obstetrics - Post natal Care - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268999', '', 'Obstetrics - Post natal Care - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269000', '', 'OBSTETRICS - POST NATAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269129', '', 'Obstetrics - Post-Natal Counselling - FP Methods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269229', '', 'Obstetrics - Post-Natal Counselling - Breastfeeding Advice' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269329', '', 'Obstetrics - Post-Natal Counselling - HIV Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269999', '', 'Obstetrics - Post-Natal Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257270000', '', 'UROLOGICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257270999', '', 'Urological Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271000', '', 'UROLOGICAL ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271123', '', 'Urological Endoscopy - Cystoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271223', '', 'Urological Endoscopy - Ureteroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271999', '', 'Urological Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272000', '', 'UROLOGICAL DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272121', '', 'Urological Diagnostic Imaging - Urography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272999', '', 'Urological Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273000', '', 'UROLOGICAL DIAGNOSIS (OTHER )' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273121', '', 'Urological Diagnosis Other - Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273221', '', 'Urological Diagnosis Other - Prostate Cancer Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273321', '', 'Urological Diagnosis Other - Peniscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273421', '', 'Urological Diagnosis Other - Other Urogenital Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273999', '', 'Urological Diagnosis Other - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274000', '', 'UROLOGICAL SURGERY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274123', '', 'Urological Male Surgery - Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274223', '', 'Urological Male Surgery - Circumcision' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274323', '', 'Urological Male Surgery - Other Surgical Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274999', '', 'Urological Male Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258280000', '', 'INFERTILITY SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258280999', '', 'Infertility/Subfertility - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281000', '', 'INFERTILITY BIOPSY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281123', '', 'Infertility Biopsy - Endometrial biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281223', '', 'Infertility Biopsy - Testicular biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281999', '', 'Infertility Biopsy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282000', '', 'INFERTILITY ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282123', '', 'Infertility Endoscopy - Laparoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282223', '', 'Infertility Endoscopy - Histeroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282999', '', 'Infertility Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283000', '', 'INFERTILITY DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283121', '', 'Infertility Diagnostic Imaging - Histerosalpingography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283221', '', 'Infertility Diagnostic Imaging - Ovarian ultrasound' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283321', '', 'Infertility Diagnostic Imaging - Transvaginal ecography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283999', '', 'Infertility Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284000', '', 'INFERTILITY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284121', '', 'Infertility Lab Test - Post-coital test or Sims-Huhner test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284221', '', 'Infertility Lab Test - Fallopian Tube Patency Tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284321', '', 'Infertility Lab Test - Clomiphene citrate challenge test (CCCT)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284421', '', 'Infertility Lab Test - Semen analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284521', '', 'Infertility Lab Test - Basal Temperature' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284621', '', 'Infertility Lab Test - Mucose Analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284721', '', 'Infertility Lab Test - Sperm Count' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284821', '', 'Infertility Lab Test - Spermiogram' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284921', '', 'Infertility Lab Test - Hormonal analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284999', '', 'Infertility Lab Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286000', '', 'INFERTILITY TREATMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286122', '', 'Infertility Treatment - Ovulation Induction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286222', '', 'Infertility Treatment - Embryo Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286322', '', 'Infertility Treatment - Fertilization in Vitro' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286422', '', 'Infertility Treatment - Gamete Intrafallopian Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286522', '', 'Infertility Treatment - Artificial Insemination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286622', '', 'Infertility Treatment - Oocyte Donation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286722', '', 'Infertility Treatment - Zygote Intrafallopian Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286999', '', 'Infertility Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288000', '', 'INFERTILITY CONSULTATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288120', '', 'Infertility/Subfertility Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288999', '', 'Infertility/Subfertility Consultation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289000', '', 'INFERTILITY COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289129', '', 'Infertility/Subfertility Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289999', '', 'Infertility/Subfertility Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '260290000', '', 'OTHER SPECIALIZED COUNSELLING SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '260290999', '', 'Other Specialized Counselling Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291000', '', 'COUNSELLING - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291129', '', 'Counselling - GBV - Individual Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291229', '', 'Counselling - GBV - Support Groups for Survivors' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291329', '', 'Counselling - GBV - Legal Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291429', '', 'Counselling - GBV - Intimate Partner Sexual Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291529', '', 'Counselling - GBV - Intimate Partner Physical Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291629', '', 'Counselling - GBV - Intimate Partner Emotional Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291729', '', 'Counselling - GBV - NonIntimate Partner Sexual Assalt/Rape' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291829', '', 'Counselling - GBV - Screening Only' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291999', '', 'Counselling - GBV - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292000', '', 'COUNSELLING - DOMESTIC VIOLENCE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292129', '', 'Counselling - Domestic Violence' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292229', '', 'Counselling - Domestic Violence, Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292999', '', 'Counselling - Domestic Violence - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293000', '', 'COUNSELLING - FAMILY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293129', '', 'Counselling - Family - Parent/Child Relationship' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293229', '', 'Counselling - Family- Family Conflict' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293329', '', 'Counselling - Family, Delinquency' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293999', '', 'Counselling - Family - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294000', '', 'COUNSELLING - PRE-MARITAL / MARITAL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294129', '', 'Counselling - Pre-Marital including Pre-Marital Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294229', '', 'Counselling - Marital - Relationship, Partner Negotiation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294329', '', 'Counselling - Marital - Sexuality / Sexual Disfunction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294999', '', 'Counselling - Marital - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295000', '', 'COUNSELLING - YOUTH (less than 25 yrs)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295129', '', 'Counselling - Youth - Life Skills Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295229', '', 'Counselling - Youth - Sexuality' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295329', '', 'Counselling - Youth - Telephone / Internet Hotline Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295429', '', 'Counselling - Youth - SRH Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295999', '', 'Counselling - Youth - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296000', '', 'COUNSELLING - MALE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296129', '', 'Counselling - Male - SRH Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296229', '', 'Counselling - Male - Sexuality' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296329', '', 'Counselling - Male - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296999', '', 'Counselling - Male - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297000', '', 'COUNSELLING SERVICES (OTHER)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297129', '', 'Counseling - Other - Sexuality Issues ( 25 years and over)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297999', '', 'Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298000', '', 'OTHER SRH MEDICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298120', '', 'Other SRH medical services - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298221', '', 'Other SRH medical services - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298322', '', 'Other SRH medical services - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298423', '', 'Other SRH medical services - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298999', '', 'Other SRH medical services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '370000000', '', 'MEDICAL SPECIALTY SERVICIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371300000', '', 'MEDICAL SPECIALTIES - SYSTEM ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371300999', '', 'Medical Specialties - System Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301000', '', 'ANGIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301130', '', 'Angiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301231', '', 'Angiology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301332', '', 'Angiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301433', '', 'Angiology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301999', '', 'Angiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311000', '', 'CARDIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311130', '', 'Cardiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311231', '', 'Cardiology - Diagnostic EKG' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311332', '', 'Cardiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311433', '', 'Cardiology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311999', '', 'Cardiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321000', '', 'DENTISTRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321131', '', 'Dentistry - Diagnosis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321232', '', 'Dentistry -Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321332', '', 'Dentistry - Orthodontics' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321432', '', 'Dentistry - Periodontics' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321533', '', 'Dentistry - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321999', '', 'Dentistry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331000', '', 'DERMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331130', '', 'Dermatology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331231', '', 'Dermatology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331332', '', 'Dermatology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331433', '', 'Dermatology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331999', '', 'Dermatology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341000', '', 'ENDOCRINOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341130', '', 'Endocrinology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341231', '', 'Endocrinology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341332', '', 'Endocrinology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341433', '', 'Endocrinology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341999', '', 'Endocrinology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351000', '', 'GASTROENTEROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351130', '', 'Gastroenterology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351231', '', 'Gastroenterology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351332', '', 'Gastroenterology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351433', '', 'Gastroenterology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351999', '', 'Gastroenterology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361000', '', 'GENETICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361129', '', 'Genetics - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361230', '', 'Genetics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361331', '', 'Genetics - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361432', '', 'Genetics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361999', '', 'Genetics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371000', '', 'NEPHROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371130', '', 'Nephrology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371231', '', 'Nephrology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371332', '', 'Nephrology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371433', '', 'Nephrology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371999', '', 'Nephrology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381000', '', 'NEUMOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381130', '', 'Neumology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381231', '', 'Neumology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381332', '', 'Neumology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381433', '', 'Neumology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381999', '', 'Neumology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391000', '', 'NEUROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391130', '', 'Neurology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391231', '', 'Neurology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391332', '', 'Neurology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391433', '', 'Neurology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391999', '', 'Neurology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401000', '', 'OPHTALMOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401130', '', 'Ophtalmology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401231', '', 'Ophtalmology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401332', '', 'Ophtalmology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401433', '', 'Ophtalmology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401999', '', 'Ophtalmology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411000', '', 'ORTHOPEDICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411130', '', 'Orthopedics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411231', '', 'Orthopedics - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411332', '', 'Orthopedics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411433', '', 'Orthopedics - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411999', '', 'Orthopedics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421000', '', 'OTHORHINOLARINGOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421130', '', 'Othorhinolaringology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421231', '', 'Othorhinolaringology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421332', '', 'Othorhinolaringology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421433', '', 'Othorhinolaringology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421999', '', 'Othorhinolaringology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431000', '', 'PODOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431130', '', 'Podology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431231', '', 'Podology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431332', '', 'Podology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431433', '', 'Podology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431999', '', 'Podology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441000', '', 'RHEUMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441130', '', 'Rheumatology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441231', '', 'Rheumatology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441332', '', 'Rheumatology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441433', '', 'Rheumatology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441999', '', 'Rheumatology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372500000', '', 'MEDICAL SPECIALTIES - DISEASE ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372500999', '', 'Medical Specialties - Disease Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501000', '', 'OPTOMETRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501130', '', 'Optometry - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501231', '', 'Optometry - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501999', '', 'Optometry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511000', '', 'PSYCHIATRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511131', '', 'Psychiatry - Diagnostic consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511232', '', 'Psychiatry - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511999', '', 'Psychiatry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521000', '', 'PSYCHOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521131', '', 'Psychology - Diagnostic consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521232', '', 'Psychology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521999', '', 'Psychology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531000', '', 'RADIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531131', '', 'Radiology - Diagnostic Imaging' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531232', '', 'Radiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531999', '', 'Radiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541000', '', 'ONCOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541131', '', 'Oncology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541232', '', 'Oncology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541333', '', 'Oncology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541999', '', 'Oncology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551000', '', 'ALLERGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551130', '', 'Allergy - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551231', '', 'Allergy - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551332', '', 'Allergy - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551999', '', 'Allergy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561000', '', 'IMMUNOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561130', '', 'Immunology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561231', '', 'Immunology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561999', '', 'Immunology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373600000', '', 'MEDICAL SPECIALTIES - COMMUNITY ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373600999', '', 'Medical Specialties - Community Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601000', '', 'FAMILY HEALTH' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601131', '', 'Family Health - Hypertension Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601231', '', 'Family Health - Physical Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601331', '', 'Family Health - Weight & Vital Signs' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601431', '', 'Family Health - Diabetes Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601531', '', 'Family Health - Urinalysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601631', '', 'Family Health - Cholesterol screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601729', '', 'Family Health - Nutrition Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601829', '', 'Family Health - Diet/Weight Control Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601999', '', 'Family Health - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621000', '', 'GERIATRICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621130', '', 'Geriatrics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621231', '', 'Geriatrics - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621332', '', 'Geriatrics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621999', '', 'Geriatrics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641000', '', 'PEDIATRICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641130', '', 'Pediatrics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641231', '', 'Pediatrics - Diagnostic - Neonatal Screening (at Birth)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641331', '', 'Pediatrics - Diagnostic - Well Baby Care / Infant Health Check' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641432', '', 'Pediatrics - Therapy / Treatment - Nutrition' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641532', '', 'Pediatrics - Therapy / Treatment - Immunization' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641632', '', 'Pediatrics - Therapy / Treatment - Oral rehydration (ORT/ORS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641732', '', 'Pediatrics - Therapy / Treatment - Neonatal Intensive Care' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641833', '', 'Pediatrics - Surgery - Circumcision' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641999', '', 'Pediatrics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661000', '', 'PHYSICAL MEDICINE & REHABILITATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661130', '', 'Physical Medicine & Rehabilitation - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661231', '', 'Physical Medicine & Rehabilitation - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661332', '', 'Physical Medicine & Rehabilitation - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661433', '', 'Physical Medicine & Rehabilitation - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661999', '', 'Physical Medicine & Rehabilitation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671000', '', 'PREVENTIVE MEDICINE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671130', '', 'Preventive Medicine - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671231', '', 'Preventive Medicine - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671999', '', 'Preventive Medicine - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681000', '', 'EMERGENCY MEDICINE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681131', '', 'Emergency Medicine - Evaluation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681232', '', 'Emergency Medicine - Initial Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681333', '', 'Emergency Medicine - Emergency Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681999', '', 'Emergency Medicine - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691000', '', 'HOSPITALIZATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691140', '', 'Hospitalization - Ambulatory (1 day)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691241', '', 'Hospitalization - Extended (>1day)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691999', '', 'Hospitalization - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374700000', '', 'MEDICAL SPECIALTIES DIAGNOSTIC/THERAPEUTIC PROCEDURES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374700999', '', 'Medical Specialties - Diagnostic/Therapeutic Procedures - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701000', '', 'HEMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701130', '', 'Hematology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701231', '', 'Hematology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701332', '', 'Hematology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701999', '', 'Hematology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721000', '', 'TOXICOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721130', '', 'Toxicology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721231', '', 'Toxicology - Diagnostic tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721332', '', 'Toxicology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721999', '', 'Toxicology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741000', '', 'CHEMICAL PATHOLOGY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741130', '', 'Chemical Patology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741231', '', 'Chemical Patology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374751999', '', 'Chemical Patology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761000', '', 'PATHOLOGY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761130', '', 'Pathology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761231', '', 'Pathology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761999', '', 'Pathology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781000', '', 'MICROBIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781130', '', 'Microbiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781231', '', 'Microbiology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781999', '', 'Microbiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375800000', '', 'MEDICAL SPECIALTIES - OTHER SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375800999', '', 'Medical Specialties - Other Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801000', '', 'CHIROPRACTICE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801130', '', 'Chiropractice - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801232', '', 'Chiropractice - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801999', '', 'Chiropractice - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811000', '', 'OSTEOPHATY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811130', '', 'Osteophaty - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811232', '', 'Osteophaty - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811331', '', 'Osteophaty - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811999', '', 'Osteophaty - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821000', '', 'PLASTIC SURGERY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821130', '', 'Plastic Surgery - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821232', '', 'Plastic Surgery - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821333', '', 'Plastic Surgery - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821999', '', 'Plastic Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831000', '', 'OTHER NON SRH MEDICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831130', '', 'Other non-SRH medical services - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831231', '', 'Other non-SRH medical services - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831332', '', 'Other non-SRH medical services - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831433', '', 'Other non-SRH medical services - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831539', '', 'Other non-SRH medical services - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831999', '', 'Other non-SRH medical services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376100000', '', 'PREVENTION AND TREATMENT SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101000', '', 'MALARIA PREVENTION AND TREATMENT SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101132', '', 'Malaria prevention and treatment services for children under 5 years' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101232', '', 'Malaria prevention and treatment services for pregnant mothers' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101999', '', 'Malaria prevention and treatment services OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380910000', '', 'OTHER NON SRH SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380910999', '', 'ALL OTHER NON SRH SERVICES - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380911000', '', 'SALES & RENTALS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380911999', '', 'Sales & Rentals - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912000', '', 'SALES OF MEDICINES, SUPPLIES AND EQUIPMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912150', '', 'Sales of Medicines' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912250', '', 'Sales Medical Supplies' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912350', '', 'Sales Medical Equipment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381913999', '', 'Sales - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382914000', '', 'RENTAL OF MEDICAL EQUIPMENT / INFRASTRUCTURE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382914450', '', 'Rental Medical Infrastructure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382915999', '', 'Rental Medical Equipment / Infrastructure - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '490000000', '', 'NON-MEDICAL PRODUCTS AND SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990000', '', 'OTHER NON MEDICAL PRODUCTS & SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990190', '', 'Other non-medical products - Sales of IEC Materials' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990290', '', 'Other non-medical Products & Services - Free distribution of IEC materials' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990999', '', 'Other non-medical products - Other Generic Products' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992000', '', 'OTHER NON MEDICAL SERVICES SALES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992090', '', 'Other non-medical services - Sales of IEC Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992999', '', 'Other non-medical services - OTHER' ); CREATE TABLE IF NOT EXISTS lists_ippf_gcac ( id bigint(20) NOT NULL, @@ -974,51 +1180,51 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va DELETE FROM layout_options WHERE form_id = 'HIS'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext12' ,'1Personal','Blood Group' , 1, 1,1, 0, 0,'bloodgroup' ,1,1,'','' ,'Blood Group'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext13' ,'1Personal','RH Factor' , 2, 1,1, 0, 0,'rh_factor' ,1,1,'','' ,'RH Factor'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext11' ,'1Personal','Risk Factors' , 3,21,1, 0, 0,'riskfactors',1,1,'','' ,'Risk Factors'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exams' ,'1Personal','Exams/Tests' , 4,23,1, 0, 0,'exams' ,1,1,'','' ,'Exam and test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext14' ,'1Personal','Surgical History' , 5,25,1, 0, 0,'surghist' ,1,3,'','' ,'Surgeries with dates/notes'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','coffee' ,'1Personal','Coffee' , 6, 2,1,20,255,'' ,1,1,'','' ,'Caffeine consumption'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','tobacco' ,'1Personal','Tobacco' , 7, 2,1,20,255,'' ,1,1,'','' ,'Tobacco use'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','alcohol' ,'1Personal','Alcohol' , 8, 2,1,20,255,'' ,1,1,'','' ,'Alcohol consumption'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','sleep_patterns' ,'1Personal','Sleep Patterns' , 9, 2,1,20,255,'' ,1,1,'','' ,'Sleep patterns'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','exercise_patterns' ,'1Personal','Exercise Patterns' ,10, 2,1,20,255,'' ,1,1,'','' ,'Exercise patterns'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','seatbelt_use' ,'1Personal','Seatbelt Use' ,11, 2,1,20,255,'' ,1,1,'','' ,'Seatbelt use'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','counseling' ,'1Personal','Counseling' ,12, 2,1,20,255,'' ,1,1,'','' ,'Counseling activities'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','hazardous_activities','1Personal','Hazardous Activities',13, 2,1,20,255,'' ,1,1,'','' ,'Hazardous activities'); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_father' ,'2Relatives','Father' , 1, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_mother' ,'2Relatives','Mother' , 2, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_siblings' ,'2Relatives','Siblings' , 3, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_spouse' ,'2Relatives','Spouse' , 4, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','history_offspring' ,'2Relatives','Offspring' , 5, 2,1,20,255,'',1,3,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_cancer' ,'2Relatives','Cancer' , 6, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_tuberculosis' ,'2Relatives','Tuberculosis' , 7, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_diabetes' ,'2Relatives','Diabetes' , 8, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_high_blood_pressure','2Relatives','High Blood Pressure', 9, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_heart_problems' ,'2Relatives','Heart Problems' ,10, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_stroke' ,'2Relatives','Stroke' ,11, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_epilepsy' ,'2Relatives','Epilepsy' ,12, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_mental_illness' ,'2Relatives','Mental Illness' ,13, 2,1,20,255,'',1,1,'','' ,''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','relatives_suicide' ,'2Relatives','Suicide' ,14, 2,1,20,255,'',1,3,'','' ,''); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext15','3Reproductive Women','Menstrual', 1,22,1, 0, 0,'genmenhist',1,1,'','' ,'Menstrual History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext16','3Reproductive Women','Obstetric', 2,22,1, 0, 0,'genobshist',1,1,'','' ,'Obstetric History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext17','3Reproductive Women','Abortion' , 3,22,1, 0, 0,'genabohist',1,1,'','' ,'Abortion History'); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext18','4Reproductive General','HIV/AIDS' , 1,21,1, 0, 0,'genhivhist',1,1,'','' ,'HIV/AIDS History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext19','4Reproductive General','ITS/ITR' , 2,21,1, 0, 0,'genitshist',1,1,'','' ,'ITS/ITR History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext20','4Reproductive General','Fertility', 3,21,1, 0, 0,'genferhist',1,1,'','' ,'Infertility/Subfertility History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','usertext21','4Reproductive General','Urology' , 4,21,1, 0, 0,'genurohist',1,1,'','' ,'Urology History'); - -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_1' ,'5Other','Name/Value' ,1, 2,1,10,255,'',1,1,'','' ,'Name 1' ); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_1' ,'5Other','' ,2, 2,1,10,255,'',0,0,'','' ,'Value 1'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','name_2' ,'5Other','Name/Value' ,3, 2,1,10,255,'',1,1,'','' ,'Name 2' ); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','value_2' ,'5Other','' ,4, 2,1,10,255,'',0,0,'','' ,'Value 2'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','additional_history','5Other','Additional History',5, 3,1,30, 3,'',1,3,'' ,'' ,'Additional history notes'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea11','5Other','User Defined Area 11',6,3,0,30,3,'',1,3,'','','User Defined'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('HIS','userarea12','5Other','User Defined Area 12',7,3,0,30,3,'',1,3,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext12' ,'1','Blood Group' , 1, 1,1, 0, 0,'bloodgroup' ,1,1,'','' ,'Blood Group'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext13' ,'1','RH Factor' , 2, 1,1, 0, 0,'rh_factor' ,1,1,'','' ,'RH Factor'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext11' ,'1','Risk Factors' , 3,21,1, 0, 0,'riskfactors',1,1,'','' ,'Risk Factors'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','exams' ,'1','Exams/Tests' , 4,23,1, 0, 0,'exams' ,1,1,'','' ,'Exam and test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext14' ,'1','Surgical History' , 5,25,1, 0, 0,'surghist' ,1,3,'','' ,'Surgeries with dates/notes'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','coffee' ,'1','Coffee' , 6, 2,1,20,255,'' ,1,1,'','' ,'Caffeine consumption'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','tobacco' ,'1','Tobacco' , 7, 2,1,20,255,'' ,1,1,'','' ,'Tobacco use'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','alcohol' ,'1','Alcohol' , 8, 2,1,20,255,'' ,1,1,'','' ,'Alcohol consumption'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','sleep_patterns' ,'1','Sleep Patterns' , 9, 2,1,20,255,'' ,1,1,'','' ,'Sleep patterns'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','exercise_patterns' ,'1','Exercise Patterns' ,10, 2,1,20,255,'' ,1,1,'','' ,'Exercise patterns'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','seatbelt_use' ,'1','Seatbelt Use' ,11, 2,1,20,255,'' ,1,1,'','' ,'Seatbelt use'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','counseling' ,'1','Counseling' ,12, 2,1,20,255,'' ,1,1,'','' ,'Counseling activities'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','hazardous_activities','1','Hazardous Activities',13, 2,1,20,255,'' ,1,1,'','' ,'Hazardous activities'); + +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','history_father' ,'2','Father' , 1, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','history_mother' ,'2','Mother' , 2, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','history_siblings' ,'2','Siblings' , 3, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','history_spouse' ,'2','Spouse' , 4, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','history_offspring' ,'2','Offspring' , 5, 2,1,20,255,'',1,3,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_cancer' ,'2','Cancer' , 6, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_tuberculosis' ,'2','Tuberculosis' , 7, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_diabetes' ,'2','Diabetes' , 8, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_high_blood_pressure','2','High Blood Pressure', 9, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_heart_problems' ,'2','Heart Problems' ,10, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_stroke' ,'2','Stroke' ,11, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_epilepsy' ,'2','Epilepsy' ,12, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_mental_illness' ,'2','Mental Illness' ,13, 2,1,20,255,'',1,1,'','' ,''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','relatives_suicide' ,'2','Suicide' ,14, 2,1,20,255,'',1,3,'','' ,''); + +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext15','3','Menstrual', 1,22,1, 0, 0,'genmenhist',1,1,'','' ,'Menstrual History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext16','3','Obstetric', 2,22,1, 0, 0,'genobshist',1,1,'','' ,'Obstetric History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext17','3','Abortion' , 3,22,1, 0, 0,'genabohist',1,1,'','' ,'Abortion History'); + +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext18','4','HIV/AIDS' , 1,21,1, 0, 0,'genhivhist',1,1,'','' ,'HIV/AIDS History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext19','4','ITS/ITR' , 2,21,1, 0, 0,'genitshist',1,1,'','' ,'ITS/ITR History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext20','4','Fertility', 3,21,1, 0, 0,'genferhist',1,1,'','' ,'Infertility/Subfertility History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','usertext21','4','Urology' , 4,21,1, 0, 0,'genurohist',1,1,'','' ,'Urology History'); + +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','name_1' ,'5','Name/Value' ,1, 2,1,10,255,'',1,1,'','' ,'Name 1' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','value_1' ,'5','' ,2, 2,1,10,255,'',0,0,'','' ,'Value 1'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','name_2' ,'5','Name/Value' ,3, 2,1,10,255,'',1,1,'','' ,'Name 2' ); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','value_2' ,'5','' ,4, 2,1,10,255,'',0,0,'','' ,'Value 2'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','additional_history','5','Additional History',5, 3,1,30, 3,'',1,3,'' ,'' ,'Additional history notes'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','userarea11','5','User Defined Area 11',6,3,0,30,3,'',1,3,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('HIS','userarea12','5','User Defined Area 12',7,3,0,30,3,'',1,3,'','','User Defined'); DELETE FROM list_options WHERE list_id = 'surghist'; INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('surghist','gi' ,'Gastrointestinal Tract', 1,0,0); @@ -1077,7 +1283,7 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va DELETE FROM list_options WHERE list_id = 'genitshist'; INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','info' ,'Client is informed about ITS transmission', 1,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','couns','Client has received ITS Counselling' , 2,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','couns','Client has received ITS Counselling' , 2,0,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','test' ,'Client has been ITS tested' , 3,0,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','pos' ,'Client has tested ITS positive' , 4,0,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('genitshist','treat','Client has received ITS treatment' , 5,0,0); @@ -1107,31 +1313,38 @@ DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'conrisks'; DELETE FROM list_options WHERE list_id = 'sti'; DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'sti'; +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', '' , 'Contraception Issues', 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'a', 'Statistics' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'b', 'Hormonal' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'c', 'Barrier/IUD' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'd', 'Surgical' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'e', 'Natural' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('CON', 'f', 'Emergency' , '' ); DELETE FROM layout_options WHERE form_id = 'CON'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','prev_method' ,'aStatistics' ,'Last Method Used' , 1,21,1, 2, 0,'contrameth' ,1,3,'','' ,'Last Contraceptive Method Used'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','new_method' ,'aStatistics' ,'New Method Adopted' , 2,21,1, 2, 0,'contrameth' ,1,3,'','' ,'Contraceptive Method Adopted at This Visit'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','reason_chg' ,'aStatistics' ,'Reason for Method Change' , 3,21,1, 2, 0,'mcreason' ,1,3,'','' ,'Reasons for Method Change'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','reason_term' ,'aStatistics' ,'Reason for Method Termination', 4,21,1, 2, 0,'mcreason' ,1,3,'','' ,'Reasons for Method Termination'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','usertext11' ,'aStatistics' ,'General Risk Factors' , 5,21,1, 2, 0,'riskfactors' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','hor_history' ,'bHormonal' ,'Menstrual History' , 1,21,1, 2, 0,'menhist' ,1,3,'','' ,'Menstrual History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','hor_lmp' ,'bHormonal' ,'Last Menstrual Period' , 2, 1,1, 0, 0,'lmp' ,1,3,'','' ,'Last Menstrual Period'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','hor_flow' ,'bHormonal' ,'Nature of Menstrual Flow' , 3,21,1, 4, 0,'flowtype' ,1,3,'','' ,'Nature of Menstrual Flow'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','hor_bleeding' ,'bHormonal' ,'Bleeding' , 4,21,1, 4, 0,'bleeding' ,1,3,'','' ,'Menstrual Bleeding Characteristics'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','hor_contra' ,'bHormonal' ,'Contraindications' , 5,21,1, 1, 0,'hor_contra' ,1,3,'','' ,'Contraindications of Hormonal Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','iud_history' ,'cBarrier/IUD','Menstrual History' , 1,21,1, 2, 0,'menhist' ,1,3,'','' ,'Menstrual History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','iud_lmp' ,'cBarrier/IUD','Last Menstrual Period' , 2, 1,1, 0, 0,'lmp' ,1,3,'','' ,'Last Menstrual Period'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','iud_pain' ,'cBarrier/IUD','Pain during Menses' , 3,21,1, 2, 0,'menpain' ,1,3,'','' ,'Type of Pain during Menses'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','iud_upos' ,'cBarrier/IUD','Uterus Position' , 4, 1,1, 0, 0,'uteruspos' ,1,3,'','' ,'Uterus Position'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','iud_contra' ,'cBarrier/IUD','Contraindications' , 5,21,1, 0, 0,'iud_contra' ,1,3,'','' ,'Contraindications of Barrier/IUD Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','sur_screen' ,'dSurgical' ,'Pre-Operative Screening' , 1,21,1, 1, 0,'sur_screen' ,1,3,'','' ,'Pre-Operative Screening for Surgical Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','sur_anes' ,'dSurgical' ,'Type of Anesthesia' , 2, 1,1, 0, 0,'anesthesia' ,1,3,'','' ,'Type of Anesthesia for Surgical Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','sur_type' ,'dSurgical' ,'Type of Surgical Approach' , 3, 1,1, 0, 0,'sur_type' ,1,3,'','' ,'Type of Contraceptive Surgery'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','sur_post_ins' ,'dSurgical' ,'Post-Operative Instructions' , 4,21,1, 0, 0,'sur_post_ins',1,3,'','' ,'Post-Operative Instructions'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','sur_contra' ,'dSurgical' ,'Contraindications' , 5,21,1, 0, 0,'sur_contra' ,1,3,'','' ,'Contraindications of Surgical Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','nat_reason' ,'eNatural' ,'Reason for Adopting a FABM' , 1,21,1, 2, 0,'nat_reason' ,1,3,'','' ,'Reasons for Adopting Natural Contracepation'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','nat_method' ,'eNatural' ,'FABM Method Adopted' , 2, 1,1, 0, 0,'nat_method' ,1,3,'','' ,'Type of Natural Contraception'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','emg_reason' ,'fEmergency' ,'Reason for Using EC' , 1,21,1, 1, 0,'emg_reason' ,1,3,'','' ,'Reasons for Using Emergency Contracepation'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('CON','emg_method' ,'fEmergency' ,'EC Method Adopted' , 2, 1,1, 0, 0,'emg_method' ,1,3,'','' ,'Type of Emergency Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','prev_method' ,'a','Last Method Used' , 1,21,1, 2, 0,'contrameth' ,1,3,'','' ,'Last Contraceptive Method Used'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','new_method' ,'a','New Method Adopted' , 2,21,1, 2, 0,'contrameth' ,1,3,'','' ,'Contraceptive Method Adopted at This Visit'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','reason_chg' ,'a','Reason for Method Change' , 3,21,1, 2, 0,'mcreason' ,1,3,'','' ,'Reasons for Method Change'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','reason_term' ,'a','Reason for Method Termination', 4,21,1, 2, 0,'mcreason' ,1,3,'','' ,'Reasons for Method Termination'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','usertext11' ,'a','General Risk Factors' , 5,21,1, 2, 0,'riskfactors' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','hor_history' ,'b','Menstrual History' , 1,21,1, 2, 0,'menhist' ,1,3,'','' ,'Menstrual History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','hor_lmp' ,'b','Last Menstrual Period' , 2, 1,1, 0, 0,'lmp' ,1,3,'','' ,'Last Menstrual Period'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','hor_flow' ,'b','Nature of Menstrual Flow' , 3,21,1, 4, 0,'flowtype' ,1,3,'','' ,'Nature of Menstrual Flow'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','hor_bleeding' ,'b','Bleeding' , 4,21,1, 4, 0,'bleeding' ,1,3,'','' ,'Menstrual Bleeding Characteristics'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','hor_contra' ,'b','Contraindications' , 5,21,1, 1, 0,'hor_contra' ,1,3,'','' ,'Contraindications of Hormonal Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','iud_history' ,'c','Menstrual History' , 1,21,1, 2, 0,'menhist' ,1,3,'','' ,'Menstrual History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','iud_lmp' ,'c','Last Menstrual Period' , 2, 1,1, 0, 0,'lmp' ,1,3,'','' ,'Last Menstrual Period'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','iud_pain' ,'c','Pain during Menses' , 3,21,1, 2, 0,'menpain' ,1,3,'','' ,'Type of Pain during Menses'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','iud_upos' ,'c','Uterus Position' , 4, 1,1, 0, 0,'uteruspos' ,1,3,'','' ,'Uterus Position'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','iud_contra' ,'c','Contraindications' , 5,21,1, 0, 0,'iud_contra' ,1,3,'','' ,'Contraindications of Barrier/IUD Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','sur_screen' ,'d','Pre-Operative Screening' , 1,21,1, 1, 0,'sur_screen' ,1,3,'','' ,'Pre-Operative Screening for Surgical Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','sur_anes' ,'d','Type of Anesthesia' , 2, 1,1, 0, 0,'anesthesia' ,1,3,'','' ,'Type of Anesthesia for Surgical Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','sur_type' ,'d','Type of Surgical Approach' , 3, 1,1, 0, 0,'sur_type' ,1,3,'','' ,'Type of Contraceptive Surgery'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','sur_post_ins' ,'d','Post-Operative Instructions' , 4,21,1, 0, 0,'sur_post_ins',1,3,'','' ,'Post-Operative Instructions'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','sur_contra' ,'d','Contraindications' , 5,21,1, 0, 0,'sur_contra' ,1,3,'','' ,'Contraindications of Surgical Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','nat_reason' ,'e','Reason for Adopting a FABM' , 1,21,1, 2, 0,'nat_reason' ,1,3,'','' ,'Reasons for Adopting Natural Contracepation'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','nat_method' ,'e','FABM Method Adopted' , 2, 1,1, 0, 0,'nat_method' ,1,3,'','' ,'Type of Natural Contraception'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','emg_reason' ,'f','Reason for Using EC' , 1,21,1, 1, 0,'emg_reason' ,1,3,'','' ,'Reasons for Using Emergency Contracepation'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('CON','emg_method' ,'f','EC Method Adopted' , 2, 1,1, 0, 0,'emg_method' ,1,3,'','' ,'Type of Emergency Contraception'); CREATE TABLE IF NOT EXISTS lists_ippf_srh ( id bigint(20) NOT NULL, @@ -1155,33 +1368,38 @@ CREATE TABLE IF NOT EXISTS lists_ippf_srh ( PRIMARY KEY (id) ) ENGINE=MyISAM; +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('SRH', '' , 'IPPF SRH Data' , 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('SRH', 'a', 'Gynecology' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('SRH', 'b', 'Obstetrics' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('SRH', 'c', 'Basic RH (female only)' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('SRH', 'd', 'Basic RH (female and male)', '' ); DELETE FROM layout_options WHERE form_id = 'SRH'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext15' ,'aGynecology' ,'Menstrual History' , 1,22,1, 0, 0,'genmenhist' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','men_hist' ,'aGynecology' ,'Recent Menstrual History' , 2,21,1, 2, 0,'menhist' ,1,3,'','','Recent Menstrual History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','men_compl' ,'aGynecology' ,'Menstrual Complications' , 3,21,1, 2, 0,'men_compl' ,1,3,'','','Menstrual Complications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','pap_hist' ,'aGynecology' ,'Pap Smear Recent History' , 4,22,1, 0, 0,'pap_hist' ,1,3,'','','Pap Smear Recent History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','gyn_exams' ,'aGynecology' ,'Gynecological Tests' , 5,23,1, 0, 0,'gyn_exams' ,1,1,'','','Gynecological test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','pr_status' ,'bObstetrics' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','','Pregnancy Status Confirmed'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','gest_age_by','bObstetrics' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','','Gestational Age Confirmed By'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext12' ,'bObstetrics' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext13' ,'bObstetrics' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','obs_exams' ,'bObstetrics' ,'Obstetric Tests' , 5,23,1, 0, 0,'obs_exams' ,1,1,'','','Obstetric test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext16' ,'bObstetrics' ,'Obstetric History' , 6,22,1, 0, 0,'genobshist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','pr_outcome' ,'bObstetrics' ,'Outcome of Last Pregnancy' , 7,21,1, 2, 0,'pr_outcome' ,1,3,'','','Outcome of Last Pregnancy'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','pr_compl' ,'bObstetrics' ,'Pregnancy Complications' , 8,21,1, 2, 0,'pr_compl' ,1,3,'','','Pregnancy Complications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext17' ,'cBasic RH (female only)' ,'Abortion Basic History' , 1,22,1, 0, 0,'genabohist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','abo_exams' ,'cBasic RH (female only)' ,'Abortion Tests' , 2,23,1, 0, 0,'abo_exams' ,1,1,'','','Abortion test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext18' ,'dBasic RH (female and male)','HIV/AIDS Basic History' , 1,21,1, 0, 0,'genhivhist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','hiv_exams' ,'dBasic RH (female and male)','HIV/AIDS Tests' , 2,23,1, 0, 0,'hiv_exams' ,1,1,'','','HIV/AIDS test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext19' ,'dBasic RH (female and male)','ITS/ITR Basic History' , 3,21,1, 0, 0,'genitshist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','its_exams' ,'dBasic RH (female and male)','ITS/ITR Tests' , 4,23,1, 0, 0,'its_exams' ,1,1,'','','ITS/ITR test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext20' ,'dBasic RH (female and male)','Fertility Basic History' , 5,21,1, 0, 0,'genferhist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','fer_exams' ,'dBasic RH (female and male)','Fertility Tests' , 6,23,1, 0, 0,'fer_exams' ,1,1,'','','Infertility/subfertility test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','fer_causes' ,'dBasic RH (female and male)','Causes of Infertility' , 7,21,1, 2, 0,'fer_causes' ,1,3,'','','Causes of Infertility'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','fer_treat' ,'dBasic RH (female and male)','Infertility Treatment' , 8,21,1, 2, 0,'fer_treat' ,1,3,'','','Infertility Treatment'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','usertext21' ,'dBasic RH (female and male)','Urology Basic History' , 9,21,1, 0, 0,'genurohist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','uro_exams' ,'dBasic RH (female and male)','Urology Tests' ,10,23,1, 0, 0,'uro_exams' ,1,1,'','','Urology test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('SRH','uro_disease','dBasic RH (female and male)','Male Genitourinary diseases' ,11,21,1, 2, 0,'uro_disease' ,1,3,'','','Male Genitourinary diseases'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext15' ,'a' ,'Menstrual History' , 1,22,1, 0, 0,'genmenhist' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','men_hist' ,'a' ,'Recent Menstrual History' , 2,21,1, 2, 0,'menhist' ,1,3,'','','Recent Menstrual History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','men_compl' ,'a' ,'Menstrual Complications' , 3,21,1, 2, 0,'men_compl' ,1,3,'','','Menstrual Complications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','pap_hist' ,'a' ,'Pap Smear Recent History' , 4,22,1, 0, 0,'pap_hist' ,1,3,'','','Pap Smear Recent History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','gyn_exams' ,'a' ,'Gynecological Tests' , 5,23,1, 0, 0,'gyn_exams' ,1,1,'','','Gynecological test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','pr_status' ,'b' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','','Pregnancy Status Confirmed'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','gest_age_by','b' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','','Gestational Age Confirmed By'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext12' ,'b' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext13' ,'b' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','obs_exams' ,'b' ,'Obstetric Tests' , 5,23,1, 0, 0,'obs_exams' ,1,1,'','','Obstetric test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext16' ,'b' ,'Obstetric History' , 6,22,1, 0, 0,'genobshist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','pr_outcome' ,'b' ,'Outcome of Last Pregnancy' , 7,21,1, 2, 0,'pr_outcome' ,1,3,'','','Outcome of Last Pregnancy'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','pr_compl' ,'b' ,'Pregnancy Complications' , 8,21,1, 2, 0,'pr_compl' ,1,3,'','','Pregnancy Complications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext17' ,'c' ,'Abortion Basic History' , 1,22,1, 0, 0,'genabohist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','abo_exams' ,'c' ,'Abortion Tests' , 2,23,1, 0, 0,'abo_exams' ,1,1,'','','Abortion test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext18' ,'d','HIV/AIDS Basic History' , 1,21,1, 0, 0,'genhivhist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','hiv_exams' ,'d','HIV/AIDS Tests' , 2,23,1, 0, 0,'hiv_exams' ,1,1,'','','HIV/AIDS test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext19' ,'d','ITS/ITR Basic History' , 3,21,1, 0, 0,'genitshist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','its_exams' ,'d','ITS/ITR Tests' , 4,23,1, 0, 0,'its_exams' ,1,1,'','','ITS/ITR test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext20' ,'d','Fertility Basic History' , 5,21,1, 0, 0,'genferhist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','fer_exams' ,'d','Fertility Tests' , 6,23,1, 0, 0,'fer_exams' ,1,1,'','','Infertility/subfertility test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','fer_causes' ,'d','Causes of Infertility' , 7,21,1, 2, 0,'fer_causes' ,1,3,'','','Causes of Infertility'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','fer_treat' ,'d','Infertility Treatment' , 8,21,1, 2, 0,'fer_treat' ,1,3,'','','Infertility Treatment'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','usertext21' ,'d','Urology Basic History' , 9,21,1, 0, 0,'genurohist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','uro_exams' ,'d','Urology Tests' ,10,23,1, 0, 0,'uro_exams' ,1,1,'','','Urology test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('SRH','uro_disease','d','Male Genitourinary diseases' ,11,21,1, 2, 0,'uro_disease' ,1,3,'','','Male Genitourinary diseases'); DELETE FROM list_options WHERE list_id = 'men_compl'; INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('men_compl','bleed' ,'Heavy Menstrual Bleeding' , 1,0,0); @@ -1393,66 +1611,78 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va -- The following added 2009-07-24 -DELETE FROM list_options WHERE list_id = 'lbfnames'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('lbfnames','LBFgcac','IPPF GCAC',1,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('lbfnames','LBFsrh' ,'IPPF SRH' ,2,0,0); +-- DELETE FROM list_options WHERE list_id = 'lbfnames'; +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('lbfnames','LBFgcac','IPPF GCAC',1,0,0); +-- INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('lbfnames','LBFsrh' ,'IPPF SRH' ,2,0,0); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFsrh', '' , 'IPPF SRH' , 'Clinical'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFsrh', '1', 'Gynecology' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFsrh', '2', 'Obstetrics' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFsrh', '3', 'Basic RH (female only)' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFsrh', '4', 'Basic RH (female and male)', '' ); DELETE FROM layout_options WHERE form_id = 'LBFsrh'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext15' ,'1Gynecology' ,'Menstrual History' , 1,22,1, 0, 0,'genmenhist' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','men_hist' ,'1Gynecology' ,'Recent Menstrual History' , 2,21,1, 2, 0,'menhist' ,1,3,'','','Recent Menstrual History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','men_compl' ,'1Gynecology' ,'Menstrual Complications' , 3,21,1, 2, 0,'men_compl' ,1,3,'','','Menstrual Complications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','pap_hist' ,'1Gynecology' ,'Pap Smear Recent History' , 4,22,1, 0, 0,'pap_hist' ,1,3,'','','Pap Smear Recent History'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','gyn_exams' ,'1Gynecology' ,'Gynecological Tests' , 5,23,1, 0, 0,'gyn_exams' ,1,1,'','','Gynecological test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','pr_status' ,'2Obstetrics' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','','Pregnancy Status Confirmed'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','gest_age_by','2Obstetrics' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','','Gestational Age Confirmed By'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext12' ,'2Obstetrics' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext13' ,'2Obstetrics' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','obs_exams' ,'2Obstetrics' ,'Obstetric Tests' , 5,23,1, 0, 0,'obs_exams' ,1,1,'','','Obstetric test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext16' ,'2Obstetrics' ,'Obstetric History' , 6,22,1, 0, 0,'genobshist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','pr_outcome' ,'2Obstetrics' ,'Outcome of Last Pregnancy' , 7,21,1, 2, 0,'pr_outcome' ,1,3,'','','Outcome of Last Pregnancy'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','pr_compl' ,'2Obstetrics' ,'Pregnancy Complications' , 8,21,1, 2, 0,'pr_compl' ,1,3,'','','Pregnancy Complications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext17' ,'3Basic RH (female only)' ,'Abortion Basic History' , 1,22,1, 0, 0,'genabohist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','abo_exams' ,'3Basic RH (female only)' ,'Abortion Tests' , 2,23,1, 0, 0,'abo_exams' ,1,1,'','','Abortion test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext18' ,'4Basic RH (female and male)','HIV/AIDS Basic History' , 1,21,1, 0, 0,'genhivhist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','hiv_exams' ,'4Basic RH (female and male)','HIV/AIDS Tests' , 2,23,1, 0, 0,'hiv_exams' ,1,1,'','','HIV/AIDS test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext19' ,'4Basic RH (female and male)','ITS/ITR Basic History' , 3,21,1, 0, 0,'genitshist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','its_exams' ,'4Basic RH (female and male)','ITS/ITR Tests' , 4,23,1, 0, 0,'its_exams' ,1,1,'','','ITS/ITR test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext20' ,'4Basic RH (female and male)','Fertility Basic History' , 5,21,1, 0, 0,'genferhist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','fer_exams' ,'4Basic RH (female and male)','Fertility Tests' , 6,23,1, 0, 0,'fer_exams' ,1,1,'','','Infertility/subfertility test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','fer_causes' ,'4Basic RH (female and male)','Causes of Infertility' , 7,21,1, 2, 0,'fer_causes' ,1,3,'','','Causes of Infertility'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','fer_treat' ,'4Basic RH (female and male)','Infertility Treatment' , 8,21,1, 2, 0,'fer_treat' ,1,3,'','','Infertility Treatment'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','usertext21' ,'4Basic RH (female and male)','Urology Basic History' , 9,21,1, 0, 0,'genurohist' ,1,1,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','uro_exams' ,'4Basic RH (female and male)','Urology Tests' ,10,23,1, 0, 0,'uro_exams' ,1,1,'','','Urology test results'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFsrh','uro_disease','4Basic RH (female and male)','Male Genitourinary diseases' ,11,21,1, 2, 0,'uro_disease' ,1,3,'','','Male Genitourinary diseases'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext15' ,'1','Menstrual History' , 1,22,1, 0, 0,'genmenhist' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','men_hist' ,'1','Recent Menstrual History' , 2,21,1, 2, 0,'menhist' ,1,3,'','','Recent Menstrual History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','men_compl' ,'1','Menstrual Complications' , 3,21,1, 2, 0,'men_compl' ,1,3,'','','Menstrual Complications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','pap_hist' ,'1','Pap Smear Recent History' , 4,22,1, 0, 0,'pap_hist' ,1,3,'','','Pap Smear Recent History'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','gyn_exams' ,'1','Gynecological Tests' , 5,23,1, 0, 0,'gyn_exams' ,1,1,'','','Gynecological test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','pr_status' ,'2','Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','','Pregnancy Status Confirmed'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','gest_age_by','2','Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','','Gestational Age Confirmed By'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext12' ,'2','Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext13' ,'2','RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','obs_exams' ,'2','Obstetric Tests' , 5,23,1, 0, 0,'obs_exams' ,1,1,'','','Obstetric test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext16' ,'2','Obstetric History' , 6,22,1, 0, 0,'genobshist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','pr_outcome' ,'2','Outcome of Last Pregnancy' , 7,21,1, 2, 0,'pr_outcome' ,1,3,'','','Outcome of Last Pregnancy'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','pr_compl' ,'2','Pregnancy Complications' , 8,21,1, 2, 0,'pr_compl' ,1,3,'','','Pregnancy Complications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext17' ,'3','Abortion Basic History' , 1,22,1, 0, 0,'genabohist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','abo_exams' ,'3','Abortion Tests' , 2,23,1, 0, 0,'abo_exams' ,1,1,'','','Abortion test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext18' ,'4','HIV/AIDS Basic History' , 1,21,1, 0, 0,'genhivhist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','hiv_exams' ,'4','HIV/AIDS Tests' , 2,23,1, 0, 0,'hiv_exams' ,1,1,'','','HIV/AIDS test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext19' ,'4','ITS/ITR Basic History' , 3,21,1, 0, 0,'genitshist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','its_exams' ,'4','ITS/ITR Tests' , 4,23,1, 0, 0,'its_exams' ,1,1,'','','ITS/ITR test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext20' ,'4','Fertility Basic History' , 5,21,1, 0, 0,'genferhist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','fer_exams' ,'4','Fertility Tests' , 6,23,1, 0, 0,'fer_exams' ,1,1,'','','Infertility/subfertility test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','fer_causes' ,'4','Causes of Infertility' , 7,21,1, 2, 0,'fer_causes' ,1,3,'','','Causes of Infertility'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','fer_treat' ,'4','Infertility Treatment' , 8,21,1, 2, 0,'fer_treat' ,1,3,'','','Infertility Treatment'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','usertext21' ,'4','Urology Basic History' , 9,21,1, 0, 0,'genurohist' ,1,1,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','uro_exams' ,'4','Urology Tests' ,10,23,1, 0, 0,'uro_exams' ,1,1,'','','Urology test results'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFsrh','uro_disease','4','Male Genitourinary diseases' ,11,21,1, 2, 0,'uro_disease' ,1,3,'','','Male Genitourinary diseases'); -- The following revised or added 2009-07-28 + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '' , 'IPPF GCAC' , 'Core'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '2', 'Counseling' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '3', 'Admission' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '4', 'Preparatory' , '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '5', 'Intervention', '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('GCA', '6', 'Followup' , '' ); DELETE FROM layout_options WHERE form_id = 'GCA'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','reason' ,'2Counseling' ,'Reason for Termination' , 1,21,1, 0, 0,'abreasons' ,1,3,'','' ,'Reasons for Termination of Pregnancy'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','exp_p_i' ,'2Counseling' ,'Explanation of Procedures/Issues', 2,21,1, 2, 0,'exp_p_i' ,1,3,'','' ,'Explanation of Procedures and Issues'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','exp_pop' ,'2Counseling' ,'Explanation of Pregnancy Options', 3,21,1, 2, 0,'exp_pop' ,1,3,'','' ,'Explanation of Pregnancy Options'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','ab_contraind' ,'2Counseling' ,'Contraindications' , 4,21,1, 2, 0,'ab_contraind',1,3,'','' ,'Contraindications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','screening' ,'2Counseling' ,'Screening for SRHR Concerns' , 5,21,1, 2, 0,'screening' ,1,3,'','' ,'Screening for SRHR Concerns'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','in_ab_proc' ,'3Admission' ,'Induced Abortion Procedure' , 2, 1,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Abortion Procedure Accepted or Performed'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','ab_types' ,'3Admission' ,'Abortion Types' , 3,21,1, 2, 0,'ab_types' ,1,3,'','' ,'Abortion Types'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','pr_status' ,'4Preparatory' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','' ,'Pregnancy Status Confirmed'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','gest_age_by' ,'4Preparatory' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','' ,'Gestational Age Confirmed By'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','usertext12' ,'4Preparatory' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','usertext13' ,'4Preparatory' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','prep_procs' ,'4Preparatory' ,'Preparation Procedures' , 6,21,1, 0, 0,'prep_procs' ,1,3,'','' ,'Preparation Procedures'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','pre_op' ,'5Intervention','Pre-Surgery Procedures' , 1,21,1, 2, 0,'pre_op' ,1,3,'','' ,'Pre-Surgery Procedures'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','anesthesia' ,'5Intervention','Anesthesia' , 2, 1,1, 0, 0,'anesthesia' ,1,3,'','' ,'Type of Anesthesia Used'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','side_eff' ,'5Intervention','Immediate Side Effects' , 3,21,1, 2, 0,'side_eff' ,1,3,'','' ,'Immediate Side Effects (observed at intervention'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','post_op' ,'5Intervention','Post-Surgery Procedures' , 5,21,1, 2, 0,'post_op' ,1,3,'','' ,'Post-Surgery Procedures'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('GCA','qc_ind' ,'6Followup' ,'Quality of Care Indicators' , 1,21,1, 0, 0,'qc_ind' ,1,3,'','' ,'Quality of Care Indicators'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','reason' ,'2','Reason for Termination' , 1,21,1, 0, 0,'abreasons' ,1,3,'','' ,'Reasons for Termination of Pregnancy'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','exp_p_i' ,'2','Explanation of Procedures/Issues', 2,21,1, 2, 0,'exp_p_i' ,1,3,'','' ,'Explanation of Procedures and Issues'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','exp_pop' ,'2','Explanation of Pregnancy Options', 3,21,1, 2, 0,'exp_pop' ,1,3,'','' ,'Explanation of Pregnancy Options'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','ab_contraind' ,'2','Contraindications' , 4,21,1, 2, 0,'ab_contraind',1,3,'','' ,'Contraindications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','screening' ,'2','Screening for SRHR Concerns' , 5,21,1, 2, 0,'screening' ,1,3,'','' ,'Screening for SRHR Concerns'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','in_ab_proc' ,'3','Induced Abortion Procedure' , 2, 1,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Abortion Procedure Accepted or Performed'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','ab_types' ,'3','Abortion Types' , 3,21,1, 2, 0,'ab_types' ,1,3,'','' ,'Abortion Types'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','pr_status' ,'4','Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','' ,'Pregnancy Status Confirmed'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','gest_age_by' ,'4','Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','' ,'Gestational Age Confirmed By'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','usertext12' ,'4','Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','usertext13' ,'4','RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','prep_procs' ,'4','Preparation Procedures' , 6,21,1, 0, 0,'prep_procs' ,1,3,'','' ,'Preparation Procedures'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','pre_op' ,'5','Pre-Surgery Procedures' , 1,21,1, 2, 0,'pre_op' ,1,3,'','' ,'Pre-Surgery Procedures'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','anesthesia' ,'5','Anesthesia' , 2, 1,1, 0, 0,'anesthesia' ,1,3,'','' ,'Type of Anesthesia Used'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','side_eff' ,'5','Immediate Side Effects' , 3,21,1, 2, 0,'side_eff' ,1,3,'','' ,'Immediate Side Effects (observed at intervention'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','post_op' ,'5','Post-Surgery Procedures' , 5,21,1, 2, 0,'post_op' ,1,3,'','' ,'Post-Surgery Procedures'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('GCA','qc_ind' ,'6','Quality of Care Indicators' , 1,21,1, 0, 0,'qc_ind' ,1,3,'','' ,'Quality of Care Indicators'); -- DELETE FROM layout_options WHERE form_id = 'LBFgcac'; --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','client_status','1Basic Information','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','ab_location' ,'1Basic Information','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','in_ab_proc' ,'1Basic Information','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','complications','2Complications','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','main_compl' ,'2Complications','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','contrameth' ,'3Contraception','New Method' , 1,21,1, 2, 0,'contrameth' ,1,3,'','' ,'New method adopted'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','client_status','1Basic Information','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','ab_location' ,'1Basic Information','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','in_ab_proc' ,'1Basic Information','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','complications','2Complications','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','main_compl' ,'2Complications','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','contrameth' ,'3Contraception','New Method' , 1,21,1, 2, 0,'contrameth' ,1,3,'','' ,'New method adopted'); -- The following revised or added 2009-08-19 @@ -1470,7 +1700,7 @@ UPDATE layout_options SET uor = 0 WHERE form_id = 'DEM' AND field_id = 'provider -- The following added 2009-10-12 -UPDATE layout_options AS a, list_options AS i SET a.group_name = '1Basic Data', a.title = 'Transgender', a.seq = 13, a.data_type = 26, a.uor = 1, a.description = 'Transgender', i.title = 'Transgender' WHERE a.form_id = 'DEM' AND a.field_id = 'userlist6' AND a.uor = 0 AND i.list_id = 'lists' AND i.option_id = 'userlist6'; +UPDATE layout_options AS a, list_options AS i SET a.group_id = '1', a.title = 'Transgender', a.seq = 13, a.data_type = 26, a.uor = 1, a.description = 'Transgender', i.title = 'Transgender' WHERE a.form_id = 'DEM' AND a.field_id = 'userlist6' AND a.uor = 0 AND i.list_id = 'lists' AND i.option_id = 'userlist6'; -- The following added 2010-01-17 (duplicated in ippf_upgrade.sql) @@ -1574,9 +1804,16 @@ insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, UPDATE openemr_postcalendar_categories SET pc_catname = '1 Admission', pc_catcolor = '#FFFFFF' WHERE pc_catid = 10 AND pc_catname = 'New Patient'; UPDATE openemr_postcalendar_categories SET pc_catname = '2 Re-Visit', pc_catcolor = '#CCFFFF' WHERE pc_catid = 9 AND pc_catname = 'Established Patient'; -INSERT INTO `openemr_postcalendar_categories` VALUES (12,'3 Counselling Only','#FFFFCC','Counselling',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -INSERT INTO `openemr_postcalendar_categories` VALUES (13,'4 Supply/Re-Supply','#CCCCCC','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -INSERT INTO `openemr_postcalendar_categories` VALUES (14,'5 Administrative','#FFFFFF','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); + +INSERT INTO `openemr_postcalendar_categories` + (pc_catid, pc_catname, pc_catcolor, pc_catdesc, pc_recurrtype, pc_enddate, pc_recurrspec, pc_recurrfreq, pc_duration, pc_end_date_flag, pc_end_date_type, pc_end_date_freq, pc_end_all_day, pc_dailylimit) VALUES + (12,'3 Counselling Only','#FFFFCC','Counselling',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); +INSERT INTO `openemr_postcalendar_categories` + (pc_catid, pc_catname, pc_catcolor, pc_catdesc, pc_recurrtype, pc_enddate, pc_recurrspec, pc_recurrfreq, pc_duration, pc_end_date_flag, pc_end_date_type, pc_end_date_freq, pc_end_all_day, pc_dailylimit) VALUES + (13,'4 Supply/Re-Supply','#CCCCCC','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); +INSERT INTO `openemr_postcalendar_categories` + (pc_catid, pc_catname, pc_catcolor, pc_catdesc, pc_recurrtype, pc_enddate, pc_recurrspec, pc_recurrfreq, pc_duration, pc_end_date_flag, pc_end_date_type, pc_end_date_freq, pc_end_all_day, pc_dailylimit) VALUES + (14,'5 Administrative','#FFFFFF','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -- The following added 2010-05-12: @@ -1597,23 +1834,27 @@ INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ICD9', 2, 3, 2, '', 0, 0, 0, 1); INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ACCT',13, 4, 0, '', 0, 0, 1, 0); INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('REF' ,16, 5, 0, '', 0, 1, 1, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ADM' ,17, 6, 0, '', 1, 0, 0, 0); -- The following revised/added 2010-06-11: +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFgcac', '' , 'IPPF GCAC' , 'Clinical'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFgcac', '1', 'Basic Information', '' ); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFgcac', '2', 'Complications' , '' ); DELETE FROM layout_options WHERE form_id = 'LBFgcac'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','client_status','1Basic Information','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','ab_location' ,'1Basic Information','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','in_ab_proc' ,'1Basic Information','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','complications','2Complications','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','main_compl' ,'2Complications','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','client_status','1','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','ab_location' ,'1','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','in_ab_proc' ,'1','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','complications','2','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','main_compl' ,'2','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); -- The following moved to ippf_c3_layout.sql 2011-01-18: --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','gc_rreason' ,'3IPPA CAC Section','Reason when Rejected/Referred', 1, 1,0, 0, 0,'gc_rreason' ,1,3,'','','Reason for rejecting or referring services'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','gc_reason' ,'3IPPA CAC Section','Main Reason for MR Services' , 2, 1,0, 0, 0,'gc_reason' ,1,3,'','' ,'Main reason for requesting MR services'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','gc_condition' ,'3IPPA CAC Section','Aborted Conception Condition' , 3, 1,0, 0 ,0,'gc_condition',1,3,'','' ,'Condition of Aborted Conception'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','gc_efforts' ,'3IPPA CAC Section','Efforts Prior to Visit' , 4, 1,0, 0, 0,'gc_efforts' ,1,3,'','' ,'Other efforts conducted before visiting the clinic'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFgcac','gc_complaint' ,'3IPPA CAC Section','Complaint from Client' , 5, 1,0, 0, 0,'gc_complaint',1,3,'','' ,'Complaint from Client'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','gc_rreason' ,'3IPPA CAC Section','Reason when Rejected/Referred', 1, 1,0, 0, 0,'gc_rreason' ,1,3,'','','Reason for rejecting or referring services'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','gc_reason' ,'3IPPA CAC Section','Main Reason for MR Services' , 2, 1,0, 0, 0,'gc_reason' ,1,3,'','' ,'Main reason for requesting MR services'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','gc_condition' ,'3IPPA CAC Section','Aborted Conception Condition' , 3, 1,0, 0 ,0,'gc_condition',1,3,'','' ,'Condition of Aborted Conception'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','gc_efforts' ,'3IPPA CAC Section','Efforts Prior to Visit' , 4, 1,0, 0, 0,'gc_efforts' ,1,3,'','' ,'Other efforts conducted before visiting the clinic'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFgcac','gc_complaint' ,'3IPPA CAC Section','Complaint from Client' , 5, 1,0, 0, 0,'gc_complaint',1,3,'','' ,'Complaint from Client'); -- INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_rreason','GCAC Reason to Reject/Refer Services',88); -- DELETE FROM list_options WHERE list_id = 'gc_rreason'; -- INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','1' ,'Service not available', 1); @@ -1656,7 +1897,7 @@ INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`d -- INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_complaint','4' ,'None' , 4); DELETE FROM list_options WHERE list_id = 'clientstatus'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','maaa' ,'MA Client Accepting Abortion', 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','maaa' ,'MA Client Accepting Abortion', 1,1,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','mara' ,'MA Client Refusing Abortion' , 2,0,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','refin' ,'Inbound Referral' , 3,0,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','self' ,'Self Referred' , 4,0,0); @@ -1670,27 +1911,27 @@ INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_va -- The following revised/added 2010-07-13: -DELETE FROM layout_options WHERE form_id = 'REF'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_date' ,'1Referral','Referral Date' , 5, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_from' ,'1Referral','Referred By' ,10,10,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_external' ,'1Referral','External Referral' ,15, 1,2, 0, 0,'boolean' ,1,1,'' ,'' ,'External referral?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_to' ,'1Referral','Referred To' ,20,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','body' ,'1Referral','Reason' ,25, 3,2,30, 3,'' ,1,1,'' ,'' ,'Reason for referral'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_risk_level' ,'1Referral','Risk Level' ,30, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_vitals' ,'1Referral','Include Vital Signs' ,35, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_reply_date' ,'1Referral','Expected Reply Date' ,40, 4,2, 0, 0,'' ,1,1,'' ,'D','Expected date of reply'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_related_code','1Referral','Requested Service' ,45,15,2,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','refer_diag' ,'1Referral','Preliminary Diagnosis' ,50, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_date' ,'2Counter-Referral','Reply Date' , 5, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_from' ,'2Counter-Referral','Reply From' ,10, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis' ,15, 2,0,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_final_diag' ,'2Counter-Referral','Final Diagnosis' ,20, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_documents' ,'2Counter-Referral','Documents' ,25, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_findings' ,'2Counter-Referral','Findings' ,30, 3,1,30, 3,'' ,1,1,'' ,'' ,'Findings by specialist'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_services' ,'2Counter-Referral','Services Provided' ,35, 3,0,30, 3,'' ,1,1,'' ,'' ,'Service provided by specialist'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_related_code','2Counter-Referral','Service Provided' ,40,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for actual services provided'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_recommend' ,'2Counter-Referral','Recommendations' ,45, 3,1,30, 3,'' ,1,1,'' ,'' ,'Recommendations by specialist'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('REF','reply_rx_refer' ,'2Counter-Referral','Prescriptions/Referrals',50, 3,1,30, 3,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist'); +-- DELETE FROM layout_options WHERE form_id = 'REF'; +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_date' ,'1Referral','Referral Date' , 5, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_from' ,'1Referral','Referred By' ,10,10,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_external' ,'1Referral','External Referral' ,15, 1,2, 0, 0,'boolean' ,1,1,'' ,'' ,'External referral?'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_to' ,'1Referral','Referred To' ,20,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','body' ,'1Referral','Reason' ,25, 3,2,30, 3,'' ,1,1,'' ,'' ,'Reason for referral'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_risk_level' ,'1Referral','Risk Level' ,30, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_vitals' ,'1Referral','Include Vital Signs' ,35, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_reply_date' ,'1Referral','Expected Reply Date' ,40, 4,2, 0, 0,'' ,1,1,'' ,'D','Expected date of reply'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_related_code','1Referral','Requested Service' ,45,15,2,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','refer_diag' ,'1Referral','Preliminary Diagnosis' ,50, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_date' ,'2Counter-Referral','Reply Date' , 5, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_from' ,'2Counter-Referral','Reply From' ,10, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis' ,15, 2,0,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_final_diag' ,'2Counter-Referral','Final Diagnosis' ,20, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_documents' ,'2Counter-Referral','Documents' ,25, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_findings' ,'2Counter-Referral','Findings' ,30, 3,1,30, 3,'' ,1,1,'' ,'' ,'Findings by specialist'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_services' ,'2Counter-Referral','Services Provided' ,35, 3,0,30, 3,'' ,1,1,'' ,'' ,'Service provided by specialist'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_related_code','2Counter-Referral','Service Provided' ,40,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for actual services provided'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_recommend' ,'2Counter-Referral','Recommendations' ,45, 3,1,30, 3,'' ,1,1,'' ,'' ,'Recommendations by specialist'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('REF','reply_rx_refer' ,'2Counter-Referral','Prescriptions/Referrals',50, 3,1,30, 3,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist'); -- The following added 2010-08-11: @@ -1706,35 +1947,38 @@ ALTER TABLE patient_data ADD usertext19 varchar(255) NOT NULL DEFAULT '', ADD usertext20 varchar(255) NOT NULL DEFAULT ''; -INSERT INTO `layout_options` VALUES ('DEM', 'usertext11', '6Misc', 'User Defined Text 11', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext12', '6Misc', 'User Defined Text 12', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext13', '6Misc', 'User Defined Text 13', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext14', '6Misc', 'User Defined Text 14', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext15', '6Misc', 'User Defined Text 15', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext16', '6Misc', 'User Defined Text 16', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext17', '6Misc', 'User Defined Text 17', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext18', '6Misc', 'User Defined Text 18', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext19', '6Misc', 'User Defined Text 19', 8,2,0,10,63,'',1,1,'','','User Defined'); -INSERT INTO `layout_options` VALUES ('DEM', 'usertext20', '6Misc', 'User Defined Text 20', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext11', '6', 'User Defined Text 11', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext12', '6', 'User Defined Text 12', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext13', '6', 'User Defined Text 13', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext14', '6', 'User Defined Text 14', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext15', '6', 'User Defined Text 15', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext16', '6', 'User Defined Text 16', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext17', '6', 'User Defined Text 17', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext18', '6', 'User Defined Text 18', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext19', '6', 'User Defined Text 19', 8,2,0,10,63,'',1,1,'','','User Defined'); +INSERT INTO `layout_options` (`form_id`,`field_id`,`group_id`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('DEM', 'usertext20', '6', 'User Defined Text 20', 8,2,0,10,63,'',1,1,'','','User Defined'); -- The following added 2010-12-01: INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','actorest','Actual or Estimated', 1,0); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','act' ,'Actual' ,10,1); INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','est' ,'Estimated',20,0); -UPDATE layout_options SET group_name = '1Who', title='', seq = 7, data_type = 1, +UPDATE layout_options SET group_id = '1', title='', seq = 7, data_type = 1, uor = 1, fld_length = 0, list_id = 'actorest', titlecols = 0, datacols = 0, description = 'Indicates if DOB is estimated' WHERE form_id = 'DEM' AND field_id = 'usertext3' AND uor = 0; -- The following added 2011-04-04: -UPDATE layout_options SET data_type = 14 WHERE form_id = 'REF' AND field_id = 'refer_from'; -UPDATE layout_options SET title='Referral Type', list_id = 'reftype' WHERE form_id = 'REF' AND field_id = 'refer_external' AND list_id = 'boolean'; +-- UPDATE layout_options SET data_type = 14 WHERE form_id = 'REF' AND field_id = 'refer_from'; +-- UPDATE layout_options SET title='Referral Type', list_id = 'reftype' WHERE form_id = 'REF' AND field_id = 'refer_external' AND list_id = 'boolean'; --- The following added 2011-06-09: +-- The following added 2011-06-09 and changed 2017-03-24: -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'SDP ID' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'CLIA Number' and ld.cons_id is null; +insert into lang_definitions ( cons_id, lang_id, definition ) + select lc.cons_id, 1, 'DHIS2 Code' from lang_constants as lc + left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 + where lc.constant_name = 'CLIA Number' and ld.cons_id is null; -- The following re-added 2011-08-15 because LV asked for it: @@ -1782,61 +2026,63 @@ UPDATE codes SET cyp_factor = 0.0500000 WHERE code_type = 11 AND code LIKE '1452 UPDATE codes SET cyp_factor = 0 WHERE code_type = 11 AND code LIKE '1_____112'; INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','ippfconmeth','IPPF Contraceptive Methods', 1,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111101110','COC & POC' ,01,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111111110','Combined Injectable Contraceptives (1 month)',02,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111112110','Progestogen Only Injectables (2 months)' ,03,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111113110','Progestogen Only Injectables (3 months)' ,04,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111122110','Subdermal implants 6 rods' ,05,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111123110','Subdermal implants 2 rods' ,06,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111124110','Subdermal implants 1 rod' ,07,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111132110','Transdermal Patch (1 month)' ,08,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','111133110','Vaginal Ring (1 month)' ,09,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112141110','Male Condom' ,10,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112142110','Female Condom' ,11,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112151110','Diaphragm' ,12,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112152010','Cervical Cap' ,13,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112161110','Spermicides - Foam Tabs/Tube/Suppositories' ,14,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112162110','Spermicides - Foam Tabs/Strip' ,15,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112163110','Spermicides - Foam Cans' ,16,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112164110','Spermicides - Cream & Jelly' ,17,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','112165110','Spermicides - Pessaries / C-film' ,18,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','113171110','Hormone releasing IUD (5 years)' ,19,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','113172110','Copper releasing IUD (10 years) ' ,20,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','121181213','Female VSC - Minilaparatomy' ,21,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','121181313','Female VSC - Laparoscopy' ,22,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','121181413','Female VSC - Laparotomy' ,23,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','122182213','Male VSC - Incisional vasectomy' ,24,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','122182313','Male VSC - No-scalpel Vasectomy' ,25,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','145212110','Emergency Contraception' ,26,0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111101110','COC & POC',1,0,0,'Pills'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111111110','Injectable (1 month)',2,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111112110','Injectable (2 months)',3,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111113110','Injectables (3 months)',4,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111122110','Implants 6 rods',5,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111123110','Implants 2 rods',6,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111124110','Implants 1 rod',7,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111132110','Transdermal Patch (1 month)',8,0,0,'Hormonal Other'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111133110','Vaginal Ring (1 month)',9,0,0,'Hormonal Other'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112141110','Male Condom',10,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112142110','Female Condom',11,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112151110','Diaphragm',12,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112152010','Cervical Cap',13,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112161110','Spermicides - Foam Tabs/Tube/Suppositories',14,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112162110','Spermicides - Foam Tabs/Strip',15,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112163110','Spermicides - Foam Cans',16,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112164110','Spermicides - Cream & Jelly',17,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112165110','Spermicides - Pessaries / C-film',18,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','113171110','Hormone releasing IUD (5 years)',19,0,0,'IUD'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','113172110','Copper releasing IUD (10 years)',20,0,0,'IUD'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181213','Female VSC - Minilaparatomy',21,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181313','Female VSC - Laparoscopy',22,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181413','Female VSC - Laparotomy',23,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','122182213','Male VSC - Incisional vasectomy',24,0,0,'Male VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','122182313','Male VSC - No-scalpel Vasectomy',25,0,0,'Male VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','145212110','Emergency Contraception',26,0,0,'EC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','NoMethod','No Method',30,0,0,'No Method'); -- The following revised/added 2011-10-12 and then revoked before release: -- INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lbfnames','LBFcontra','Contraception',1); -- DELETE FROM layout_options WHERE form_id = 'LBFcontra'; --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFcontra','contratype' ,'1','Action' , 1,1,2, 0, 0,'contratype' ,1,3,'','' ,'Contraception action'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFcontra','ippfconmeth','1','Method' , 2,1,1, 0, 0,'ippfconmeth',1,3,'','' ,'Contraception method'); --- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFcontra','contrastart','1','Start Date', 3,4,1,10,10,'' ,1,3,'','D','Contraception start date'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFcontra','contratype' ,'1','Action' , 1,1,2, 0, 0,'contratype' ,1,3,'','' ,'Contraception action'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFcontra','ippfconmeth','1','Method' , 2,1,1, 0, 0,'ippfconmeth',1,3,'','' ,'Contraception method'); +-- INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`) VALUES ('LBFcontra','contrastart','1','Start Date', 3,4,1,10,10,'' ,1,3,'','D','Contraception start date'); -- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','contratype','Contraception Event Types', 1,0); -- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('contratype','2','Starting contractption at association' ,2,0); -- INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('contratype','4','Method change',4,0); -- The following revised/added 2012-01-05: -INSERT INTO list_options (list_id,option_id,title,seq,option_value) VALUES ('lbfnames','LBFccicon','Contraception',1,5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFccicon', '' , 'Contraception', 'Clinical'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFccicon', '1', '' , '' ); DELETE FROM layout_options WHERE form_id = 'LBFccicon'; -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'newmauser', '1', 'First contraceptive at this clinic?', +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'newmauser', '1', 'First contraceptive at this clinic?', 1, 1, 2, 0, 0, 'boolean' , 1, 3, '', '', 'Is this the first contraceptive accepted at this clinic?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'curmethod', '1', 'Current Method', +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'curmethod', '1', 'Current Method', 2, 1, 1, 0, 0, 'contrameth' , 1, 3, '', '', 'Method in use at start of visit'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'pastmodern','1', 'Previous modern contraceptive use?', - 3, 1, 2, 0, 0, 'boolean' , 1, 3, '', '', 'Was a modern contraceptive method used at some time in the past?'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'reqmethod', '1', 'Requested Method', +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'pastmodern','1', 'Previous modern contraceptive use?', + 3, 1, 1, 0, 0, 'boolean' , 1, 3, '', '', 'Was a modern contraceptive method used at some time in the past?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'reqmethod', '1', 'Requested Method', 4, 1, 1, 0, 0, 'contrameth' , 1, 3, '', '', 'Method requested by the client'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'newmethod', '1', 'Adopted Method', - 5, 15, 1, 0, 0, '' , 1, 3, '', '', 'IPPFCM'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'provider' , '1', 'Service Provider', +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'newmethod', '1', 'Adopted Method', + 5, 1, 1, 0, 0, 'ippfconmeth', 1, 3, '', '', 'Method adopted in this visit'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'provider' , '1', 'Service Provider', 6, 10, 1, 0, 0, '' , 1, 3, '', '', 'Provider of this initial consultation'); -INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,`max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`) VALUES ('LBFccicon', 'mcreason' , '1', 'Reason for Method Change', +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'mcreason' , '1', 'Reason for Method Change', 7, 1, 1, 0, 0, 'mcreason' , 1, 3, '', '', 'Reason for method change'); -- The following added 2012-03-17: @@ -1960,6 +2206,7 @@ INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2134040 INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050502000', '', 'STI/RTI - Investigation - Examination' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050503000', '', 'STI/RTI - Investigation - Lab test' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050504000', '', 'STI/RTI - Investigation - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050505000', '', 'STI/RTI - Investigation - Lab test - Human Papilloma virus (HPV)' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050000800', '', 'STI / RTI - Investigation - unable to categorise' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010111101', '', 'Gynecology - Counselling - Pre test - Cervical cancer' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010112101', '', 'Gynecology - Counselling - Post test - Cervical cancer' ); @@ -1972,8 +2219,9 @@ INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130 INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130301202', '', 'Gynecology - Management - Medical - Erratic mensturation' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130301999', '', 'Gynecology - Management - Medical - Other' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130000800', '', 'Gynecology - Management - Medical - unable to categorise' ); -INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302401', '', 'Gynecology - Management - Surgical - Cryosurgery' ); -INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302402', '', 'Gynecology - Management - Surgical - Cauterisation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302401', '', 'Gynecology - Management - Surgical - Cervical Cancer Related - Cryosurgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302402', '', 'Gynecology - Management - Surgical - Cervical Cancer Related - Cauterization' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302501', '', 'Gynecology - Management - Surgical - cervical cancer related - Loop Electrosurgical Excision Procedure (LEEP)' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302701', '', 'Gynecology - Management - Surgical - Breast cancer' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302306', '', 'Gynecology - Management - Surgical - Menstrual Regulation' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302999', '', 'Gynecology - Management - Surgical - other' ); @@ -1991,7 +2239,6 @@ INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050 INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050503000', '', 'Gynecology - Investigation - Lab test' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050504000', '', 'Gynecology - Investigation - Sampling procedure' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050000800', '', 'Gynecology - Investigation - unable to categorise' ); -INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2150000000000', '', 'SRH non-CONTRACEPTION - OBSTETRIC SERVICES' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010131000', '', 'Obstetrics - Counselling - Ante natal' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010132000', '', 'Obstetrics - Counselling - Post natal' ); INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010000800', '', 'Obstetrics - Counselling - unable to categorise' ); @@ -2113,7 +2360,7 @@ INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4610','', 0.000000,'fab','Awareness-Based Methods - SDM'); INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4620','', 0.050000,'ec' ,'Emergency Contraception (progestin only pills)'); -# Assign related codes to IPPFCM codes for statistical reporting purposes. +-- Assign related codes to IPPFCM codes for statistical reporting purposes. UPDATE codes SET related_code = 'IPPF:111101110;IPPF2:1121120000000' WHERE code_type = 32 AND code = '4360'; UPDATE codes SET related_code = 'IPPF:111101110;IPPF2:1121120000000' WHERE code_type = 32 AND code = '4361'; UPDATE codes SET related_code = 'IPPF:111111110;IPPF2:1122120000000' WHERE code_type = 32 AND code = '4370'; @@ -2134,3 +2381,134 @@ UPDATE codes SET related_code = 'IPPF:113172110;IPPF2:1132120000000' WHERE code_ UPDATE codes SET related_code = 'IPPF:121181000;IPPF2:1141130000800' WHERE code_type = 32 AND code = '4560'; UPDATE codes SET related_code = 'IPPF:122182000;IPPF2:1142030000800' WHERE code_type = 32 AND code = '4570'; UPDATE codes SET related_code = 'IPPF:145212000;IPPF2:1151020000000' WHERE code_type = 32 AND code = '4620'; + +-- This came from an export of the new LBF Vital Signs form and its dependent lists. +DELETE FROM list_options WHERE list_id = 'VIT_GenAppear'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_GenAppear'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_GenAppear','VIT_GenAppear',404,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','A&O','Alert and oriented',10,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Let','Lethargy',40,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Other','Other',100,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Sigj','Signs of jaundice',60,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Sigv','Signs/marks of physical violence',50,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Wek','Weakness',30,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','WoA','Without anxiety',20,0,0,'','',''); +DELETE FROM list_options WHERE list_id = 'VIT_GlucoseTestType'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_GlucoseTestType'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_GlucoseTestType','VIT_GlucoseTestType',430,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','2HR','2 Hour Blood Sugar',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','A1C','Hemoglobin A1C',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','FBS','Fasting Blood Sugar',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','NS','Not Specified',5,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','OGTT','Oral Glucose Tolerance',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','Other','Other',4,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','RBS','Random Blood Sugar',1,0,0,'','',''); +DELETE FROM list_options WHERE list_id = 'VIT_TempLocation'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_TempLocation'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_TempLocation','VIT_TempLocation',419,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Axil','Axillary',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Oral','Oral',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Rectal','Rectal',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Temporal','Temporal Artery',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Tympanic','Tympanic',0,0,0,'','',''); + +-- Added 2016-12-31: + +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('lists','LAB_BloodConcentration','LAB_BloodConcentration', 1,0); +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('LAB_BloodConcentration','mg_dl' ,'mg/dl' ,1,1); +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('LAB_BloodConcentration','mmol_l','mmol/L',2,0); + +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats) VALUES ('LBFVitals', 'Vital Signs', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFVitals', '1', 'Vitals', ''); + +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','DOB' ,'1','DOB',165,4,0,0,255,'',1,3,'','DNA0','',0,'D',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_AppearGen' ,'1','General Appearance',100,21,0,1,255,'VIT_GenAppear',1,3,'','','General Appearance',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BMI' ,'1','BMI',80,2,1,10,255,'',1,3,'','G','BMI',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BMI_status' ,'1','BMI Status',85,2,1,0,255,'',1,3,'','','BMI status',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BPDiast' ,'1','BP Diastolic',40,2,1,10,255,'',1,3,'','G','Blood pressure diastolic',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BPSyst' ,'1','BP Systolic',30,2,1,10,255,'',1,3,'','G','Blood pressure systolic',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Glucose' ,'1','Glucose (mg/dl)',150,2,1,5,255,'',1,3,'','G','Glucose (mg/dl)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Glucose_TestType','1','Glucose Test Type',155,1,1,0,255,'VIT_GlucoseTestType',1,3,'','','Glucose Test Type',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Head_circum_cm' ,'1','Head Circumference (cm)',180,2,1,10,255,'',1,3,'','G','Head circumference (cms)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Head_circum_in' ,'1','Head Circumference (In)',170,2,1,10,255,'',1,3,'','G','Head circumference (ins))',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Height_cm' ,'1','Height (cm)',20,2,1,10,255,'',1,3,'','G','Height (cms)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Height_in' ,'1','Height (in)',25,2,1,10,255,'',1,3,'','G','Height (ins)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Hip_circum_cm' ,'1','Hip Circumference (cm)',220,2,0,0,10,'',1,3,'','G','Hip Circumference (cm)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Hip_circum_in' ,'1','Hip Circumference (in)',210,2,0,0,10,'',1,3,'','G','Hip Circumference (in)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_HR' ,'1','Heart Rate',60,2,0,10,255,'',1,3,'','G','Heart rate',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_O2_Satur' ,'1','Oxygen Saturation',75,2,1,10,255,'',1,3,'','G','Oxygen saturation',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Othernotes' ,'1','Notes',160,2,1,30,255,'',1,3,'','','Other general appearance',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Pulse' ,'1','Pulse (per min)',65,2,1,10,255,'',1,3,'','G','Pulse per min',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_RespRate' ,'1','Respiratory Rate',70,2,1,10,255,'',1,3,'','G','Respiratory rate',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempC' ,'1','Temperature (C)',45,2,1,10,255,'',1,3,'','G','Temperature (C)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempF' ,'1','Temperature (F)',50,2,1,10,255,'',1,3,'','G','Temperature (F)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempLoc' ,'1','Temperature Location',55,1,1,0,255,'VIT_TempLocation',1,3,'','','Temperature location',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Waist_circum_cm' ,'1','Waist Circumference (cm)',200,2,1,10,10,'',1,3,'','G','Waist Circumference (cm)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Waist_circum_in' ,'1','Waist Circumference (in)',190,2,1,10,255,'',1,3,'','G','Waist circumference (in)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Weight_kg' ,'1','Weight (kg)',15,2,1,10,255,'',1,3,'','G','Weight (kgs)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Weight_lb' ,'1','Weight (lb)',10,2,1,10,10,'',1,3,'','G','Weight (lbs)',0,'F',''); + +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats) VALUES ('LBFVNote', 'Visit Notes', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFVNote', '1', 'Visit Notes', ''); +DELETE FROM layout_options WHERE form_id = 'LBFVNote'; +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) + VALUES ('LBFVNote','Notes','1','Notes',20,3,1,50,255,'',1,3,'','','',10,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) + VALUES ('LBFVNote','Provider','1','Provider',10,10,1,0,0,'',1,3,'','','',0,'F',''); + +-- Form and associated list added 2016-10-18: + +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'Relation_to_Client'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','Relation_to_Client','Relation to Client',298,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Aunt','Aunt',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Bfriend','Boyfriend',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','BfriendLive','Boyfriend- LiveIn',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','BIL','Brother in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Cousin','Cousin',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Daughter','Daughter',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Ex','Ex-Partner',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','FamFriend','Friend of Family',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Father','Father',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','FIL','Father in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Gfriend','Girlfriend',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','GfriendLive','Girlfriend - LiveIn',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Godfather','Godfather',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Godmother','Godmother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Grandfather','Grandfather',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Grandmother','Grandmother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Husband','Husband',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','MIL','Mother in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Mother','Mother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Nephew','Nephew',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Niece','Niece',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Other','Other',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','SIL','Sister in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Son','Son',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Stepdaugh','Step-Daughter',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','StepFather','Step-Father',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','StepMother','Step-Mother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Stepson','Step-Son',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Uncle','Uncle',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Wife','Wife',0,0,0,'','',''); + +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats ) VALUES ('LBFGBV', 'GBV Screening', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFGBV', '1', 'GBV Screening', ''); +DELETE FROM layout_options WHERE form_id = 'LBFGBV'; +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child' ,'1','Were you ever touched inappropriately as a child?',40,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child_When' ,'1','___If so, when?',41,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child_Who' ,'1','___By Whom?',42,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional' ,'1','Have you ever been emotionally/psychologically abused?',10,1,2,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional_When','1','___If so, when?',11,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional_Who' ,'1','___By Whom?',12,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Fear' ,'1','Are you afraid of being harmed?',71,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Fear_Who' ,'1','___By Whom?',72,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical' ,'1','Have you ever been physically abused?',20,1,2,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical_When' ,'1','___If so, when?',21,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical_Who' ,'1','___By Whom?',22,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Pregnancy' ,'1','Have you been abused since you''ve been pregnant?',60,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Preg_When' ,'1','___If so, when?',61,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Preg_Who' ,'1','___By Whom?',62,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_SafeHome' ,'1','Will you be safe when you go home?',70,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual' ,'1','Have you ever been sexually abused?',30,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual_When' ,'1','___If so, when?',31,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual_Who' ,'1','___By Whom?',32,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); diff --git a/sql/ippf_upgrade.sql b/sql/ippf_upgrade.sql dissimilarity index 82% index 9544de02c..eaf7b58b8 100644 --- a/sql/ippf_upgrade.sql +++ b/sql/ippf_upgrade.sql @@ -1,616 +1,3205 @@ -DELETE FROM list_options WHERE list_id = 'ab_location'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('ab_location','proc' ,'Procedure at this site' , 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('ab_location','ma' ,'Followup procedure from this site' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('ab_location','part' ,'Followup procedure from partner site', 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('ab_location','oth' ,'Followup procedure from other site' , 4); - -DELETE FROM list_options WHERE list_id = 'lbfnames'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lbfnames','LBFgcac','IPPF GCAC',1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lbfnames','LBFsrh' ,'IPPF SRH' ,2); - -DELETE FROM layout_options WHERE form_id = 'LBFsrh'; -INSERT INTO layout_options VALUES ('LBFsrh','usertext15' ,'1Gynecology' ,'Menstrual History' , 1,22,1, 0, 0,'genmenhist' ,1,3,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','men_hist' ,'1Gynecology' ,'Recent Menstrual History' , 2,21,1, 2, 0,'menhist' ,1,3,'','','Recent Menstrual History'); -INSERT INTO layout_options VALUES ('LBFsrh','men_compl' ,'1Gynecology' ,'Menstrual Complications' , 3,21,1, 2, 0,'men_compl' ,1,3,'','','Menstrual Complications'); -INSERT INTO layout_options VALUES ('LBFsrh','pap_hist' ,'1Gynecology' ,'Pap Smear Recent History' , 4,22,1, 0, 0,'pap_hist' ,1,3,'','','Pap Smear Recent History'); -INSERT INTO layout_options VALUES ('LBFsrh','gyn_exams' ,'1Gynecology' ,'Gynecological Tests' , 5,23,1, 0, 0,'gyn_exams' ,1,1,'','','Gynecological test results'); -INSERT INTO layout_options VALUES ('LBFsrh','pr_status' ,'2Obstetrics' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','','Pregnancy Status Confirmed'); -INSERT INTO layout_options VALUES ('LBFsrh','gest_age_by','2Obstetrics' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','','Gestational Age Confirmed By'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext12' ,'2Obstetrics' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','usertext13' ,'2Obstetrics' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','obs_exams' ,'2Obstetrics' ,'Obstetric Tests' , 5,23,1, 0, 0,'obs_exams' ,1,1,'','','Obstetric test results'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext16' ,'2Obstetrics' ,'Obstetric History' , 6,22,1, 0, 0,'genobshist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','pr_outcome' ,'2Obstetrics' ,'Outcome of Last Pregnancy' , 7,21,1, 2, 0,'pr_outcome' ,1,3,'','','Outcome of Last Pregnancy'); -INSERT INTO layout_options VALUES ('LBFsrh','pr_compl' ,'2Obstetrics' ,'Pregnancy Complications' , 8,21,1, 2, 0,'pr_compl' ,1,3,'','','Pregnancy Complications'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext17' ,'3Basic RH (female only)' ,'Abortion Basic History' , 1,22,1, 0, 0,'genabohist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','abo_exams' ,'3Basic RH (female only)' ,'Abortion Tests' , 2,23,1, 0, 0,'abo_exams' ,1,1,'','','Abortion test results'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext18' ,'4Basic RH (female and male)','HIV/AIDS Basic History' , 1,21,1, 0, 0,'genhivhist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','hiv_exams' ,'4Basic RH (female and male)','HIV/AIDS Tests' , 2,23,1, 0, 0,'hiv_exams' ,1,1,'','','HIV/AIDS test results'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext19' ,'4Basic RH (female and male)','ITS/ITR Basic History' , 3,21,1, 0, 0,'genitshist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','its_exams' ,'4Basic RH (female and male)','ITS/ITR Tests' , 4,23,1, 0, 0,'its_exams' ,1,1,'','','ITS/ITR test results'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext20' ,'4Basic RH (female and male)','Fertility Basic History' , 5,21,1, 0, 0,'genferhist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','fer_exams' ,'4Basic RH (female and male)','Fertility Tests' , 6,23,1, 0, 0,'fer_exams' ,1,1,'','','Infertility/subfertility test results'); -INSERT INTO layout_options VALUES ('LBFsrh','fer_causes' ,'4Basic RH (female and male)','Causes of Infertility' , 7,21,1, 2, 0,'fer_causes' ,1,3,'','','Causes of Infertility'); -INSERT INTO layout_options VALUES ('LBFsrh','fer_treat' ,'4Basic RH (female and male)','Infertility Treatment' , 8,21,1, 2, 0,'fer_treat' ,1,3,'','','Infertility Treatment'); -INSERT INTO layout_options VALUES ('LBFsrh','usertext21' ,'4Basic RH (female and male)','Urology Basic History' , 9,21,1, 0, 0,'genurohist' ,1,1,'','H',''); -INSERT INTO layout_options VALUES ('LBFsrh','uro_exams' ,'4Basic RH (female and male)','Urology Tests' ,10,23,1, 0, 0,'uro_exams' ,1,1,'','','Urology test results'); -INSERT INTO layout_options VALUES ('LBFsrh','uro_disease','4Basic RH (female and male)','Male Genitourinary diseases' ,11,21,1, 2, 0,'uro_disease' ,1,3,'','','Male Genitourinary diseases'); - -DELETE FROM layout_options WHERE form_id = 'GCA'; -INSERT INTO layout_options VALUES ('GCA','reason' ,'2Counseling' ,'Reason for Termination' , 1,21,1, 0, 0,'abreasons' ,1,3,'','' ,'Reasons for Termination of Pregnancy'); -INSERT INTO layout_options VALUES ('GCA','exp_p_i' ,'2Counseling' ,'Explanation of Procedures/Issues', 2,21,1, 2, 0,'exp_p_i' ,1,3,'','' ,'Explanation of Procedures and Issues'); -INSERT INTO layout_options VALUES ('GCA','exp_pop' ,'2Counseling' ,'Explanation of Pregnancy Options', 3,21,1, 2, 0,'exp_pop' ,1,3,'','' ,'Explanation of Pregnancy Options'); -INSERT INTO layout_options VALUES ('GCA','ab_contraind' ,'2Counseling' ,'Contraindications' , 4,21,1, 2, 0,'ab_contraind',1,3,'','' ,'Contraindications'); -INSERT INTO layout_options VALUES ('GCA','screening' ,'2Counseling' ,'Screening for SRHR Concerns' , 5,21,1, 2, 0,'screening' ,1,3,'','' ,'Screening for SRHR Concerns'); -INSERT INTO layout_options VALUES ('GCA','in_ab_proc' ,'3Admission' ,'Induced Abortion Procedure' , 2, 1,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Abortion Procedure Accepted or Performed'); -INSERT INTO layout_options VALUES ('GCA','ab_types' ,'3Admission' ,'Abortion Types' , 3,21,1, 2, 0,'ab_types' ,1,3,'','' ,'Abortion Types'); -INSERT INTO layout_options VALUES ('GCA','pr_status' ,'4Preparatory' ,'Pregnancy Status Confirmed' , 1, 1,1, 0, 0,'pr_status' ,1,3,'','' ,'Pregnancy Status Confirmed'); -INSERT INTO layout_options VALUES ('GCA','gest_age_by' ,'4Preparatory' ,'Gestational Age Confirmed By' , 2, 1,1, 0, 0,'gest_age_by' ,1,3,'','' ,'Gestational Age Confirmed By'); -INSERT INTO layout_options VALUES ('GCA','usertext12' ,'4Preparatory' ,'Blood Group' , 3, 1,1, 0, 0,'bloodgroup' ,1,3,'','H',''); -INSERT INTO layout_options VALUES ('GCA','usertext13' ,'4Preparatory' ,'RH Factor' , 4, 1,1, 0, 0,'rh_factor' ,1,3,'','H',''); -INSERT INTO layout_options VALUES ('GCA','prep_procs' ,'4Preparatory' ,'Preparation Procedures' , 6,21,1, 0, 0,'prep_procs' ,1,3,'','' ,'Preparation Procedures'); -INSERT INTO layout_options VALUES ('GCA','pre_op' ,'5Intervention','Pre-Surgery Procedures' , 1,21,1, 2, 0,'pre_op' ,1,3,'','' ,'Pre-Surgery Procedures'); -INSERT INTO layout_options VALUES ('GCA','anesthesia' ,'5Intervention','Anesthesia' , 2, 1,1, 0, 0,'anesthesia' ,1,3,'','' ,'Type of Anesthesia Used'); -INSERT INTO layout_options VALUES ('GCA','side_eff' ,'5Intervention','Immediate Side Effects' , 3,21,1, 2, 0,'side_eff' ,1,3,'','' ,'Immediate Side Effects (observed at intervention'); -INSERT INTO layout_options VALUES ('GCA','post_op' ,'5Intervention','Post-Surgery Procedures' , 5,21,1, 2, 0,'post_op' ,1,3,'','' ,'Post-Surgery Procedures'); -INSERT INTO layout_options VALUES ('GCA','qc_ind' ,'6Followup' ,'Quality of Care Indicators' , 1,21,1, 0, 0,'qc_ind' ,1,3,'','' ,'Quality of Care Indicators'); - -DELETE FROM layout_options WHERE form_id = 'LBFgcac'; -INSERT INTO layout_options VALUES ('LBFgcac','client_status','1Basic Information','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); -INSERT INTO layout_options VALUES ('LBFgcac','ab_location' ,'1Basic Information','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); -INSERT INTO layout_options VALUES ('LBFgcac','in_ab_proc' ,'1Basic Information','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); -INSERT INTO layout_options VALUES ('LBFgcac','complications','2Complications','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); -INSERT INTO layout_options VALUES ('LBFgcac','main_compl' ,'2Complications','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); -INSERT INTO layout_options VALUES ('LBFgcac','contrameth' ,'3Contraception','New Method' , 1,21,1, 2, 0,'contrameth' ,1,3,'','' ,'New method adopted'); - -#IfNotRow list_options list_id occupations -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('occupations','oth','Other', 1); -DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'occupations'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','occupations','Occupations',61); -#EndIf - -UPDATE layout_options SET data_type = 26, list_id = 'occupations' WHERE form_id = 'DEM' AND field_id = 'occupation'; -UPDATE layout_options SET data_type = 26, title = 'Religion' WHERE form_id = 'DEM' AND field_id = 'userlist5'; -UPDATE layout_options SET data_type = 26, title = 'Monthly Income' WHERE form_id = 'DEM' AND field_id = 'userlist3'; -UPDATE layout_options SET data_type = 26 WHERE form_id = 'DEM' AND field_id = 'ethnoracial'; -UPDATE layout_options SET data_type = 26 WHERE form_id = 'DEM' AND field_id = 'language'; -UPDATE layout_options SET data_type = 26 WHERE form_id = 'DEM' AND field_id = 'status'; -UPDATE layout_options SET uor = 0 WHERE form_id = 'DEM' AND field_id = 'providerID'; -UPDATE layout_options SET seq = 3 WHERE form_id = 'REF' AND field_id = 'refer_external' AND seq = 5; -UPDATE layout_options SET seq = 4 WHERE form_id = 'REF' AND field_id = 'refer_to' AND seq = 3; -UPDATE layout_options SET seq = 5 WHERE form_id = 'REF' AND field_id = 'body' AND seq = 4; - -UPDATE layout_options AS a, list_options AS i SET a.group_name = '1Basic Data', a.title = 'Transgender', a.seq = 13, a.data_type = 26, a.uor = 1, a.description = 'Transgender', i.title = 'Transgender' WHERE a.form_id = 'DEM' AND a.field_id = 'userlist6' AND a.uor = 0 AND i.list_id = 'lists' AND i.option_id = 'userlist6'; - -UPDATE list_options SET title = 'Retention of Product' WHERE title = 'Incomplete Abortion or Retention of Prod'; - -UPDATE list_options SET title = 'Surgical - MVA/EVA' WHERE list_id = 'in_ab_proc' AND title = 'Surgical - MVA'; - -DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'abs'; -DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'eva'; -DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'oth'; -DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'wd'; - -UPDATE list_options SET mapping = ':2522231' WHERE list_id = 'in_ab_proc' AND option_id = 's_dnc'; -UPDATE list_options SET mapping = ':2522232' WHERE list_id = 'in_ab_proc' AND option_id = 's_dne'; -UPDATE list_options SET mapping = ':2522233' WHERE list_id = 'in_ab_proc' AND option_id = 's_mva'; -UPDATE list_options SET mapping = ':2522239' WHERE list_id = 'in_ab_proc' AND option_id = 's_oth'; -UPDATE list_options SET mapping = ':2522242' WHERE list_id = 'in_ab_proc' AND option_id = 'm_mis'; -UPDATE list_options SET mapping = ':2522241' WHERE list_id = 'in_ab_proc' AND option_id = 'm_mm'; -UPDATE list_options SET mapping = ':2522249' WHERE list_id = 'in_ab_proc' AND option_id = 'm_oth'; - -UPDATE list_options SET mapping = ':11214' WHERE list_id = 'contrameth' AND option_id = 'con'; -UPDATE list_options SET mapping = ':11215' WHERE list_id = 'contrameth' AND option_id = 'dia'; -UPDATE list_options SET mapping = ':14521' WHERE list_id = 'contrameth' AND option_id = 'ec'; -UPDATE list_options SET mapping = ':13119' WHERE list_id = 'contrameth' AND option_id = 'fab'; -UPDATE list_options SET mapping = ':11216' WHERE list_id = 'contrameth' AND option_id = 'fc'; -UPDATE list_options SET mapping = ':11113' WHERE list_id = 'contrameth' AND option_id = 'pat'; -UPDATE list_options SET mapping = ':11112' WHERE list_id = 'contrameth' AND option_id = 'imp'; -UPDATE list_options SET mapping = ':11111' WHERE list_id = 'contrameth' AND option_id = 'inj'; -UPDATE list_options SET mapping = ':11317' WHERE list_id = 'contrameth' AND option_id = 'iud'; -UPDATE list_options SET mapping = ':11110' WHERE list_id = 'contrameth' AND option_id = 'or'; -UPDATE list_options SET mapping = ':11215' WHERE list_id = 'contrameth' AND option_id = 'cap'; -UPDATE list_options SET mapping = ':11216' WHERE list_id = 'contrameth' AND option_id = 'sp'; -UPDATE list_options SET mapping = ':12.18' WHERE list_id = 'contrameth' AND option_id = 'vsc'; -UPDATE list_options SET mapping = ':00000' WHERE list_id = 'contrameth' AND option_id = 'no'; - -UPDATE list_options SET mapping = 'F' WHERE list_id = 'sex' AND option_id = 'Female'; -UPDATE list_options SET mapping = 'M' WHERE list_id = 'sex' AND option_id = 'Male'; - -#IfNotRow2D list_options list_id userlist2 mapping 1 -UPDATE list_options SET title = 'Education' WHERE list_id = 'lists' AND option_id = 'userlist2'; -DELETE FROM list_options WHERE list_id = 'userlist2'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','1','Illiterate',1,0,'0'); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','2','Basic Schooling',2,1,'1'); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','3','Advanced Schooling',3,0,'2'); -#EndIf - -#IfNotRow lang_constants constant_name (New Patient) -insert into lang_constants ( constant_name ) values ( '(New Patient)' ); -#EndIf -#IfNotRow lang_constants constant_name Active Encounter -insert into lang_constants ( constant_name ) values ( 'Active Encounter' ); -#EndIf -#IfNotRow lang_constants constant_name Active Patient -insert into lang_constants ( constant_name ) values ( 'Active Patient' ); -#EndIf -#IfNotRow lang_constants constant_name Active Patient: -insert into lang_constants ( constant_name ) values ( 'Active Patient:' ); -#EndIf -#IfNotRow lang_constants constant_name Add Copay -insert into lang_constants ( constant_name ) values ( 'Add Copay' ); -#EndIf -#IfNotRow lang_constants constant_name Add Drug -insert into lang_constants ( constant_name ) values ( 'Add Drug' ); -#EndIf -#IfNotRow lang_constants constant_name Add Patient Record -insert into lang_constants ( constant_name ) values ( 'Add Patient Record' ); -#EndIf -#IfNotRow lang_constants constant_name Appointments and Encounters -insert into lang_constants ( constant_name ) values ( 'Appointments and Encounters' ); -#EndIf -#IfNotRow lang_constants constant_name Appointments and Visits -insert into lang_constants ( constant_name ) values ( 'Appointments and Visits' ); -#EndIf -#IfNotRow lang_constants constant_name Appt-Enc -insert into lang_constants ( constant_name ) values ( 'Appt-Enc' ); -#EndIf -#IfNotRow lang_constants constant_name Cash Rec -insert into lang_constants ( constant_name ) values ( 'Cash Rec' ); -#EndIf -#IfNotRow lang_constants constant_name Cash Receipts -insert into lang_constants ( constant_name ) values ( 'Cash Receipts' ); -#EndIf -#IfNotRow lang_constants constant_name Chart -insert into lang_constants ( constant_name ) values ( 'Chart' ); -#EndIf -#IfNotRow lang_constants constant_name Chief Complaint -insert into lang_constants ( constant_name ) values ( 'Chief Complaint' ); -#EndIf -#IfNotRow lang_constants constant_name Chief Compliant -insert into lang_constants ( constant_name ) values ( 'Chief Compliant' ); -#EndIf -#IfNotRow lang_constants constant_name Client -insert into lang_constants ( constant_name ) values ( 'Client' ); -#EndIf -#IfNotRow lang_constants constant_name CO-PAY -insert into lang_constants ( constant_name ) values ( 'CO-PAY' ); -#EndIf -#IfNotRow lang_constants constant_name Collections -insert into lang_constants ( constant_name ) values ( 'Collections' ); -#EndIf -#IfNotRow lang_constants constant_name COPAY -insert into lang_constants ( constant_name ) values ( 'COPAY' ); -#EndIf -#IfNotRow lang_constants constant_name CPT4 -insert into lang_constants ( constant_name ) values ( 'CPT4' ); -#EndIf -#IfNotRow lang_constants constant_name Encounter -insert into lang_constants ( constant_name ) values ( 'Encounter' ); -#EndIf -#IfNotRow lang_constants constant_name Encounter Forms to Include in this Report: -insert into lang_constants ( constant_name ) values ( 'Encounter Forms to Include in this Report:' ); -#EndIf -#IfNotRow lang_constants constant_name Encounters -insert into lang_constants ( constant_name ) values ( 'Encounters' ); -#EndIf -#IfNotRow lang_constants constant_name Encounters Report -insert into lang_constants ( constant_name ) values ( 'Encounters Report' ); -#EndIf -#IfNotRow lang_constants constant_name Facility -insert into lang_constants ( constant_name ) values ( 'Facility' ); -#EndIf -#IfNotRow lang_constants constant_name Fee Sheet -insert into lang_constants ( constant_name ) values ( 'Fee Sheet' ); -#EndIf -#IfNotRow lang_constants constant_name Find Patient -insert into lang_constants ( constant_name ) values ( 'Find Patient' ); -#EndIf -#IfNotRow lang_constants constant_name ID -insert into lang_constants ( constant_name ) values ( 'ID' ); -#EndIf -#IfNotRow lang_constants constant_name IPPF SRH Data -insert into lang_constants ( constant_name ) values ( 'IPPF SRH Data' ); -#EndIf -#IfNotRow lang_constants constant_name IPPF SRH Data for -insert into lang_constants ( constant_name ) values ( 'IPPF SRH Data for' ); -#EndIf -#IfNotRow lang_constants constant_name Last -insert into lang_constants ( constant_name ) values ( 'Last' ); -#EndIf -#IfNotRow lang_constants constant_name New Encounter -insert into lang_constants ( constant_name ) values ( 'New Encounter' ); -#EndIf -#IfNotRow lang_constants constant_name New Encounter Form -insert into lang_constants ( constant_name ) values ( 'New Encounter Form' ); -#EndIf -#IfNotRow lang_constants constant_name New Patient -insert into lang_constants ( constant_name ) values ( 'New Patient' ); -#EndIf -#IfNotRow lang_constants constant_name Past Encounters and Documents -insert into lang_constants ( constant_name ) values ( 'Past Encounters and Documents' ); -#EndIf -#IfNotRow lang_constants constant_name Patient -insert into lang_constants ( constant_name ) values ( 'Patient' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Appointment -insert into lang_constants ( constant_name ) values ( 'Patient Appointment' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Encounter Form -insert into lang_constants ( constant_name ) values ( 'Patient Encounter Form' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Notes -insert into lang_constants ( constant_name ) values ( 'Patient Notes' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Number -insert into lang_constants ( constant_name ) values ( 'Patient Number' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Record Report -insert into lang_constants ( constant_name ) values ( 'Patient Record Report' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Report -insert into lang_constants ( constant_name ) values ( 'Patient Report' ); -#EndIf -#IfNotRow lang_constants constant_name Patient Transactions -insert into lang_constants ( constant_name ) values ( 'Patient Transactions' ); -#EndIf -#IfNotRow lang_constants constant_name Patient/Client -insert into lang_constants ( constant_name ) values ( 'Patient/Client' ); -#EndIf -#IfNotRow lang_constants constant_name PID -insert into lang_constants ( constant_name ) values ( 'PID' ); -#EndIf -#IfNotRow lang_constants constant_name Prepay -insert into lang_constants ( constant_name ) values ( 'Prepay' ); -#EndIf -#IfNotRow lang_constants constant_name Provider -insert into lang_constants ( constant_name ) values ( 'Provider' ); -#EndIf -#IfNotRow lang_constants constant_name Pt Notes/Auth -insert into lang_constants ( constant_name ) values ( 'Pt Notes/Auth' ); -#EndIf -#IfNotRow lang_constants constant_name Rendering -insert into lang_constants ( constant_name ) values ( 'Rendering' ); -#EndIf -#IfNotRow lang_constants constant_name Rx -insert into lang_constants ( constant_name ) values ( 'Rx' ); -#EndIf -#IfNotRow lang_constants constant_name Sales by Item -insert into lang_constants ( constant_name ) values ( 'Sales by Item' ); -#EndIf -#IfNotRow lang_constants constant_name Save Patient Demographic -insert into lang_constants ( constant_name ) values ( 'Save Patient Demographic' ); -#EndIf -#IfNotRow lang_constants constant_name Search or Add Patient -insert into lang_constants ( constant_name ) values ( 'Search or Add Patient ' ); -#EndIf -#IfNotRow lang_constants constant_name Select Patient -insert into lang_constants ( constant_name ) values ( 'Select Patient' ); -#EndIf -#IfNotRow lang_constants constant_name Select Patient by Last -insert into lang_constants ( constant_name ) values ( 'Select Patient by Last' ); -#EndIf -#IfNotRow lang_constants constant_name Sensitivity -insert into lang_constants ( constant_name ) values ( 'Sensitivity' ); -#EndIf -#IfNotRow lang_constants constant_name SSN -insert into lang_constants ( constant_name ) values ( 'SSN' ); -#EndIf -#IfNotRow lang_constants constant_name Superbill -insert into lang_constants ( constant_name ) values ( 'Superbill' ); -#EndIf -#IfNotRow lang_constants constant_name This Encounter -insert into lang_constants ( constant_name ) values ( 'This Encounter' ); -#EndIf -#IfNotRow lang_constants constant_name Transact -insert into lang_constants ( constant_name ) values ( 'Transact' ); -#EndIf -#IfNotRow lang_constants constant_name User & Group Administration -insert into lang_constants ( constant_name ) values ( 'User & Group Administration' ); -#EndIf -#IfNotRow lang_constants constant_name View Comprehensive Patient Report -insert into lang_constants ( constant_name ) values ( 'View Comprehensive Patient Report' ); -#EndIf -#IfNotRow lang_constants constant_name Procedures -insert into lang_constants ( constant_name ) values ( 'Procedures' ); -#EndIf -#IfNotRow lang_constants constant_name Layout Based -insert into lang_constants ( constant_name ) values ( 'Layout Based' ); -#EndIf - -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'New Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = '(New Patient)' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Active visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Active Encounter' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Active Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Active Patient' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Active Client:' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Active Patient:' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Add Payment' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Add Copay' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Add Product' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Add Drug' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Create a new OpenEMR record' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Add Patient Record' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Appointments and Visits' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Appointments and Encounters' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Charges by Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Appointments and Visits' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Appt-Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Appt-Enc' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Svcs Provider Cash Rec' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Cash Rec' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Service Provider Cash Receipts' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Cash Receipts' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'System ID' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Chart' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Reason of Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Chief Complaint' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Reason of Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Chief Compliant' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Cliente' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Client' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Payment' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'CO-PAY' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Collection Report' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Collections' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Payment' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'COPAY' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'C3' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'CPT4' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Encounter' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Visit Forms to include in this Report:' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Encounter Forms to Include in this Report:' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Visits' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Encounters' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Visits Report' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Encounters Report' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Clinic ID' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Facility' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Tally Sheet' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Fee Sheet' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Find Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Find Patient' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'ID' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'ID' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'GCAC Form (example)' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'IPPF SRH Data' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'GCAC Form (example) for' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'IPPF SRH Data for' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Last name' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Last' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'New Encounter' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'New Visit Form' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'New Encounter Form' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'New Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'New Patient' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Past Visits and Documents' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Past Encounters and Documents' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client Appointment' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Appointment' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client Visit Form' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Encounter Form' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client Notes' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Notes' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client number' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Number' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client Record Report' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Record Report' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client Report' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Report' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Referrals and Other Transactions' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient Transactions' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Patient/Client' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client ID (assign by the system)' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'PID' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Payments' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Prepay' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Service Provider' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Provider' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Client notes/Auth' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Pt Notes/Auth' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Default' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Rendering' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Prescp & Disp' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Rx' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Sales by Item' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Sales by Item' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Save Demographic Client Data' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Save Patient Demographic' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Search or Add Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Search or Add Patient ' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Select Client' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Select Patient' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Select Client by Last' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Select Patient by Last' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Risk' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Sensitivity' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'National ID' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'SSN' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Tally Sheet' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Superbill' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'This Visit' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'This Encounter' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Referrals' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Transact' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'User Administration' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'User & Group Administration' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'View Comprehensive Client Report' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'View Comprehensive Patient Report' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Diagnostic Labs & Orders' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Procedures' and ld.cons_id is null; -insert into lang_definitions ( cons_id, lang_id, definition ) select lc.cons_id, 1, 'Program' from lang_constants as lc left join lang_definitions as ld on ld.cons_id = lc.cons_id and ld.lang_id = 1 where lc.constant_name = 'Layout Based' and ld.cons_id is null; - -UPDATE openemr_postcalendar_categories SET pc_catname = '1 Admission', pc_catcolor = '#FFFFFF' WHERE pc_catid = 10 AND pc_catname = 'New Patient'; -UPDATE openemr_postcalendar_categories SET pc_catname = '2 Re-Visit', pc_catcolor = '#CCFFFF' WHERE pc_catid = 9 AND pc_catname = 'Established Patient'; -#IfNotRow openemr_postcalendar_categories pc_catid 12 -INSERT INTO `openemr_postcalendar_categories` VALUES (12,'3 Counselling Only','#FFFFCC','Counselling',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -#EndIf -#IfNotRow openemr_postcalendar_categories pc_catid 13 -INSERT INTO `openemr_postcalendar_categories` VALUES (13,'4 Supply/Re-Supply','#CCCCCC','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -#EndIf -#IfNotRow openemr_postcalendar_categories pc_catid 14 -INSERT INTO `openemr_postcalendar_categories` VALUES (14,'5 Administrative','#FFFFFF','Supply/Re-Supply',1,NULL,'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}',0,900,0,3,2,0,0); -#EndIf - -#IfNotRow globals gl_name full_new_patient_form -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'full_new_patient_form' , 0, '3' ); -#EndIf -#IfNotRow globals gl_name patient_search_results_style -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'patient_search_results_style', 0, '1' ); -#EndIf -#IfNotRow globals gl_name simplified_demographics -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'simplified_demographics' , 0, '1' ); -#EndIf -#IfNotRow globals gl_name online_support_link -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'online_support_link' , 0, '' ); -#EndIf -#IfNotRow globals gl_name units_of_measurement -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'units_of_measurement' , 0, '2' ); -#EndIf -#IfNotRow globals gl_name specific_application -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'specific_application' , 0, '2' ); -#EndIf -#IfNotRow globals gl_name inhouse_pharmacy -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'inhouse_pharmacy' , 0, '2' ); -#EndIf -#IfNotRow globals gl_name configuration_import_export -INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'configuration_import_export' , 0, '1' ); -#EndIf - -#IfNotRow code_types ct_id 11 -DELETE FROM code_types; -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('MA' ,12, 1, 0, '', 1, 1, 0, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('IPPF',11, 2, 0, '', 0, 0, 1, 0); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ICD9', 2, 3, 2, '', 0, 0, 0, 1); -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ACCT',13, 4, 0, '', 0, 0, 1, 0); -#EndIf - -#IfNotRow2D layout_options form_id LBFgcac field_id gc_rreason -DELETE FROM layout_options WHERE form_id = 'LBFgcac'; -INSERT INTO layout_options VALUES ('LBFgcac','client_status','1Basic Information','Client Status' , 1,27,2, 0, 0,'clientstatus',1,1,'','' ,'Client Status'); -INSERT INTO layout_options VALUES ('LBFgcac','ab_location' ,'1Basic Information','Type of Visit' , 2,27,2, 0, 0,'ab_location' ,1,1,'','' ,'Nature of this visit'); -INSERT INTO layout_options VALUES ('LBFgcac','in_ab_proc' ,'1Basic Information','Associated Induced Procedure', 3,27,1, 0, 0,'in_ab_proc' ,1,3,'','' ,'Applies regardless of when or where done'); -INSERT INTO layout_options VALUES ('LBFgcac','complications','2Complications','Complications' , 1,21,1, 2, 0,'complication',1,3,'','' ,'Post-Abortion Complications'); -INSERT INTO layout_options VALUES ('LBFgcac','main_compl' ,'2Complications','Main Complication' , 2, 1,1, 2, 0,'complication',1,3,'','' ,'Primary Complication'); -INSERT INTO layout_options VALUES ('LBFgcac','gc_rreason' ,'3IPPA CAC Section','Reason when Rejected/Referred', 1, 1,0, 0, 0,'gc_rreason' ,1,3,'','','Reason for rejecting or referring services'); -INSERT INTO layout_options VALUES ('LBFgcac','gc_reason' ,'3IPPA CAC Section','Main Reason for MR Services' , 1, 1,0, 0, 0,'gc_reason' ,1,3,'','' ,'Main reason for requesting MR services'); -INSERT INTO layout_options VALUES ('LBFgcac','gc_condition' ,'3IPPA CAC Section','Aborted Conception Condition' , 2, 1,0, 0 ,0,'gc_condition',1,3,'','' ,'Condition of Aborted Conception'); -INSERT INTO layout_options VALUES ('LBFgcac','gc_efforts' ,'3IPPA CAC Section','Efforts Prior to Visit' , 3, 1,0, 0, 0,'gc_efforts' ,1,3,'','' ,'Other efforts conducted before visiting the clinic'); -INSERT INTO layout_options VALUES ('LBFgcac','gc_complaint' ,'3IPPA CAC Section','Complaint from Client' , 4, 1,0, 0, 0,'gc_complaint',1,3,'','' ,'Complaint from Client'); -#EndIf - -#IfNotRow2D list_options list_id lists option_id gc_rreason -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_rreason','GCAC Reason to Reject/Refer Services',88); -DELETE FROM list_options WHERE list_id = 'gc_rreason'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','1' ,'Service not available', 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','2' ,'Cost of service' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','3' ,'Single' , 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','4' ,'Medical reason' , 4); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','5' ,'No responsible person', 5); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_rreason','6' ,'Weeks of pregnancy' , 6); -#EndIf - -#IfNotRow2D list_options list_id lists option_id gc_reason -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_reason','GCAC Main Reason for MR Services',88); -DELETE FROM list_options WHERE list_id = 'gc_reason'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','1' ,'Have already enough children' , 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','2' ,'The children are still babies' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','3' ,'Too young to have baby' , 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','4' ,'Too old to have other child' , 4); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','5' ,'Not / not yet married' , 5); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','6' ,'Still goes to school / college' , 6); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','7' ,'Engage with Official' , 7); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','8' ,'Could not stand pain / sickness of pregnancy', 8); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_reason','9' ,'Others' , 9); -#EndIf - -#IfNotRow2D list_options list_id lists option_id gc_condition -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_condition','GCAC Aborted Conception Condition',88); -DELETE FROM list_options WHERE list_id = 'gc_condition'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_condition','1' ,'Fresh' , 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_condition','2' ,'Dark' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_condition','3' ,'Sticky', 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_condition','4' ,'Others', 4); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_condition','5' ,'N/A' , 0); -#EndIf - -#IfNotRow2D list_options list_id lists option_id gc_efforts -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_efforts','GCAC Prior Efforts',88); -DELETE FROM list_options WHERE list_id = 'gc_efforts'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','1' ,'None' , 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','2' ,'Drinking herbs / medicines' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','3' ,'Had been taken care by paramedic' , 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','4' ,'Massage / went to traditional birth attendant', 4); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','5' ,'Other efforts' , 5); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_efforts','6' ,'Emergency' , 6); -#EndIf - -#IfNotRow2D list_options list_id lists option_id gc_complaint -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists','gc_complaint','GCAC Complaint from Client',88); -DELETE FROM list_options WHERE list_id = 'gc_complaint'; -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_complaint','1' ,'Facility' , 1); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_complaint','2' ,'Time of Queue' , 2); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_complaint','3' ,'Charge of Service', 3); -INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('gc_complaint','4' ,'None' , 4); -#EndIf - -#IfNotRow2D list_options list_id clientstatus option_id defer -DELETE FROM list_options WHERE list_id = 'clientstatus'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','maaa' ,'MA Client Accepting Abortion', 1,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','mara' ,'MA Client Refusing Abortion' , 2,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','refin' ,'Inbound Referral' , 3,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','self' ,'Self Referred' , 4,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','defer' ,'Deferring / Undecided' , 5,0,0); -#EndIf - -#IfNotRow2D list_options list_id ab_location option_id na -DELETE FROM list_options WHERE list_id = 'ab_location'; -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','proc' ,'Procedure at this site' , 1,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','ma' ,'Followup procedure from this site' , 2,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','part' ,'Followup procedure from partner site', 3,0,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','oth' ,'Followup procedure from other site' , 4,0,0); -#EndIf - -#IfNotRow2D layout_options form_id REF field_id reply_related_code -DELETE FROM layout_options WHERE form_id = 'REF'; -INSERT INTO layout_options VALUES ('REF','refer_date' ,'1Referral','Referral Date' , 5, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral'); -INSERT INTO layout_options VALUES ('REF','refer_from' ,'1Referral','Referred By' ,10,10,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By'); -INSERT INTO layout_options VALUES ('REF','refer_external' ,'1Referral','External Referral' ,15, 1,2, 0, 0,'boolean' ,1,1,'' ,'' ,'External referral?'); -INSERT INTO layout_options VALUES ('REF','refer_to' ,'1Referral','Referred To' ,20,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To'); -INSERT INTO layout_options VALUES ('REF','body' ,'1Referral','Reason' ,25, 3,2,30, 3,'' ,1,1,'' ,'' ,'Reason for referral'); -INSERT INTO layout_options VALUES ('REF','refer_risk_level' ,'1Referral','Risk Level' ,30, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency'); -INSERT INTO layout_options VALUES ('REF','refer_vitals' ,'1Referral','Include Vital Signs' ,35, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?'); -INSERT INTO layout_options VALUES ('REF','refer_reply_date' ,'1Referral','Expected Reply Date' ,40, 4,2, 0, 0,'' ,1,1,'' ,'D','Expected date of reply'); -INSERT INTO layout_options VALUES ('REF','refer_related_code','1Referral','Requested Service' ,45,15,2,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service'); -INSERT INTO layout_options VALUES ('REF','refer_diag' ,'1Referral','Preliminary Diagnosis' ,50, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis'); -INSERT INTO layout_options VALUES ('REF','reply_date' ,'2Counter-Referral','Reply Date' , 5, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply'); -INSERT INTO layout_options VALUES ('REF','reply_from' ,'2Counter-Referral','Reply From' ,10, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?'); -INSERT INTO layout_options VALUES ('REF','reply_init_diag' ,'2Counter-Referral','Presumed Diagnosis' ,15, 2,0,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist'); -INSERT INTO layout_options VALUES ('REF','reply_final_diag' ,'2Counter-Referral','Final Diagnosis' ,20, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist'); -INSERT INTO layout_options VALUES ('REF','reply_documents' ,'2Counter-Referral','Documents' ,25, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?'); -INSERT INTO layout_options VALUES ('REF','reply_findings' ,'2Counter-Referral','Findings' ,30, 3,1,30, 3,'' ,1,1,'' ,'' ,'Findings by specialist'); -INSERT INTO layout_options VALUES ('REF','reply_services' ,'2Counter-Referral','Services Provided' ,35, 3,0,30, 3,'' ,1,1,'' ,'' ,'Service provided by specialist'); -INSERT INTO layout_options VALUES ('REF','reply_related_code','2Counter-Referral','Service Provided' ,40,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for actual services provided'); -INSERT INTO layout_options VALUES ('REF','reply_recommend' ,'2Counter-Referral','Recommendations' ,45, 3,1,30, 3,'' ,1,1,'' ,'' ,'Recommendations by specialist'); -INSERT INTO layout_options VALUES ('REF','reply_rx_refer' ,'2Counter-Referral','Prescriptions/Referrals',50, 3,1,30, 3,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist'); -#EndIf - -#IfNotRow code_types ct_key REF -INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag) VALUES ('REF',16, 5, 0, '', 0, 1, 1, 0); -#EndIf - -#IfMissingColumn patient_data usertext11 -ALTER TABLE patient_data ADD usertext11 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext12 -ALTER TABLE patient_data ADD usertext12 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext13 -ALTER TABLE patient_data ADD usertext13 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext14 -ALTER TABLE patient_data ADD usertext14 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext15 -ALTER TABLE patient_data ADD usertext15 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext16 -ALTER TABLE patient_data ADD usertext16 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext17 -ALTER TABLE patient_data ADD usertext17 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext18 -ALTER TABLE patient_data ADD usertext18 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext19 -ALTER TABLE patient_data ADD usertext19 varchar(255) NOT NULL DEFAULT ''; -#EndIf -#IfMissingColumn patient_data usertext20 -ALTER TABLE patient_data ADD usertext20 varchar(255) NOT NULL DEFAULT ''; -#EndIf - -#IfNotRow2D layout_options form_id DEM field_id usertext11 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext11', '6Misc', 'User Defined Text 11', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext12 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext12', '6Misc', 'User Defined Text 12', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext13 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext13', '6Misc', 'User Defined Text 13', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext14 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext14', '6Misc', 'User Defined Text 14', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext15 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext15', '6Misc', 'User Defined Text 15', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext16 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext16', '6Misc', 'User Defined Text 16', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext17 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext17', '6Misc', 'User Defined Text 17', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext18 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext18', '6Misc', 'User Defined Text 18', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext19 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext19', '6Misc', 'User Defined Text 19', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf -#IfNotRow2D layout_options form_id DEM field_id usertext20 -INSERT INTO `layout_options` VALUES ('DEM', 'usertext20', '6Misc', 'User Defined Text 20', 8,2,0,10,63,'',1,1,'','','User Defined'); -#EndIf - -#IfNotRow2D list_options list_id lists option_id actorest -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','actorest','Actual or Estimated', 1,0); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','act' ,'Actual' ,10,1); -INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','est' ,'Estimated',20,0); -UPDATE layout_options SET group_name = '1Who', title='', seq = 7, data_type = 1, - uor = 1, fld_length = 0, list_id = 'actorest', titlecols = 0, datacols = 0, - description = 'Indicates if DOB is estimated' WHERE - form_id = 'DEM' AND field_id = 'usertext3' AND uor = 0; -#EndIf - +##################################################################################### +# The following restored with some revisions on 2014-11-10 so that upgrades from +# releases as old as 3.1.1.6 will work. +##################################################################################### + +UPDATE list_options SET title = 'Retention of Product' WHERE list_id = 'complication' AND title = 'Incomplete Abortion or Retention of Prod'; + +UPDATE list_options SET title = 'Surgical - MVA/EVA' WHERE list_id = 'in_ab_proc' AND title = 'Surgical - MVA'; + +DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'abs'; +DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'eva'; +DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'oth'; +DELETE FROM list_options where list_id = 'contrameth' AND option_id = 'wd'; + +UPDATE list_options SET mapping = ':2522231' WHERE list_id = 'in_ab_proc' AND option_id = 's_dnc'; +UPDATE list_options SET mapping = ':2522232' WHERE list_id = 'in_ab_proc' AND option_id = 's_dne'; +UPDATE list_options SET mapping = ':2522233' WHERE list_id = 'in_ab_proc' AND option_id = 's_mva'; +UPDATE list_options SET mapping = ':2522239' WHERE list_id = 'in_ab_proc' AND option_id = 's_oth'; +UPDATE list_options SET mapping = ':2522242' WHERE list_id = 'in_ab_proc' AND option_id = 'm_mis'; +UPDATE list_options SET mapping = ':2522241' WHERE list_id = 'in_ab_proc' AND option_id = 'm_mm'; +UPDATE list_options SET mapping = ':2522249' WHERE list_id = 'in_ab_proc' AND option_id = 'm_oth'; + +UPDATE list_options SET mapping = ':11214' WHERE list_id = 'contrameth' AND option_id = 'con'; +UPDATE list_options SET mapping = ':11215' WHERE list_id = 'contrameth' AND option_id = 'dia'; +UPDATE list_options SET mapping = ':14521' WHERE list_id = 'contrameth' AND option_id = 'ec'; +UPDATE list_options SET mapping = ':13119' WHERE list_id = 'contrameth' AND option_id = 'fab'; +UPDATE list_options SET mapping = ':11216' WHERE list_id = 'contrameth' AND option_id = 'fc'; +UPDATE list_options SET mapping = ':11113' WHERE list_id = 'contrameth' AND option_id = 'pat'; +UPDATE list_options SET mapping = ':11112' WHERE list_id = 'contrameth' AND option_id = 'imp'; +UPDATE list_options SET mapping = ':11111' WHERE list_id = 'contrameth' AND option_id = 'inj'; +UPDATE list_options SET mapping = ':11317' WHERE list_id = 'contrameth' AND option_id = 'iud'; +UPDATE list_options SET mapping = ':11110' WHERE list_id = 'contrameth' AND option_id = 'or'; +UPDATE list_options SET mapping = ':11215' WHERE list_id = 'contrameth' AND option_id = 'cap'; +UPDATE list_options SET mapping = ':11216' WHERE list_id = 'contrameth' AND option_id = 'sp'; +UPDATE list_options SET mapping = ':12.18' WHERE list_id = 'contrameth' AND option_id = 'vsc'; +UPDATE list_options SET mapping = ':00000' WHERE list_id = 'contrameth' AND option_id = 'no'; + +UPDATE list_options SET mapping = 'F' WHERE list_id = 'sex' AND option_id = 'Female'; +UPDATE list_options SET mapping = 'M' WHERE list_id = 'sex' AND option_id = 'Male'; + +#IfNotRow2D list_options list_id userlist2 mapping 1 +UPDATE list_options SET title = 'Education' WHERE list_id = 'lists' AND option_id = 'userlist2'; +DELETE FROM list_options WHERE list_id = 'userlist2'; +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','1','Illiterate',1,0,'0'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','2','Basic Schooling',2,1,'1'); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, mapping ) VALUES ('userlist2','3','Advanced Schooling',3,0,'2'); +#EndIf + +UPDATE openemr_postcalendar_categories SET pc_catname = '1 Admission', pc_catcolor = '#FFFFFF' WHERE pc_catid = 10 AND pc_catname = 'New Patient'; +UPDATE openemr_postcalendar_categories SET pc_catname = '2 Re-Visit', pc_catcolor = '#CCFFFF' WHERE pc_catid = 9 AND pc_catname = 'Established Patient'; + +# The following is problematic here because pc_cattype was added later and is required. +# We might want to handle it later. +# +# #IfNotRow openemr_postcalendar_categories pc_catid 12 +# INSERT INTO `openemr_postcalendar_categories` +# (pc_catid,pc_catname,pc_catcolor,pc_catdesc,pc_recurrtype,pc_recurrspec,pc_duration,pc_end_date_type,pc_end_date_freq) VALUES +# (12,'3 Counselling Only','#FFFFCC','Counselling',1, +# 'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}', +# 900,3,2); +# #EndIf +# #IfNotRow openemr_postcalendar_categories pc_catid 13 +# INSERT INTO `openemr_postcalendar_categories` +# (pc_catid,pc_catname,pc_catcolor,pc_catdesc,pc_recurrtype,pc_recurrspec,pc_duration,pc_end_date_type,pc_end_date_freq) VALUES +# (13,'4 Supply/Re-Supply','#CCCCCC','Supply/Re-Supply',1, +# 'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}', +# 900,3,2); +# #EndIf +# #IfNotRow openemr_postcalendar_categories pc_catid 14 +# INSERT INTO `openemr_postcalendar_categories` +# (pc_catid,pc_catname,pc_catcolor,pc_catdesc,pc_recurrtype,pc_recurrspec,pc_duration,pc_end_date_type,pc_end_date_freq) VALUES +# (14,'5 Administrative','#FFFFFF','Supply/Re-Supply',1, +# 'a:5:{s:17:\"event_repeat_freq\";s:1:\"1\";s:22:\"event_repeat_freq_type\";s:1:\"4\";s:19:\"event_repeat_on_num\";s:1:\"1\";s:19:\"event_repeat_on_day\";s:1:\"0\";s:20:\"event_repeat_on_freq\";s:1:\"0\";}', +# 900,3,2); +# #EndIf + +#IfNotTable globals +CREATE TABLE `globals` ( + `gl_name` varchar(63) NOT NULL, + `gl_index` int(11) NOT NULL DEFAULT 0, + `gl_value` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`gl_name`, `gl_index`) +) ENGINE=MyISAM; +#EndIf + +#IfNotRow globals gl_name full_new_patient_form +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'full_new_patient_form' , 0, '3' ); +#EndIf +#IfNotRow globals gl_name patient_search_results_style +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'patient_search_results_style', 0, '1' ); +#EndIf +#IfNotRow globals gl_name simplified_demographics +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'simplified_demographics' , 0, '1' ); +#EndIf +#IfNotRow globals gl_name online_support_link +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'online_support_link' , 0, '' ); +#EndIf +#IfNotRow globals gl_name units_of_measurement +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'units_of_measurement' , 0, '2' ); +#EndIf +#IfNotRow globals gl_name specific_application +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'specific_application' , 0, '2' ); +#EndIf +#IfNotRow globals gl_name inhouse_pharmacy +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'inhouse_pharmacy' , 0, '2' ); +#EndIf +#IfNotRow globals gl_name configuration_import_export +INSERT INTO globals ( gl_name, gl_index, gl_value ) VALUES ( 'configuration_import_export' , 0, '1' ); +#EndIf + +#IfNotTable code_types +CREATE TABLE code_types ( + ct_key varchar(15) NOT NULL COMMENT 'short alphanumeric name', + ct_id int(11) UNIQUE NOT NULL COMMENT 'numeric identifier', + ct_seq int(11) NOT NULL DEFAULT 0 COMMENT 'sort order', + ct_mod int(11) NOT NULL DEFAULT 0 COMMENT 'length of modifier field', + ct_just varchar(15) NOT NULL DEFAULT ''COMMENT 'ct_key of justify type, if any', + ct_mask varchar(9) NOT NULL DEFAULT ''COMMENT 'formatting mask for code values', + ct_fee tinyint(1) NOT NULL default 0 COMMENT '1 if fees are used', + ct_rel tinyint(1) NOT NULL default 0 COMMENT '1 if can relate to other code types', + ct_nofs tinyint(1) NOT NULL default 0 COMMENT '1 if to be hidden in the fee sheet', + ct_diag tinyint(1) NOT NULL default 0 COMMENT '1 if this is a diagnosis type', + PRIMARY KEY (ct_key) +) ENGINE=MyISAM; +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ICD9' , 2, 1, 2, '' , 0, 0, 0, 1); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('CPT4' , 1, 2, 2, 'ICD9', 1, 0, 0, 0); +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('HCPCS', 3, 3, 2, 'ICD9', 1, 0, 0, 0); +#EndIf + +#IfNotRow2D list_options list_id lists option_id code_types +INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('lists', 'code_types', 'Code Types', 1); +#EndIf + +#IfNotRow code_types ct_id 12 +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('MA' ,12, 1, 0, '', 1, 1, 0, 0); +#EndIf + +#IfNotRow code_types ct_id 11 +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('IPPF',11, 2, 0, '', 0, 0, 1, 0); +#EndIf + +#IfNotRow code_types ct_id 2 +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ICD9', 2, 3, 2, '', 0, 0, 0, 1); +#EndIf + +#IfNotRow code_types ct_id 13 +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ACCT',13, 4, 0, '', 0, 0, 1, 0); +#EndIf + +#IfNotRow2D list_options list_id clientstatus option_id defer +DELETE FROM list_options WHERE list_id = 'clientstatus'; +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','maaa' ,'MA Client Accepting Abortion', 1,1,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','mara' ,'MA Client Refusing Abortion' , 2,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','refin' ,'Inbound Referral' , 3,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','self' ,'Self Referred' , 4,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('clientstatus','defer' ,'Deferring / Undecided' , 5,0,0); +#EndIf + +#IfNotRow2D list_options list_id ab_location option_id ma +DELETE FROM list_options WHERE list_id = 'ab_location'; +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','proc' ,'Procedure at this site' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','ma' ,'Followup procedure from this site' , 2,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','part' ,'Followup procedure from partner site', 3,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('ab_location','oth' ,'Followup procedure from other site' , 4,0,0); +#EndIf + +#IfNotRow2D layout_options form_id REF field_id reply_related_code +DELETE FROM layout_options WHERE form_id = 'REF'; +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_date' ,'1','Referral Date' , 5, 4,2, 0, 0,'' ,1,1,'C','D','Date of referral'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_from' ,'1','Referred By' ,10,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral By'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_external' ,'1','Referral Type' ,15, 1,2, 0, 0,'reftype' ,1,1,'' ,'' ,'Type of referral'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_to' ,'1','Referred To' ,20,14,2, 0, 0,'' ,1,1,'' ,'' ,'Referral To'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','body' ,'1','Reason' ,25, 3,2,30, 3,'' ,1,1,'' ,'' ,'Reason for referral'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_risk_level' ,'1','Risk Level' ,30, 1,1, 0, 0,'risklevel',1,1,'' ,'' ,'Level of urgency'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_vitals' ,'1','Include Vital Signs' ,35, 1,1, 0, 0,'boolean' ,1,1,'' ,'' ,'Include vitals data?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_reply_date' ,'1','Expected Reply Date' ,40, 4,2, 0, 0,'' ,1,1,'' ,'D','Expected date of reply'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_related_code','1','Requested Service' ,45,15,2,30,255,'' ,1,1,'' ,'' ,'Billing Code for Requested Service'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','refer_diag' ,'1','Preliminary Diagnosis' ,50, 2,1,30,255,'' ,1,1,'' ,'X','Referrer diagnosis'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_date' ,'2','Reply Date' , 5, 4,1, 0, 0,'' ,1,1,'' ,'D','Date of reply'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_from' ,'2','Reply From' ,10, 2,1,30,255,'' ,1,1,'' ,'' ,'Who replied?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_init_diag' ,'2','Presumed Diagnosis' ,15, 2,0,30,255,'' ,1,1,'' ,'' ,'Presumed diagnosis by specialist'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_final_diag' ,'2','Final Diagnosis' ,20, 2,1,30,255,'' ,1,1,'' ,'' ,'Final diagnosis by specialist'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_documents' ,'2','Documents' ,25, 2,1,30,255,'' ,1,1,'' ,'' ,'Where may related scanned or paper documents be found?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_findings' ,'2','Findings' ,30, 3,1,30, 3,'' ,1,1,'' ,'' ,'Findings by specialist'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_services' ,'2','Services Provided' ,35, 3,0,30, 3,'' ,1,1,'' ,'' ,'Service provided by specialist'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_related_code','2','Service Provided' ,40,15,1,30,255,'' ,1,1,'' ,'' ,'Billing Code for actual services provided'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_recommend' ,'2','Recommendations' ,45, 3,1,30, 3,'' ,1,1,'' ,'' ,'Recommendations by specialist'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('REF','reply_rx_refer' ,'2','Prescriptions/Referrals',50, 3,1,30, 3,'' ,1,1,'' ,'' ,'Prescriptions and/or referrals by specialist'); +#EndIf + +## The above is irrelevant if referrals were already converted to LBTref or (later) to LBFref. +#IfTable lbt_data +DELETE FROM layout_options WHERE form_id = 'REF'; +#EndIf + +#IfMissingColumn patient_data usertext11 +ALTER TABLE patient_data ADD usertext11 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext12 +ALTER TABLE patient_data ADD usertext12 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext13 +ALTER TABLE patient_data ADD usertext13 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext14 +ALTER TABLE patient_data ADD usertext14 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext15 +ALTER TABLE patient_data ADD usertext15 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext16 +ALTER TABLE patient_data ADD usertext16 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext17 +ALTER TABLE patient_data ADD usertext17 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext18 +ALTER TABLE patient_data ADD usertext18 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext19 +ALTER TABLE patient_data ADD usertext19 varchar(255) NOT NULL DEFAULT ''; +#endIf +#IfMissingColumn patient_data usertext20 +ALTER TABLE patient_data ADD usertext20 varchar(255) NOT NULL DEFAULT ''; +#endIf + +#IfNotRow2D layout_options form_id DEM field_id usertext11 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext11', '6', 'User Defined Text 11', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext12 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext12', '6', 'User Defined Text 12', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext13 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext13', '6', 'User Defined Text 13', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext14 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext14', '6', 'User Defined Text 14', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext15 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext15', '6', 'User Defined Text 15', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext16 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext16', '6', 'User Defined Text 16', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext17 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext17', '6', 'User Defined Text 17', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext18 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext18', '6', 'User Defined Text 18', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext19 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext19', '6', 'User Defined Text 19', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf +#IfNotRow2D layout_options form_id DEM field_id usertext20 +INSERT INTO `layout_options` VALUES ('DEM', 'usertext20', '6', 'User Defined Text 20', 8,2,0,10,63,'',1,1,'','','User Defined'); +#EndIf + +#IfNotRow code_types ct_key REF +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag) VALUES ('REF',16, 5, 0, '', 0, 1, 1, 0); +#EndIf + +#IfNotRow2D list_options list_id lists option_id actorest +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','actorest','Actual or Estimated', 1,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','act' ,'Actual' ,10,1); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('actorest','est' ,'Estimated',20,0); +UPDATE layout_options SET group_id = '1', title='', seq = 7, data_type = 1, + uor = 1, fld_length = 0, list_id = 'actorest', titlecols = 0, datacols = 0, + description = 'Indicates if DOB is estimated' WHERE + form_id = 'DEM' AND field_id = 'usertext3' AND uor = 0; +#EndIf + +# 2011-08-01 we decided not to do this. +# 2011-08-10 decided to do it again. +# 2017-03-23 no more. +# UPDATE facility SET domain_identifier = facility_npi WHERE facility_npi != '' AND ( domain_identifier IS NULL OR domain_identifier = '' ); + +# The following re-added 2011-08-15 because LV asked for it. --Rod +#IfNotRow2D list_options list_id lists option_id posref +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','posref','Channels of Distribution', 1,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','01','Static Clinic' ,01,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','02','Mobile/Outreach Clinic',02,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','03','Associated Clinics' ,03,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','04','Private Physicians' ,04,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','05','CBD / CBS' ,05,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','06','MA Social Marketing' ,06,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','07','Commercial Marketing' ,07,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','08','Government' ,08,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('posref','09','Other Agencies' ,09,0); +#EndIf + +#IfNotRow2D list_options list_id lists option_id ippfconmeth +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','ippfconmeth','IPPF Contraceptive Methods', 1,0); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111101110','COC & POC',1,0,0,'Pills'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111111110','Injectable (1 month)',2,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111112110','Injectable (2 months)',3,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111113110','Injectables (3 months)',4,0,0,'Injectables'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111122110','Implants 6 rods',5,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111123110','Implants 2 rods',6,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111124110','Implants 1 rod',7,0,0,'Implants'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111132110','Transdermal Patch (1 month)',8,0,0,'Hormonal Other'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','111133110','Vaginal Ring (1 month)',9,0,0,'Hormonal Other'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112141110','Male Condom',10,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112142110','Female Condom',11,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112151110','Diaphragm',12,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112152010','Cervical Cap',13,0,0,'Barrier'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112161110','Spermicides - Foam Tabs/Tube/Suppositories',14,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112162110','Spermicides - Foam Tabs/Strip',15,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112163110','Spermicides - Foam Cans',16,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112164110','Spermicides - Cream & Jelly',17,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','112165110','Spermicides - Pessaries / C-film',18,0,0,'Spermicides'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','113171110','Hormone releasing IUD (5 years)',19,0,0,'IUD'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','113172110','Copper releasing IUD (10 years)',20,0,0,'IUD'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181213','Female VSC - Minilaparatomy',21,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181313','Female VSC - Laparoscopy',22,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','121181413','Female VSC - Laparotomy',23,0,0,'Female VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','122182213','Male VSC - Incisional vasectomy',24,0,0,'Male VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','122182313','Male VSC - No-scalpel Vasectomy',25,0,0,'Male VSC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','145212110','Emergency Contraception',26,0,0,'EC'); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`) VALUES ('ippfconmeth','NoMethod','No Method',30,0,0,'No Method'); +#EndIf + +#IfNotRow2D codes code_type 11 code 253232521 +DELETE FROM codes WHERE code_type = '11'; +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '110000000', '', 'FAMILY PLANNING METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100000', '', 'CONTRACEPTIVES - ORAL CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100119', '', 'Contraceptives - Oral Contraceptives - OC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111100999', '', 'Contraceptives - Oral Contraceptives - OC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101000', '', 'CONTRACEPTIVES - COMBINED & PROGESTOGEN-ONLY ORAL CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101110', '', 'Contraceptives - Oral Contraceptives - COC & POC - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101111', '', 'Contraceptives - Oral Contraceptives - COC & POC - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111101999', '', 'Contraceptives - Oral Contraceptives - COC & POC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110000', '', 'CONTRACEPTIVES - INJECTABLE CONTRACEPTIVES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110119', '', 'Contraceptives - Injectable Contraceptives - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111110999', '', 'Contraceptives - Injectable Contraceptives - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111000', '', 'CONTRACEPTIVES - COMBINED INJECTABLE CONTRACEPTIVES - CIC' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111110', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111111', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111111999', '', 'Contraceptives - Combined Injectable Contraceptives (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112000', '', 'CONTRACEPTIVES - PROGESTOGEN ONLY INJECTABLES (2 MONTHS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112110', '', 'Contraceptives - Progestogen Only Injectables (2 months) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112111', '', 'Contraceptives - Progestogen Only Injectables (2 months) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111112999', '', 'Contraceptives - Progestogen Only Injectables (2 months) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113000', '', 'CONTRACEPTIVES - PROGESTOGEN ONLY INJECTABLES (3 MONTHS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113110', '', 'Contraceptives - Progestogen Only Injectables (3 months) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113111', '', 'Contraceptives - Progestogen Only Injectables (3 months) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111113999', '', 'Contraceptives - Progestogen Only Injectables (3 months) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120112', '', 'Contraceptives - Subdermal Implants - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120119', '', 'Contraceptives - Subdermal Implants - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111120999', '', 'Contraceptives - Subdermal Implants - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 6 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122110', '', 'Contraceptives - Subdermal implants 6 rods - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122111', '', 'Contraceptives - Subdermal implants 6 rods - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111122999', '', 'Contraceptives - Subdermal implants 6 rods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 2 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123110', '', 'Contraceptives - Subdermal implants 2 rods - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123111', '', 'Contraceptives - Subdermal implants 2 rods - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111123999', '', 'Contraceptives - Subdermal implants 2 rods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124000', '', 'CONTRACEPTIVES - SUBDERMAL IMPLANTS 1 rods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124110', '', 'Contraceptives - Subdermal implants 1 rod - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124111', '', 'Contraceptives - Subdermal implants 1 rod - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111124999', '', 'Contraceptives - Subdermal implants 1 rod - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111130000', '', 'CONTRACEPTIVES - OTHER HORMONAL METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111130999', '', 'Contraceptives - Other hormonal methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132000', '', 'CONTRACEPTIVES - OTHER - TRANSDERMAL PATCH (1 month)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132110', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132111', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132119', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111132999', '', 'Contraceptives - Other methods - Transdermal Patch (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133000', '', 'CONTRACEPTIVES - OTHER - VAGINAL RING (1 month)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133110', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133111', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133119', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '111133999', '', 'Contraceptives - Other methods - Vaginal Ring (1 month) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112140000', '', 'CONTRACEPTIVES - CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112140999', '', 'Contraceptives - Condoms (Male and Female) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141000', '', 'CONTRACEPTIVES - MALE CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141110', '', 'Contraceptives - Condoms - Male Condom - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141111', '', 'Contraceptives - Condoms - Male Condom - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141119', '', 'Contraceptives - Condoms - Male Condom - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112141999', '', 'Contraceptives - Condoms - Male Condom - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142000', '', 'CONTRACEPTIVES - FEMALE CONDOMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142110', '', 'Contraceptives - Condoms - Female Condom - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142111', '', 'Contraceptives - Condoms - Female Condom - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142119', '', 'Contraceptives - Condoms - Female Condom - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112142999', '', 'Contraceptives - Condoms - Female Condom - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150000', '', 'CONTRACEPTIVES - TYPES OF DIAPHRAGMS / CERVICAL CAPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150119', '', 'Contraceptives - Diaphragm / Cervical Cap - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112150999', '', 'Contraceptives - Diaphragm / Cervical Cap - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151000', '', 'CONTRACEPTIVES - DIAPHRAGMS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151110', '', 'Contraceptives - Diaphragm - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151111', '', 'Contraceptives - Diaphragm - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112151999', '', 'Contraceptives - Diaphragm - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152000', '', 'CONTRACEPTIVES - CERVICAL CAPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152010', '', 'Contraceptives - Cervical Cap - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152011', '', 'Contraceptives - Cervical Cap - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112152999', '', 'Contraceptives - Cervical Cap - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160000', '', 'CONTRACEPTIVES - SPERMICIDES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160119', '', 'Contraceptives - Spermicides - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112160999', '', 'Contraceptives - Spermicides - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM TABS/TUBE/SUPPOSITIORIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161110', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161111', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112161999', '', 'Contraceptives - Spermicides - Foam Tabs/Tube/Suppositories - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM TAB/STRIPS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162110', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162111', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112162999', '', 'Contraceptives - Spermicides - Foam Tabs/Strip - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163000', '', 'CONTRACEPTIVES - SPERMICIDES - FOAM CANS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163110', '', 'Contraceptives - Spermicides - Foam Cans - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163111', '', 'Contraceptives - Spermicides - Foam Cans - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112163999', '', 'Contraceptives - Spermicides - Foam Cans - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164000', '', 'CONTRACEPTIVES - SPERMICIDES - CREAM & JELLY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164110', '', 'Contraceptives - Spermicides - Cream & Jelly - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164111', '', 'Contraceptives - Spermicides - Cream & Jelly - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112164999', '', 'Contraceptives - Spermicides - Cream & Jelly - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165000', '', 'CONTRACEPTIVES - SPERMICIDES - PESSARIES / C-FILM' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165110', '', 'Contraceptives - Spermicides - Pessaries / C-film - Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165111', '', 'Contraceptives - Spermicides - Pessaries / C-film - Follow up/Resupply' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '112165999', '', 'Contraceptives - Spermicides - Pessaries / C-film - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170000', '', 'CONTRACEPTIVES - IUD' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170112', '', 'Contraceptives - IUD - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170119', '', 'Contraceptives - IUD - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113170999', '', 'Contraceptives - IUD - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171000', '', 'CONTRACEPTIVES - IUD (5 years)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171110', '', 'Contraceptives - IUD (5 years) - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171111', '', 'Contraceptives - IUD (5 years) - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113171999', '', 'Contraceptives - IUD (5 years) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172000', '', 'CONTRACEPTIVES - IUD (10 years)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172110', '', 'Contraceptives - IUD (10 years) - Initial Consultation/Insertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172111', '', 'Contraceptives - IUD (10 years) - Follow up/Reinsertion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '113172999', '', 'Contraceptives - IUD (10 years) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '120180000', '', 'CONTRACEPTION - VOLUNTARY SURGICAL CONTRACEPTION (VSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '120180999', '', 'Contraception - Voluntary Surgical Contraception (VSC) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181000', '', 'CONTRACEPTION - FEMALE VOLUNTARY SURGICAL CONTRACEPTION (FVSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181112', '', 'Contraception Surgical - Female VSC - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181119', '', 'Contraception Surgical - Female VSC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181211', '', 'Contraception Surgical - Female VSC - Minilaparatomy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181213', '', 'Contraception Surgical - Female VSC - Minilaparatomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181311', '', 'Contraception Surgical - Female VSC - Laparoscopy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181313', '', 'Contraception Surgical - Female VSC - Laparoscopy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181411', '', 'Contraception Surgical - Female VSC - Laparotomy - Follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181413', '', 'Contraception Surgical - Female VSC - Laparotomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '121181999', '', 'Contraception Surgical - Female VSC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182000', '', 'CONTRACEPTION - MALE VOLUNTARY SURGICAL CONTRACEPTION (MVSC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182112', '', 'Contraception Surgical - Male VSC - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182119', '', 'Contraception Surgical - Male VSC - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182211', '', 'Contraception Surgical - Male VSC - Incisional vasectomy - Follow up (Sperm count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182213', '', 'Contraception Surgical - Male VSC - Incisional vasectomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182311', '', 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Follow up (Sperm count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182313', '', 'Contraception Surgical - Male VSC - No-scalpel Vasectomy - Contraceptive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '122182999', '', 'Contraception Surgical - Male VSC - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '130190000', '', 'CONTRACEPTION - AWARENESS-BASED METHODS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '130190999', '', 'Contraception - Awareness-Based Methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191000', '', 'CONTRACEPTION - FERTILITY AWARENESS-BASED METHODS (FABM)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191119', '', 'Contraception FAB Methods - Method Specific Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191210', '', 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191211', '', 'Contraception FAB Methods - Cervical Mucous Method (CMM) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191310', '', 'Contraception FAB Methods - Calendar Based Method (CBM) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191311', '', 'Contraception FAB Methods - Calendar Based Method (CBM) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191410', '', 'Contraception FAB Methods - Sympto-thermal method - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191411', '', 'Contraception FAB Methods - Sympto-thermal method - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191510', '', 'Contraception FAB Methods - Standard days method - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191511', '', 'Contraception FAB Methods - Standard days method - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191610', '', 'Contraception FAB Methods - Basal Body Temperature (BBT) - Initial Consultation/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191611', '', 'Contraception FAB Methods - Basal Body Temperature (BBT) - Follow up/Training' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '131191999', '', 'Contraception - FAB Methods - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200000', '', 'FAMILY PLANNING GENERAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200118', '', 'Contraception - FP General Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200218', '', 'Contraception - FP General Counselling - Combined Counselling (FP - HIV/AIDS incl. Dual protection' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '141200999', '', 'Contraception - FP General Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145210000', '', 'EMERGENCY CONTRACEPTION SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145210999', '', 'Emergency Contraception Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211000', '', 'EC - COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211119', '', 'EC - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145211999', '', 'EC - Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212000', '', 'EC - THERAPEUTIC' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212110', '', 'EC - Combined Oral Contraceptives - Yuzpe - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212111', '', 'EC - Combined Oral Contraceptives - Yuzpe - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212210', '', 'EC Progestogen Only Pills - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212211', '', 'EC Progestogen Only Pills - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212310', '', 'EC Dedicated Product - Contraceptive Supply (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212311', '', 'EC Dedicated Product - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212410', '', 'EC Copper releasing IUD - DIU Insertion (Treatment)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212411', '', 'EC Copper releasing IUD - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '145212999', '', 'EC - Therapeutic - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '250000000', '', 'SRH (NON FAMILY PLANNING) SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252220000', '', 'ABORTION SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252220999', '', 'Abortion Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221000', '', 'ABORTION / PRE ABORTION COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221129', '', 'Abortion / Pre Abortion Counselling - Pregnancy options Counseling - Including Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221229', '', 'Abortion / Pre Abortion Counselling - Counselling on HIV Testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221329', '', 'Abortion / Pre Abortion Counselling Harm Reduction Initial Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252221999', '', 'Abortion / Pre Abortion Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222000', '', 'ABORTION / PRE-ABORTION DIAGNOSTICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222121', '', 'Abortion Diagnosis - Exclusion of Anaemia (Haemoglobin and/or Hematocrit tests)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222221', '', 'Abortion Diagnosis - Tests for ABO and Rhesus (Rh) blood groups typing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222321', '', 'Abortion Diagnosis - Exclusion of ectopic pregnancy (through ultrasound)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222421', '', 'Abortion Diagnosis - Cervical cytology (Pap test or visual acid test)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222521', '', 'Abortion Diagnosis - HIV testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252222999', '', 'Abortion Diagnosis - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223000', '', 'ABORTION / INDUCED - SURGICAL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223123', '', 'Abortion Induced (Surgical) - Dilatation And Curettage (D&C)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223223', '', 'Abortion Induced (Surgical) - Dilatation And Evacuation (D&E) (2nd trimester of pregnancy)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223323', '', 'Abortion Induced (Surgical) - Vacuum Aspiration (Manual or Electrical)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252223999', '', 'Abortion Induced (Surgical) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224000', '', 'ABORTION (MEDICAL)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224122', '', 'Abortion Induced (Medical) - Drug induced (combination of mifepristone and misopristol))' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224222', '', 'Abortion Induced (Medical) - Drug induced (Misoprostol Only)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252224999', '', 'Abortion Induced (Medical) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225000', '', 'ABORTION / INCOMPLETE ABORTION TREATMENT (SURGICAL/MEDICAL)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225123', '', 'Abortion (Incomplete Abortion) - Surgical treatment / D&C or D&E' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225223', '', 'Abortion (Incomplete Abortion) - Surgical treatment / Vacuum aspiration' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225722', '', 'Abortion (Incomplete Abortion) - Medical treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252225999', '', 'Abortion (Incomplete Abortion) - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226000', '', 'ABORTION / POST ABORTION FOLLOW UP' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226120', '', 'Abortion - Post - Follow-up incl. Uterine Involution Monitoring & Bimanual Pelvic Exam.' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252226999', '', 'Abortion - Post Abortion Follow-up - OTHER (including treatment of complications)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227000', '', 'ABORTION / POST ABORTION COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227129', '', 'Abortion Counselling - Post Abortion Counseling - Including Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227229', '', 'Abortion Counselling Harm Reduction Follow-up Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '252227999', '', 'Abortion Counselling - Post Abortion Counseling and family planning counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253230000', '', 'HIV and AIDS SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253230999', '', 'HIV and AIDS Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231000', '', 'HIV and AIDS TREATMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231122', '', 'HIV and AIDS - Treatment- Anti Retro Viral (ARV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231222', '', 'HIV and AIDS - Treatment - Opportunistic Infection (OI)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231322', '', 'HIV and AIDS - Treatment - Post Exposure Prophylaxis (PEP)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231422', '', 'HIV and AIDS - Treatment - Psycho-Social Support' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231522', '', 'HIV and AIDS - Treatment - Home Care' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253231999', '', 'HIV and AIDS - Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232000', '', 'HIV and AIDS DIAGNOSTIC LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232121', '', 'HIV and AIDS Diagnostic Lab Tests - ELISA (Blood) Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232221', '', 'HIV and AIDS Diagnostic Lab Tests - Western Blot (WB) Assay' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232321', '', 'HIV and AIDS Diagnostic Lab Tests - Indirect Immunofluorescence Assay (IFA)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232421', '', 'HIV and AIDS Diagnostic Lab Tests - Rapid Test (Murex-SUDS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232521', '', 'HIV and AIDS Diagnostic Lab tests - Urine Test for HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253232999', '', 'HIV and AIDS Lab Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233000', '', 'HIV and AIDS STAGING AND MONITORING TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233121', '', 'HIV and AIDS Other Lab Tests - Urine Test for HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233221', '', 'HIV and AIDS Staging and monitoring Tests - Assessment of Immunologic Function (Viral Load)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233321', '', 'HIV and AIDS Staging and monitoring Tests - Assessment of Immunologic Function (CD4 count)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253233999', '', 'HIV and AIDS Staging and monitoring Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234000', '', 'HIV and AIDS PREVENTION COUNSELING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234129', '', 'HIV and AIDS Prevention Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253234999', '', 'HIV and AIDS Prevention Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235000', '', 'HIV and AIDS PRE/POST TEST COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235129', '', 'HIV and AIDS Counselling - PRE Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235229', '', 'HIV and AIDS Counselling - POST Test (Positive) - Clients Only' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235329', '', 'HIV and AIDS Counseling - POST Test (Negative)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235429', '', 'HIV and AIDS Counseling - POST Test (Positive) - Sexual Partners' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235529', '', 'HIV and AIDS Counselling - POST Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '253235999', '', 'HIV and AIDS Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254240000', '', 'STI/RTI SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254240999', '', 'STI/RTI Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241000', '', 'STI/RTI PREVENTION / POST TEST COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241129', '', 'STI/RTI Counseling - Prevention Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241229', '', 'STI/RTI Counseling - POST Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254241999', '', 'STI/RTI Prevention / Post Test Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242000', '', 'STI/RTI CONSULTATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242120', '', 'STI/RTI Consultation - Follow Up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254242999', '', 'STI/RTI Consultation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243000', '', 'STI/RTI LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243121', '', 'STI/RTI Test - Bacterial Vaginosis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243221', '', 'STI/RTI Test - Candidiasis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243321', '', 'STI/RTI Test - Chancroid' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243421', '', 'STI/RTI Test - Chlamydia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243521', '', 'STI/RTI Test - Gonorrhea' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254243999', '', 'STI/RTI Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244000', '', 'STI/RTI LAB TESTS (CONTINUED)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244121', '', 'STI/RTI Test - Herpes Simplex (HSV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244221', '', 'STI/RTI Test - Human Papillomavirus (HPV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244321', '', 'STI/RTI Test - Syphilis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244421', '', 'STI/RTI Test - Trichomoniasis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244521', '', 'STI/RTI Test - Hepatitis A and B' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244621', '', 'STI/RTI Test - Hepatitis A' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244721', '', 'STI/RTI Test - Hepatitis B' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254244999', '', 'STI/RTI Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245000', '', 'STI/RTI TREATMENT (including prophylactics)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245122', '', 'STI/RTI Treatment - based on syndromic approach' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245222', '', 'STI/RTI Treatment - Etiological diagnosis with clinical treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245322', '', 'STI/RTI Treatment - Hepatitis A vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245422', '', 'STI/RTI Treatment - Hepatitis B vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245522', '', 'STI/RTI Treatment - HPV vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254245999', '', 'STI/RTI Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246000', '', 'STI/RTI TREATMENT 1' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246122', '', 'STI Treatment for Bacterial Vaginosis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246222', '', 'STI Treatment for Candidiasis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246322', '', 'STI Treatment for Chancroid based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246422', '', 'STI Treatment for Chlamydia based on positive lab tes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254246522', '', 'STI Treatment for Gonorrhea based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247000', '', 'STI/RTI TREATMENT 2' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247122', '', 'STI Treatment for Herpes Simplex (HSV) based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247222', '', 'STI Treatment for Human Papillomavirus (HPV) based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247322', '', 'STI Treatment for Syphilis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247422', '', 'STI Treatment for Trichomoniasis based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247522', '', 'STI Treatment for Hepatitis A based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247622', '', 'STI Treatment for Hepatitis B based on positive lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '254247999', '', 'STI/RTI Treatment based on laboratory diagnostic tests -OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255250000', '', 'GYNECOLOGICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255250999', '', 'Gynecological Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251000', '', 'GYNECOLOGICAL BIOPSY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251123', '', 'Gynecological Biopsy - Conization' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251223', '', 'Gynecological Biopsy - Needle Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251323', '', 'Gynecological Biopsy - Aspiration Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251423', '', 'Gynecological Biopsy - Dilatation & Curretage (D&C)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255251999', '', 'Gynecological Biopsy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252000', '', 'GYNECOLOGICAL ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252123', '', 'Gynecological Endoscopy - Colposcopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252223', '', 'Gynecological Endoscopy - Laparoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252323', '', 'Gynecological Endoscopy - Hysteroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252423', '', 'Gynecological Endoscopy - Culdoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252523', '', 'Gynecological Endoscopy - Hysteretomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252623', '', 'Gynecological Endoscopy - Ovariectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252723', '', 'Gynecological Endoscopy - Mastectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252823', '', 'Gynecological Endoscopy - Lumpectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255252999', '', 'Gynecological Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253000', '', 'GYNECOLOGICAL DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253121', '', 'Gynecological Diagnostic Imaging - Radiography - Hysterosalpingography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253221', '', 'Gynecological Diagnostic Imaging - Radiography - Mammography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253321', '', 'Gynecological Diagnostic Imaging - Ultrasonography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253421', '', 'Gynecological Diagnostic Imaging - Tomography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253521', '', 'Gynecological Diagnostic Imaging - Dexa, Bone Density Scan' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255253999', '', 'Gynecological Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254000', '', 'GYNECOLOGICAL EXAM DIAGNOSIS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254121', '', 'Gynecological Exam - Manual Pelvic Exam (includes Palpation)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254221', '', 'Gynecological Exam - Manual Breast Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254321', '', 'Gynecological Exam - Cervical cancer screening (Pap smear)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254421', '', 'Gynecological Exam - Consultation without pelvic exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254521', '', 'Gynecological Exam Cervical cancer screening Visual Inspection (VIA or VILI)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254621', '', 'Gynecological Exam Cervical cancer screening - Liquid-based cytology (sampling procedure)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254721', '', 'Gynecological Exam Cervical cancer screening - HPV DNA test (sampling procedure)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255254999', '', 'Gynecological Exam - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255000', '', 'GYNECOLOGICAL CYTOLOGIC TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255121', '', 'Gynecological Lab Test - Cytology Analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255221', '', 'Gynecological Lab Test - Cytology Analysis - Liquid-based cytology' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255321', '', 'Gynecological Lab Test -Cervical cancer screening - HPV DNA test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255255999', '', 'Gynecological Lab Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256000', '', 'GYNECOLOGICAL THERAPIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256122', '', 'Gynecological Therapies - Menopause Consultations, Hormonal Replacement Therapy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256222', '', 'Gynecological Therapies - Menstrual regulation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256322', '', 'Gynecological Therapies - Female Genital Mutilation Treatment of Complications' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256422', '', 'Gynecological Therapies Treatment of erratic menstruation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255256999', '', 'Gynecological Therapies - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257000', '', 'GYNECOLOGICAL SURGERIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257123', '', 'Gynecological Surgeries - Cryosurgery - Cervical' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257223', '', 'Gynecological Surgeries - Cauterization (Cervical / Vaginal)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257323', '', 'Gynecological Surgeries - Female Genital Mutilation Reconstructive Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255257999', '', 'Gynecological Surgeries - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258000', '', 'GYNECOLOGICAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258129', '', 'Gynecological Counselling - Menopause Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258229', '', 'Gynecological Counselling - Pap Smear - Pre-test counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258329', '', 'Gynecological Counselling - Pap Smear, Abnormal Results (post test follow-up)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258429', '', 'Gynecological Counselling - Breast Exam Results, Mammography/Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258529', '', 'Gynecological Counselling - Female Genital Mutilation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258629', '', 'Gynecological Counselling- Pap smear - Post-test counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '255258999', '', 'Gynecological Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256260000', '', 'OBSTETRICS SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256260999', '', 'Obstetric Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261000', '', 'OBSTETRICS - PRE NATAL DIAGNOSTIC PROCEDURES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261121', '', 'Obstetrics - Pre-Natal Diagnostic - Fetoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261221', '', 'Obstetrics - Pre-Natal Diagnostic - Ultrasonography, Pre-natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261321', '', 'Obstetrics - Pre-Natal Diagnostic - Pelvimetry' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261421', '', 'Obstetrics - Pre-Natal Diagnostic - Placental Function Tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256261999', '', 'Obstetrics - Pre-Natal Diagnostic - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262000', '', 'OBSTETRICS - PRE NATAL CARE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262121', '', 'Obstetrics - Pre natal Care - Uterine Monitoring' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262221', '', 'Obstetrics - Pre natal Care - Fetal Monitoring' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262422', '', 'Obstetrics - Pre natal Care - Immunisations' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256262999', '', 'Obstetrics - Pre natal Care - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263000', '', 'OBSTETRICS - PRE NATAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263129', '', 'Obstetrics - Pre natal Counselling - Pre Natal Care Info' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263229', '', 'Obstetrics - Pre natal Counselling - Unplanned Pregnancy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263329', '', 'Obstetrics - Pre natal Counselling - HIV Prevention and Testing' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256263999', '', 'Obstetrics - Pre natal Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264000', '', 'OBSTETRICS - PREGNANCY TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264121', '', 'Obstetrics - Pregnancy Tests - Agglutination Inhibition - Urine 1 test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264221', '', 'Obstetrics - Pregnancy Tests - Radioimmunoasays - Blood test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256264999', '', 'Obstetrics - Pregnancy Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265000', '', 'OBSTETRICS - PRE NATAL LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265121', '', 'Obstetrics - Pre-Natal Lab Tests - Urine 1' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265221', '', 'Obstetrics - Pre-Natal Lab Tests - Fasting blood sugar' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265321', '', 'Obstetrics - Pre-Natal Lab Tests - Hemoglobin (HB)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265421', '', 'Obstetrics - Pre-Natal Lab Tests - Blood Type' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265521', '', 'Obstetrics - Pre-Natal Lab Tests - VDRL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265621', '', 'Obstetrics - Pre-Natal Lab Tests - HIV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265721', '', 'Obstetrics - Pre-Natal Lab Tests - Amniocentesis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265821', '', 'Obstetrics - Pre-Natal Lab Tests - Chorionic Villi Sampling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256265999', '', 'Obstetrics - Pre-Natal Lab Tests - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267000', '', 'OBSTETRICS - CHILD BIRTH' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267123', '', 'Obstetrics - Child Birth, Vaginal Delivery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267223', '', 'Obstetrics - Child Birth, Cesarean Delivery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267323', '', 'Obstetrics - Emergency Obstetric Care (EmOC)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256267999', '', 'Obstetrics - Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268000', '', 'OBSTETRICS - POST NATAL CARE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268120', '', 'Obstetrics - Post natal Care - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256268999', '', 'Obstetrics - Post natal Care - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269000', '', 'OBSTETRICS - POST NATAL COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269129', '', 'Obstetrics - Post-Natal Counselling - FP Methods' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269229', '', 'Obstetrics - Post-Natal Counselling - Breastfeeding Advice' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269329', '', 'Obstetrics - Post-Natal Counselling - HIV Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '256269999', '', 'Obstetrics - Post-Natal Counselling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257270000', '', 'UROLOGICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257270999', '', 'Urological Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271000', '', 'UROLOGICAL ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271123', '', 'Urological Endoscopy - Cystoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271223', '', 'Urological Endoscopy - Ureteroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257271999', '', 'Urological Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272000', '', 'UROLOGICAL DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272121', '', 'Urological Diagnostic Imaging - Urography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257272999', '', 'Urological Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273000', '', 'UROLOGICAL DIAGNOSIS (OTHER )' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273121', '', 'Urological Diagnosis Other - Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273221', '', 'Urological Diagnosis Other - Prostate Cancer Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273321', '', 'Urological Diagnosis Other - Peniscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273421', '', 'Urological Diagnosis Other - Other Urogenital Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257273999', '', 'Urological Diagnosis Other - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274000', '', 'UROLOGICAL SURGERY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274123', '', 'Urological Male Surgery - Biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274223', '', 'Urological Male Surgery - Circumcision' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274323', '', 'Urological Male Surgery - Other Surgical Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '257274999', '', 'Urological Male Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258280000', '', 'INFERTILITY SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258280999', '', 'Infertility/Subfertility - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281000', '', 'INFERTILITY BIOPSY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281123', '', 'Infertility Biopsy - Endometrial biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281223', '', 'Infertility Biopsy - Testicular biopsy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258281999', '', 'Infertility Biopsy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282000', '', 'INFERTILITY ENDOSCOPY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282123', '', 'Infertility Endoscopy - Laparoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282223', '', 'Infertility Endoscopy - Histeroscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258282999', '', 'Infertility Endoscopy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283000', '', 'INFERTILITY DIAGNOSTIC IMAGING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283121', '', 'Infertility Diagnostic Imaging - Histerosalpingography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283221', '', 'Infertility Diagnostic Imaging - Ovarian ultrasound' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283321', '', 'Infertility Diagnostic Imaging - Transvaginal ecography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258283999', '', 'Infertility Diagnostic Imaging - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284000', '', 'INFERTILITY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284121', '', 'Infertility Lab Test - Post-coital test or Sims-Huhner test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284221', '', 'Infertility Lab Test - Fallopian Tube Patency Tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284321', '', 'Infertility Lab Test - Clomiphene citrate challenge test (CCCT)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284421', '', 'Infertility Lab Test - Semen analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284521', '', 'Infertility Lab Test - Basal Temperature' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284621', '', 'Infertility Lab Test - Mucose Analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284721', '', 'Infertility Lab Test - Sperm Count' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284821', '', 'Infertility Lab Test - Spermiogram' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284921', '', 'Infertility Lab Test - Hormonal analysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258284999', '', 'Infertility Lab Test - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286000', '', 'INFERTILITY TREATMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286122', '', 'Infertility Treatment - Ovulation Induction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286222', '', 'Infertility Treatment - Embryo Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286322', '', 'Infertility Treatment - Fertilization in Vitro' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286422', '', 'Infertility Treatment - Gamete Intrafallopian Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286522', '', 'Infertility Treatment - Artificial Insemination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286622', '', 'Infertility Treatment - Oocyte Donation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286722', '', 'Infertility Treatment - Zygote Intrafallopian Transfer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258286999', '', 'Infertility Treatment - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288000', '', 'INFERTILITY CONSULTATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288120', '', 'Infertility/Subfertility Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258288999', '', 'Infertility/Subfertility Consultation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289000', '', 'INFERTILITY COUNSELLING' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289129', '', 'Infertility/Subfertility Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '258289999', '', 'Infertility/Subfertility Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '260290000', '', 'OTHER SPECIALIZED COUNSELLING SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '260290999', '', 'Other Specialized Counselling Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291000', '', 'COUNSELLING - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291129', '', 'Counselling - GBV - Individual Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291229', '', 'Counselling - GBV - Support Groups for Survivors' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291329', '', 'Counselling - GBV - Legal Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291429', '', 'Counselling - GBV - Intimate Partner Sexual Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291529', '', 'Counselling - GBV - Intimate Partner Physical Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291629', '', 'Counselling - GBV - Intimate Partner Emotional Abuse' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291729', '', 'Counselling - GBV - NonIntimate Partner Sexual Assalt/Rape' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291829', '', 'Counselling - GBV - Screening Only' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '261291999', '', 'Counselling - GBV - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292000', '', 'COUNSELLING - DOMESTIC VIOLENCE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292129', '', 'Counselling - Domestic Violence' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292229', '', 'Counselling - Domestic Violence, Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262292999', '', 'Counselling - Domestic Violence - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293000', '', 'COUNSELLING - FAMILY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293129', '', 'Counselling - Family - Parent/Child Relationship' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293229', '', 'Counselling - Family- Family Conflict' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293329', '', 'Counselling - Family, Delinquency' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262293999', '', 'Counselling - Family - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294000', '', 'COUNSELLING - PRE-MARITAL / MARITAL' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294129', '', 'Counselling - Pre-Marital including Pre-Marital Family Planning' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294229', '', 'Counselling - Marital - Relationship, Partner Negotiation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294329', '', 'Counselling - Marital - Sexuality / Sexual Disfunction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262294999', '', 'Counselling - Marital - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295000', '', 'COUNSELLING - YOUTH (less than 25 yrs)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295129', '', 'Counselling - Youth - Life Skills Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295229', '', 'Counselling - Youth - Sexuality' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295329', '', 'Counselling - Youth - Telephone / Internet Hotline Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295429', '', 'Counselling - Youth - SRH Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262295999', '', 'Counselling - Youth - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296000', '', 'COUNSELLING - MALE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296129', '', 'Counselling - Male - SRH Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296229', '', 'Counselling - Male - Sexuality' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296329', '', 'Counselling - Male - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '262296999', '', 'Counselling - Male - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297000', '', 'COUNSELLING SERVICES (OTHER)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297129', '', 'Counseling - Other - Sexuality Issues ( 25 years and over)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '263297999', '', 'Counseling - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298000', '', 'OTHER SRH MEDICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298120', '', 'Other SRH medical services - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298221', '', 'Other SRH medical services - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298322', '', 'Other SRH medical services - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298423', '', 'Other SRH medical services - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '269298999', '', 'Other SRH medical services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '370000000', '', 'MEDICAL SPECIALTY SERVICIES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371300000', '', 'MEDICAL SPECIALTIES - SYSTEM ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371300999', '', 'Medical Specialties - System Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301000', '', 'ANGIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301130', '', 'Angiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301231', '', 'Angiology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301332', '', 'Angiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301433', '', 'Angiology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371301999', '', 'Angiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311000', '', 'CARDIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311130', '', 'Cardiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311231', '', 'Cardiology - Diagnostic EKG' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311332', '', 'Cardiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311433', '', 'Cardiology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371311999', '', 'Cardiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321000', '', 'DENTISTRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321131', '', 'Dentistry - Diagnosis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321232', '', 'Dentistry -Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321332', '', 'Dentistry - Orthodontics' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321432', '', 'Dentistry - Periodontics' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321533', '', 'Dentistry - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371321999', '', 'Dentistry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331000', '', 'DERMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331130', '', 'Dermatology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331231', '', 'Dermatology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331332', '', 'Dermatology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331433', '', 'Dermatology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371331999', '', 'Dermatology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341000', '', 'ENDOCRINOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341130', '', 'Endocrinology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341231', '', 'Endocrinology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341332', '', 'Endocrinology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341433', '', 'Endocrinology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371341999', '', 'Endocrinology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351000', '', 'GASTROENTEROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351130', '', 'Gastroenterology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351231', '', 'Gastroenterology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351332', '', 'Gastroenterology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351433', '', 'Gastroenterology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371351999', '', 'Gastroenterology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361000', '', 'GENETICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361129', '', 'Genetics - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361230', '', 'Genetics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361331', '', 'Genetics - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361432', '', 'Genetics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371361999', '', 'Genetics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371000', '', 'NEPHROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371130', '', 'Nephrology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371231', '', 'Nephrology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371332', '', 'Nephrology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371433', '', 'Nephrology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371371999', '', 'Nephrology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381000', '', 'NEUMOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381130', '', 'Neumology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381231', '', 'Neumology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381332', '', 'Neumology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381433', '', 'Neumology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371381999', '', 'Neumology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391000', '', 'NEUROLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391130', '', 'Neurology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391231', '', 'Neurology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391332', '', 'Neurology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391433', '', 'Neurology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371391999', '', 'Neurology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401000', '', 'OPHTALMOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401130', '', 'Ophtalmology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401231', '', 'Ophtalmology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401332', '', 'Ophtalmology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401433', '', 'Ophtalmology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371401999', '', 'Ophtalmology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411000', '', 'ORTHOPEDICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411130', '', 'Orthopedics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411231', '', 'Orthopedics - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411332', '', 'Orthopedics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411433', '', 'Orthopedics - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371411999', '', 'Orthopedics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421000', '', 'OTHORHINOLARINGOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421130', '', 'Othorhinolaringology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421231', '', 'Othorhinolaringology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421332', '', 'Othorhinolaringology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421433', '', 'Othorhinolaringology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371421999', '', 'Othorhinolaringology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431000', '', 'PODOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431130', '', 'Podology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431231', '', 'Podology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431332', '', 'Podology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431433', '', 'Podology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371431999', '', 'Podology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441000', '', 'RHEUMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441130', '', 'Rheumatology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441231', '', 'Rheumatology - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441332', '', 'Rheumatology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441433', '', 'Rheumatology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '371441999', '', 'Rheumatology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372500000', '', 'MEDICAL SPECIALTIES - DISEASE ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372500999', '', 'Medical Specialties - Disease Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501000', '', 'OPTOMETRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501130', '', 'Optometry - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501231', '', 'Optometry - Diagnostic Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372501999', '', 'Optometry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511000', '', 'PSYCHIATRY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511131', '', 'Psychiatry - Diagnostic consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511232', '', 'Psychiatry - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372511999', '', 'Psychiatry - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521000', '', 'PSYCHOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521131', '', 'Psychology - Diagnostic consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521232', '', 'Psychology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372521999', '', 'Psychology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531000', '', 'RADIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531131', '', 'Radiology - Diagnostic Imaging' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531232', '', 'Radiology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372531999', '', 'Radiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541000', '', 'ONCOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541131', '', 'Oncology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541232', '', 'Oncology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541333', '', 'Oncology - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372541999', '', 'Oncology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551000', '', 'ALLERGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551130', '', 'Allergy - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551231', '', 'Allergy - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551332', '', 'Allergy - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372551999', '', 'Allergy - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561000', '', 'IMMUNOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561130', '', 'Immunology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561231', '', 'Immunology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '372561999', '', 'Immunology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373600000', '', 'MEDICAL SPECIALTIES - COMMUNITY ORIENTED SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373600999', '', 'Medical Specialties - Community Oriented Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601000', '', 'FAMILY HEALTH' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601131', '', 'Family Health - Hypertension Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601231', '', 'Family Health - Physical Exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601331', '', 'Family Health - Weight & Vital Signs' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601431', '', 'Family Health - Diabetes Screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601531', '', 'Family Health - Urinalysis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601631', '', 'Family Health - Cholesterol screening' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601729', '', 'Family Health - Nutrition Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601829', '', 'Family Health - Diet/Weight Control Counseling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373601999', '', 'Family Health - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621000', '', 'GERIATRICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621130', '', 'Geriatrics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621231', '', 'Geriatrics - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621332', '', 'Geriatrics - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373621999', '', 'Geriatrics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641000', '', 'PEDIATRICS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641130', '', 'Pediatrics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641231', '', 'Pediatrics - Diagnostic - Neonatal Screening (at Birth)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641331', '', 'Pediatrics - Diagnostic - Well Baby Care / Infant Health Check' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641432', '', 'Pediatrics - Therapy / Treatment - Nutrition' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641532', '', 'Pediatrics - Therapy / Treatment - Immunization' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641632', '', 'Pediatrics - Therapy / Treatment - Oral rehydration (ORT/ORS)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641732', '', 'Pediatrics - Therapy / Treatment - Neonatal Intensive Care' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641833', '', 'Pediatrics - Surgery - Circumcision' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373641999', '', 'Pediatrics - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661000', '', 'PHYSICAL MEDICINE & REHABILITATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661130', '', 'Physical Medicine & Rehabilitation - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661231', '', 'Physical Medicine & Rehabilitation - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661332', '', 'Physical Medicine & Rehabilitation - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661433', '', 'Physical Medicine & Rehabilitation - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373661999', '', 'Physical Medicine & Rehabilitation - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671000', '', 'PREVENTIVE MEDICINE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671130', '', 'Preventive Medicine - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671231', '', 'Preventive Medicine - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373671999', '', 'Preventive Medicine - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681000', '', 'EMERGENCY MEDICINE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681131', '', 'Emergency Medicine - Evaluation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681232', '', 'Emergency Medicine - Initial Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681333', '', 'Emergency Medicine - Emergency Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373681999', '', 'Emergency Medicine - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691000', '', 'HOSPITALIZATION' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691140', '', 'Hospitalization - Ambulatory (1 day)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691241', '', 'Hospitalization - Extended (>1day)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '373691999', '', 'Hospitalization - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374700000', '', 'MEDICAL SPECIALTIES DIAGNOSTIC/THERAPEUTIC PROCEDURES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374700999', '', 'Medical Specialties - Diagnostic/Therapeutic Procedures - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701000', '', 'HEMATOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701130', '', 'Hematology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701231', '', 'Hematology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701332', '', 'Hematology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374701999', '', 'Hematology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721000', '', 'TOXICOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721130', '', 'Toxicology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721231', '', 'Toxicology - Diagnostic tests' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721332', '', 'Toxicology - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374721999', '', 'Toxicology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741000', '', 'CHEMICAL PATHOLOGY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741130', '', 'Chemical Patology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374741231', '', 'Chemical Patology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374751999', '', 'Chemical Patology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761000', '', 'PATHOLOGY LAB TESTS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761130', '', 'Pathology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761231', '', 'Pathology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374761999', '', 'Pathology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781000', '', 'MICROBIOLOGY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781130', '', 'Microbiology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781231', '', 'Microbiology - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '374781999', '', 'Microbiology - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375800000', '', 'MEDICAL SPECIALTIES - OTHER SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375800999', '', 'Medical Specialties - Other Services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801000', '', 'CHIROPRACTICE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801130', '', 'Chiropractice - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801232', '', 'Chiropractice - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375801999', '', 'Chiropractice - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811000', '', 'OSTEOPHATY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811130', '', 'Osteophaty - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811232', '', 'Osteophaty - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811331', '', 'Osteophaty - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375811999', '', 'Osteophaty - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821000', '', 'PLASTIC SURGERY' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821130', '', 'Plastic Surgery - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821232', '', 'Plastic Surgery - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821333', '', 'Plastic Surgery - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375821999', '', 'Plastic Surgery - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831000', '', 'OTHER NON SRH MEDICAL SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831130', '', 'Other non-SRH medical services - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831231', '', 'Other non-SRH medical services - Diagnostic Test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831332', '', 'Other non-SRH medical services - Therapy / Treatment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831433', '', 'Other non-SRH medical services - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831539', '', 'Other non-SRH medical services - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '375831999', '', 'Other non-SRH medical services - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376100000', '', 'PREVENTION AND TREATMENT SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101000', '', 'MALARIA PREVENTION AND TREATMENT SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101132', '', 'Malaria prevention and treatment services for children under 5 years' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101232', '', 'Malaria prevention and treatment services for pregnant mothers' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '376101999', '', 'Malaria prevention and treatment services OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380910000', '', 'OTHER NON SRH SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380910999', '', 'ALL OTHER NON SRH SERVICES - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380911000', '', 'SALES & RENTALS' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '380911999', '', 'Sales & Rentals - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912000', '', 'SALES OF MEDICINES, SUPPLIES AND EQUIPMENT' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912150', '', 'Sales of Medicines' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912250', '', 'Sales Medical Supplies' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381912350', '', 'Sales Medical Equipment' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '381913999', '', 'Sales - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382914000', '', 'RENTAL OF MEDICAL EQUIPMENT / INFRASTRUCTURE' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382914450', '', 'Rental Medical Infrastructure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '382915999', '', 'Rental Medical Equipment / Infrastructure - OTHER' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '490000000', '', 'NON-MEDICAL PRODUCTS AND SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990000', '', 'OTHER NON MEDICAL PRODUCTS & SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990190', '', 'Other non-medical products - Sales of IEC Materials' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990290', '', 'Other non-medical Products & Services - Free distribution of IEC materials' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '491990999', '', 'Other non-medical products - Other Generic Products' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992000', '', 'OTHER NON MEDICAL SERVICES SALES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992090', '', 'Other non-medical services - Sales of IEC Services' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 11, '492992999', '', 'Other non-medical services - OTHER' ); +#EndIf + +# Following lines mirror line-for-line the spreadsheet "CYP Factors 2010.1.xlsx". +UPDATE codes SET cyp_factor = 0.0666667 WHERE code_type = 11 AND code LIKE '11110_%'; +UPDATE codes SET cyp_factor = 0.0769230 WHERE code_type = 11 AND code LIKE '111111%'; +UPDATE codes SET cyp_factor = 0.1666667 WHERE code_type = 11 AND code LIKE '111112%'; +UPDATE codes SET cyp_factor = 0.2500000 WHERE code_type = 11 AND code LIKE '111113%'; +UPDATE codes SET cyp_factor = 3.5000000 WHERE code_type = 11 AND code LIKE '111122%'; +UPDATE codes SET cyp_factor = 3.5000000 WHERE code_type = 11 AND code LIKE '111123%'; +UPDATE codes SET cyp_factor = 2.5000000 WHERE code_type = 11 AND code LIKE '111124%'; +UPDATE codes SET cyp_factor = 0.0666667 WHERE code_type = 11 AND code LIKE '111132%'; +UPDATE codes SET cyp_factor = 0.0666667 WHERE code_type = 11 AND code LIKE '111133%'; +UPDATE codes SET cyp_factor = 0.0083333 WHERE code_type = 11 AND code LIKE '112141%'; +UPDATE codes SET cyp_factor = 0.0083333 WHERE code_type = 11 AND code LIKE '112142%'; +UPDATE codes SET cyp_factor = 1.0000000 WHERE code_type = 11 AND code LIKE '112151%'; +UPDATE codes SET cyp_factor = 1.0000000 WHERE code_type = 11 AND code LIKE '112152%'; +UPDATE codes SET cyp_factor = 0.1333333 WHERE code_type = 11 AND code LIKE '112161%'; +UPDATE codes SET cyp_factor = 0.1333333 WHERE code_type = 11 AND code LIKE '112162%'; +UPDATE codes SET cyp_factor = 0.1333333 WHERE code_type = 11 AND code LIKE '112163%'; +UPDATE codes SET cyp_factor = 0.1333333 WHERE code_type = 11 AND code LIKE '112164%'; +UPDATE codes SET cyp_factor = 0.1333333 WHERE code_type = 11 AND code LIKE '112165%'; +UPDATE codes SET cyp_factor = 3.5000000 WHERE code_type = 11 AND code LIKE '113171%'; +UPDATE codes SET cyp_factor = 3.5000000 WHERE code_type = 11 AND code LIKE '113172%'; +UPDATE codes SET cyp_factor = 10.000000 WHERE code_type = 11 AND code LIKE '121181%'; +UPDATE codes SET cyp_factor = 10.000000 WHERE code_type = 11 AND code LIKE '122182%'; +UPDATE codes SET cyp_factor = 0.0500000 WHERE code_type = 11 AND code LIKE '145212%'; +# Next line clears cyp for codes corresponding to removal of contraception. +UPDATE codes SET cyp_factor = 0 WHERE code_type = 11 AND code LIKE '1_____112'; + +#IfMissingColumn patient_data contrastart +ALTER TABLE patient_data ADD contrastart DATE DEFAULT NULL; +#EndIf + +#IfMissingColumn patient_data ippfconmeth +ALTER TABLE patient_data ADD ippfconmeth varchar(255) NOT NULL DEFAULT ''; +#EndIf + +#IfNotRow layout_group_properties grp_form_id LBFccicon + +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFccicon', '' , 'Contraception', 'Clinical'); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFccicon', '1', '' , '' ); +DELETE FROM layout_options WHERE form_id = 'LBFccicon'; +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'newmauser', '1', 'First contraceptive at this clinic?', + 1, 1, 2, 0, 0, 'boolean' , 1, 3, '', '', 'Is this the first contraceptive accepted at this clinic?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'curmethod', '1', 'Current Method', + 2, 1, 1, 0, 0, 'contrameth' , 1, 3, '', '', 'Method in use at start of visit'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'pastmodern','1', 'Previous modern contraceptive use?', + 3, 1, 1, 0, 0, 'boolean' , 1, 3, '', '', 'Was a modern contraceptive method used at some time in the past?'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'reqmethod', '1', 'Requested Method', + 4, 1, 1, 0, 0, 'contrameth' , 1, 3, '', '', 'Method requested by the client'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'newmethod', '1', 'Adopted Method', + 5, 1, 1, 0, 0, 'ippfconmeth', 1, 3, '', '', 'Method adopted in this visit'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'provider' , '1', 'Service Provider', + 6, 10, 1, 0, 0, '' , 1, 3, '', '', 'Provider of this initial consultation'); +INSERT INTO layout_options (form_id, field_id, group_id, title, seq, data_type, uor, fld_length, max_length, list_id, titlecols, datacols, default_value, edit_options, description) VALUES ('LBFccicon', 'mcreason' , '1', 'Reason for Method Change', + 7, 1, 1, 0, 0, 'mcreason' , 1, 3, '', '', 'Reason for method change'); + +# This section creates LBFccicon visit forms to replace contraception dates/methods in demographics. +# Fields generated: newmauser (always 1), newmethod (only if present in demographics, probably not). +# +# Create newmauser data item for each patient contrastart that assigns the form_id and +# temporarily holds the pid. This pid is later used for matching to get the new form ID. +INSERT INTO lbf_data (field_id, field_value) + SELECT 'newmauser', pd.pid FROM patient_data AS pd + WHERE pd.contrastart IS NOT NULL AND pd.contrastart NOT LIKE '0%'; +# +# Create newmethod data item for each such patient that also has a starting method defined. +INSERT INTO lbf_data (form_id, field_id, field_value) + SELECT MAX(ld.form_id), 'newmethod', pd.ippfconmeth + FROM patient_data AS pd, lbf_data AS ld + WHERE pd.contrastart IS NOT NULL AND pd.contrastart NOT LIKE '0%' + AND pd.ippfconmeth != '' + AND ld.field_id = 'newmauser' + AND ld.field_value = pd.pid + GROUP BY pd.pid; +# +# Create form_encounter table entries for missing encounters. +SELECT @i:=(SELECT id FROM sequences); +INSERT INTO form_encounter (date, reason, pid, encounter) + SELECT pd.contrastart, 'PreOpenEMR Data', pd.pid, @i:=@i+1 + FROM patient_data AS pd, lbf_data AS ld + WHERE pd.contrastart IS NOT NULL AND pd.contrastart NOT LIKE '0%' + AND (SELECT COUNT(*) FROM form_encounter WHERE pid = pd.pid AND date = pd.contrastart) = 0 + AND ld.field_id = 'newmauser' + AND ld.field_value = pd.pid; +# Update sequences table to hold the next encounter number. +UPDATE sequences set id = @i; +# +# Create the forms table entries for missing encounters. +INSERT INTO forms (date, encounter, form_name, form_id, pid, user, groupname, authorized, formdir) + SELECT CURRENT_DATE, fe.encounter, 'New Patient Encounter', fe.id, pd.pid, 'admin', 'Default', '1', 'newpatient' + FROM patient_data AS pd, form_encounter AS fe + WHERE pd.contrastart IS NOT NULL AND pd.contrastart NOT LIKE '0%' + AND fe.pid = pd.pid + AND fe.date = pd.contrastart + AND fe.reason = 'PreOpenEMR Data' + AND (SELECT COUNT(*) FROM forms WHERE pid = pd.pid AND encounter = fe.encounter AND formdir = 'newpatient' and deleted = 0) = 0; +# +# Create the forms table entries for Contraception. +INSERT INTO forms (date, encounter, form_name, form_id, pid, user, groupname, authorized, formdir) + SELECT CURRENT_DATE, MIN(fe.encounter), 'Contraception Initial Consult', MAX(ld.form_id), pd.pid, 'admin', 'Default', '1', 'LBFccicon' + FROM patient_data AS pd, form_encounter AS fe, lbf_data AS ld + WHERE pd.contrastart IS NOT NULL AND pd.contrastart NOT LIKE '0%' + AND fe.pid = pd.pid + AND fe.date = pd.contrastart + AND ld.field_id = 'newmauser' + AND ld.field_value = pd.pid + GROUP BY pd.pid; +# +# Clean up the newmauser data items. +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = '1' WHERE + f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND + ld.field_id = 'newmauser' AND ld.field_value = f.pid; + +#EndIf + +ALTER TABLE patient_data DROP ippfconmeth; + +DELETE FROM `layout_options` WHERE form_id = 'DEM' AND field_id = 'ippfconmeth'; + +# Set group names for IPPF contraceptive methods. +UPDATE list_options SET mapping = 'Pills' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11110%' AND mapping = ''; +UPDATE list_options SET mapping = 'Injectables' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11111%' AND mapping = ''; +UPDATE list_options SET mapping = 'Implants' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11112%' AND mapping = ''; +UPDATE list_options SET mapping = 'Hormonal Other' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11113%' AND mapping = ''; +UPDATE list_options SET mapping = 'Barrier' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11214%' AND mapping = ''; +UPDATE list_options SET mapping = 'Barrier' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11215%' AND mapping = ''; +UPDATE list_options SET mapping = 'Spermicides' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11216%' AND mapping = ''; +UPDATE list_options SET mapping = 'IUD' WHERE list_id = 'ippfconmeth' AND option_id LIKE '11317%' AND mapping = ''; +UPDATE list_options SET mapping = 'Female VSC' WHERE list_id = 'ippfconmeth' AND option_id LIKE '121181%' AND mapping = ''; +UPDATE list_options SET mapping = 'Male VSC' WHERE list_id = 'ippfconmeth' AND option_id LIKE '121182%' AND mapping = ''; +UPDATE list_options SET mapping = 'EC' WHERE list_id = 'ippfconmeth' AND option_id LIKE '14521%' AND mapping = ''; + +# Set flags to indicate which are the modern conraceptive methods. +UPDATE list_options SET option_value = 0 WHERE list_id = 'contrameth'; +UPDATE list_options SET option_value = 1 WHERE list_id = 'contrameth' AND mapping LIKE '%:1%'; + +#IfNotRow2D list_options list_id mcreason option_id stc +DELETE FROM list_options WHERE list_id = 'mcreason'; +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'eco','Economic (cost)' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mda','Medical - Allergy' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mdb','Medical - Breast Feeding' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'mdc','Medical - Contraindication' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'men','Medical - Menopause' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'sef','Medical - Side Effects of Current Method', 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'com','Method Too Complicated' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'fop','Personal - Family Pressure/Advice' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'con','Personal - Fear of Infertility' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oth','Personal - Other Reason' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pop','Personal - Partner Opposes' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'rel','Personal - Religious' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'pse','Personal - Side Effects Concern' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'oop','Personal - Social Pressure/Friend Advice', 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'prg','Planning Pregnancy' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'stc','Sterilization of Client' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'stp','Sterilization of Partner' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'nav','Unavailable at Clinic' , 1,0,0); +INSERT INTO list_options ( list_id, option_id, title, seq, is_default, option_value ) VALUES ('mcreason' ,'uns','Unspecified - No Reason Provided' , 1,0,0); +#EndIf + +##################################################################################### +# The following re-inserted on 2014-10-14 so that upgrades from 3.2.0.8-p1 will work. +# --Rod +##################################################################################### + +#IfNotColumnType codes code varchar(31) +ALTER TABLE `codes` CHANGE `code` `code` varchar(31) NOT NULL default ''; +#EndIf + +#IfNotRow code_types ct_key ADM +INSERT INTO code_types (ct_key, ct_id, ct_seq, ct_mod, ct_just, ct_fee, ct_rel, ct_nofs, ct_diag ) VALUES ('ADM',17, 5, 0, '', 1, 0, 0, 0); +#EndIf + +#IfNotRow2D list_options list_id ippfconmeth option_id 145212110 +INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('ippfconmeth','145212110','Emergency Contraception',26,0); +#EndIf + +UPDATE list_options SET title = 'Client has received ITS Counselling' WHERE + list_id = 'genitshist' AND title = 'Client has received ITS Counselling'; + +#################################################################################### +# On 2014-02-07 this file was copied to ippf_upgrade_obsolete.sql and then all +# updates prior to 2013 were removed. So do not use this to upgrade sites +# currently on releases older than 3.2.0.9. +# --Rod +#################################################################################### + +UPDATE facility SET billing_location = 1 WHERE pos_code = 1 AND billing_location != 1; + +#IfNotRow code_types ct_id 31 + +# Add IPPF2 code set (numeric type 31). +INSERT INTO code_types (ct_key,ct_id,ct_seq,ct_mod,ct_just,ct_fee,ct_rel,ct_nofs,ct_diag) VALUES ('IPPF2',31,7,0,'',0,0,1,0); +DELETE FROM codes WHERE code_type = 31; +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1110010900000', '', 'Contraceptives - Counselling - General' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1121120000000', '', 'Oral Contraceptives - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1122120000000', '', 'Injectable - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1123020000000', '', 'Patch / Ring - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1124020000800', '', 'Male / Female condom - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1124120000000', '', 'Male condom - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1124220000000', '', 'Female condom - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1125020000000', '', 'Diaphragm / Cervical cap - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1126020000000', '', 'Spermicides - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1131020211000', '', 'Implant - Consultation - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1131120000000', '', 'Implant - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1132020211000', '', 'IUD - Consultation - Removal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1132120000000', '', 'IUD - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141000000800', '', 'F / MVSC - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141110000000', '', 'FVSC - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141120000000', '', 'FVSC - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302101', '', 'FVSC - Management - Surgical - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302102', '', 'FVSC - Management - Surgical - Minilaparotomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302103', '', 'FVSC - Management - Surgical - Laparoscopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302104', '', 'FVSC - Management - Surgical - Laparotomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302105', '', 'FVSC - Management - Surgical - Hysteroscopy (ESSURE®)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302106', '', 'FVSC - Management - Surgical - Trans vaginal tubal ligation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130302107', '', 'FVSC - Management - Surgical - FVSC follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1141130000800', '', 'FVSC - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142010000000', '', 'MVSC - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142020000000', '', 'MVSC - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142030302101', '', 'MVSC - Management - Surgical - Reversal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142030302201', '', 'MVSC - Management - Surgical - Incisional Vasectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142030302202', '', 'MVSC - Management - Surgical - No-scalpel Vasectomy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142030302203', '', 'MVSC - Management - Surgical - MVSC follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1142030000800', '', 'MVSC - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1151010000000', '', 'EC - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1151020000000', '', 'EC - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '1210020000000', '', 'FAB - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2111010121000', '', 'Abortion - Counselling - Pre-abortion / Options Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2111010122000', '', 'Abortion - Counselling - Post-abortion' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2111010000800', '', 'Abortion - Counselling - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2112020200000', '', 'Abortion - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2112020201101', '', 'Abortion - Consultation - Initial consultation - Harm reduction model' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2112020202101', '', 'Abortion - Consultation - Follow up consultation - Harm reduction model' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2112020000800', '', 'Abortion - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301101', '', 'Abortion - Management - Medical - Misoprostol' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301102', '', 'Abortion - Management - Medical - Mifepristone and misoprostol' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301103', '', 'Abortion - Management - Medical - Methotrexate and misoprostol' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301110', '', 'Abortion - Management - Medical - Treatment of complications' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301800', '', 'Abortion - Management - Medical - Unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113130301104', '', 'Abortion - Management - Medical - follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302301', '', 'Abortion - Management - Surgical - D&C' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302302', '', 'Abortion - Management - Surgical - D&E' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302304', '', 'Abortion - Management - Surgical - Vacuum aspiration' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302305', '', 'Abortion - Management - Surgical - Ethacridine lactate' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302310', '', 'Abortion - Management - Surgical - Treatment of complications' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302800', '', 'Abortion - Management - Surgical - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2113230302307', '', 'Abortion - Management - Surgical - follow up' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2114030301101', '', 'Incomplete abortion - Management - Medical - Misoprostol' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2114030302303', '', 'Incomplete abortion - Management - Surgical - D&C or D&E' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2114030302304', '', 'Incomplete abortion - Management - Surgical - Vacuum aspiration' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2114030302800', '', 'Incomplete abortion - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2121010111000', '', 'HIV and AIDS - Counselling - Pre-test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2121010112000', '', 'HIV and AIDS - Counselling - Post-test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2121010123000', '', 'HIV and AIDS - Counselling - Risk reduction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2121010124000', '', 'HIV and AIDS - Counselling - Psycho-social support' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2121010000800', '', 'HIV and AIDS - Counselling - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2122020200000', '', 'HIV and AIDS - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2123030301301', '', 'HIV and AIDS - Management - Medical - ARVs' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2123030301501', '', 'HIV and AIDS - Management - Medical - OI (TB)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2123030301502', '', 'HIV and AIDS - Management - Medical - OI (Malaria)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2123030301509', '', 'HIV and AIDS - Management - Medical - OI (Other)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2123030000800', '', 'HIV and AIDS - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2124040401101', '', 'HIV and AIDS - Prevention - Prophylaxis - ARVs' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050502000', '', 'HIV and AIDS - Investigation - Examination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503101', '', 'HIV and AIDS - Investigation - Lab test - Diagnostic Ab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503102', '', 'HIV and AIDS - Investigation - Lab test - Diagnostic Ag test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503103', '', 'HIV and AIDS - Investigation - Lab test - Diagnostic PCR test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503104', '', 'HIV and AIDS - Investigation - Lab test - Diagnostic Rapid test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503105', '', 'HIV and AIDS - Investigation - Lab test - Monitoring viral load test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503106', '', 'HIV and AIDS - Investigation - Lab test - Monitoring CD4 count test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050503888', '', 'HIV and AIDS - Investigation - Lab test - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2125050504000', '', 'HIV and AIDS - Investigation - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2131010111000', '', 'STI / RTI - Counselling - Pre-test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2131010112000', '', 'STI / RTI - Counselling - Post-test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2131010123000', '', 'STI / RTI - Counselling - Risk reduction' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2131010000800', '', 'STI / RTI - Counselling - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2132020200000', '', 'STI / RTI - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133130303000', '', 'STI/RTI - Management - Syndromic' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304000', '', 'STI/RTI - Management - Etiological - Other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304101', '', 'STI/RTI - Management - Etiological - Chlamydia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304102', '', 'STI/RTI - Management - Etiological - Chancroid' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304103', '', 'STI/RTI - Management - Etiological - Gonorrhoea' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304104', '', 'STI/RTI - Management - Etiological - Syphilis' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304105', '', 'STI/RTI - Management - Etiological - Human Papillomavirus (HPV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2133230304800', '', 'STI/RTI - Management - Etiological - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2134040401201', '', 'STI/RTI - Prevention - Prophylaxis - Hep A vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2134040401202', '', 'STI/RTI - Prevention - Prophylaxis - Hep B vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2134040401203', '', 'STI/RTI - Prevention - Prophylaxis - HPV vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2134040401800', '', 'STI / RTI - Prevention - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050502000', '', 'STI/RTI - Investigation - Examination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050503000', '', 'STI/RTI - Investigation - Lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050504000', '', 'STI/RTI - Investigation - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050000800', '', 'STI / RTI - Investigation - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010111101', '', 'Gynecology - Counselling - Pre test - Cervical cancer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010112101', '', 'Gynecology - Counselling - Post test - Cervical cancer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010900102', '', 'Gynecology - Counselling - General - Breast cancer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010900999', '', 'Gynecology - Counselling - General - other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2141010000800', '', 'Gynecology - Counselling - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2142020200000', '', 'Gynecology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2142020000800', '', 'Gynecology - Consultation - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130301201', '', 'Gynecology - Management - Medical - Menstrual Regulation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130301202', '', 'Gynecology - Management - Medical - Erratic mensturation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130301999', '', 'Gynecology - Management - Medical - Other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143130000800', '', 'Gynecology - Management - Medical - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302401', '', 'Gynecology - Management - Surgical - Cryosurgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302402', '', 'Gynecology - Management - Surgical - Cauterisation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302701', '', 'Gynecology - Management - Surgical - Breast cancer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302306', '', 'Gynecology - Management - Surgical - Menstrual Regulation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302999', '', 'Gynecology - Management - Surgical - other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302800', '', 'Gynecology - Management - Surgical - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2144040402101', '', 'Gynecology - Prevention - Screening - PAP (sampling procedure)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2144040402102', '', 'Gynecology - Prevention - Screening - PAP (lab test)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2144040402103', '', 'Gynecology - Prevention - Screening - Visual inspection (VIA or VILI)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2144040402800', '', 'Gynecology - Prevention - Screening - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050501000', '', 'Gynecology - Investigation - Diagnostic Imaging - other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050501101', '', 'Gynecology - Investigation - Diagnostic Imaging - Mamography' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050501102', '', 'Gynecology - Investigation - Diagnostic Imaging - Colposcopy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050502101', '', 'Gynecology - Investigation - Examination - Manual breast exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050502102', '', 'Gynecology - Investigation - Examination - Bimanual pelvic exam' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050502999', '', 'Gynecology - Investigation - Examination - other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050503000', '', 'Gynecology - Investigation - Lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050504000', '', 'Gynecology - Investigation - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2145050000800', '', 'Gynecology - Investigation - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2150000000000', '', 'SRH non-CONTRACEPTION - OBSTETRIC SERVICES' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010131000', '', 'Obstetrics - Counselling - Ante natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010132000', '', 'Obstetrics - Counselling - Post natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2151010000800', '', 'Obstetrics - Counselling - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2152020221000', '', 'Obstetrics - Consultation - Ante natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2152020222000', '', 'Obstetrics - Consultation - Post natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2152020000800', '', 'Obstetrics - Consultation - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2153130301401', '', 'Obstetrics -Management - Medical - Vaginal Delivery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2153130301402', '', 'Obstetrics -Management - Medical - EmOC' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2153130301800', '', 'Obstetrics - management - Medical - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2153230302501', '', 'Obstetrics - Management - Surgical - C-Section' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2153230302800', '', 'Obstetrics - Management - Surgical - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2154040401301', '', 'Obstetrics - Prevention - Prophylaxis - Ante-natal vaccinations' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050501201', '', 'Obstetrics - Investigations - Diagnostic imaging - Ante natal ultrasound' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050501202', '', 'Obstetrics - Investigations - Diagnostic imaging - Post natal ultrasound' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2152088000000', '', 'Obstetrics - Investigations - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050502201', '', 'Obstetrics - Investigations - Examination - Ante natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050503202', '', 'Obstetrics - Investigations - Examination - Post natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050503301', '', 'Obstetrics - Investigations - Lab tests - Pregnancy test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050503401', '', 'Obstetrics - Investigations - Lab tests - Ante natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050503402', '', 'Obstetrics - Investigations - Lab tests - Post natal' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2155050504000', '', 'Obstetrics - Investigations - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2161010100000', '', 'Urology - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2162020200000', '', 'Urology - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2163130301000', '', 'Urology - Management - Medical' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2163230302601', '', 'Urology - Management - Surgery - Male Circumcision' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2163230302999', '', 'Urology - Management - Surgery - other' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2163230000800', '', 'Urology - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2164040402201', '', 'Urology - Prevention - Screening - Prostate cancer' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2165050501000', '', 'Urology - Investigations - Diagnostic Imaging' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2165050502000', '', 'Urology - Investigations - Examination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2165050503000', '', 'Urology - Investigations - Lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2165050504000', '', 'Urology - Investigations - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2165050000800', '', 'Urology - Investigations - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2171110000000', '', 'Subfertility - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2171110000800', '', 'Subfertility - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2172120000000', '', 'Subfertility - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2173130301203', '', 'Subfertility - Management - Medical - Hormone / ovulation therapy' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2173130301403', '', 'Subfertility - Management - Medical - Assisted Conception' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2173130301800', '', 'Subfertility - Management - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2173230302000', '', 'Subfertility - Management - Surgery' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2174040501000', '', 'Subfertility - Investigations - Diagnostic imaging' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2174040502000', '', 'Subfertility - Investigations - Examination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2174040503000', '', 'Subfertility - Investigations - Lab test' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2174040504000', '', 'Subfertility - Investigations - Sampling procedure' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2174040000800', '', 'Subfertility - Investigations - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2181110141000', '', 'Specialised SRH services - Counselling - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2181210142000', '', 'Specialised SRH services - Counselling - Relationship' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2181310143000', '', 'Specialised SRH services - Counselling - Sexuality' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2184140100301', '', 'Specialised SRH services - Prevention - Screening - GBV' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2184100000800', '', 'Specialised SRH Services - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2191010000000', '', 'Paediatrics - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2192020000000', '', 'Paediatrics - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2192020900401', '', 'Paediatrics - Consultation - General - obesity' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2192020900999', '', 'Paediatrics - Consultation - General - all other non-obesity' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2193030000000', '', 'Paediatrics - Management' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2193030101205', '', 'Paediatrics - Management - Medical - Asthma' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2193030101999', '', 'Paediatrics - Management - Medical - all other non-asthma' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2194040000000', '', 'Paediatrics - Prevention' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2194040401401', '', 'Paediatrics - Prevention - Prophylaxis - Vaccination' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2195050000000', '', 'Paediatrics - Investigations' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2196000000800', '', 'Paediatrics - unable to categorise' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2201010000000', '', 'SRH - Other - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2202020000000', '', 'SRH - Other - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2203030000000', '', 'SRH - Other - Management' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2204040000000', '', 'SRH - Other - Prevention' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2205050000000', '', 'SRH - Other - Investigation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '4100000000000', '', 'Administration' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010000000', '', 'Non-SRH Medical - Counselling' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010900201', '', 'Non-SRH Medical - Counselling - General - Diabetes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010900202', '', 'Non-SRH Medical - Counselling - General - Hypertension' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010900203', '', 'Non-SRH Medical - Counselling - General - Hyperlipidemia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010900301', '', 'Non-SRH Medical - Counselling - General - Mental health' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010900401', '', 'Non-SRH Medical - Counselling - General - Obesity' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010123201', '', 'Non-SRH Medical - Counselling - Risk reduction - Diabetes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010123202', '', 'Non-SRH Medical - Counselling - Risk reduction - Hypertension' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010123203', '', 'Non-SRH Medical - Counselling - Risk reduction - Hyperlipidemia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010123204', '', 'Non-SRH Medical - Counselling - Risk reduction - COPD' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3110010123501', '', 'Non-SRH Medical - Counselling - Risk reduction - Alcohol' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3120020000000', '', 'Non-SRH Medical - Consultation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3120020900201', '', 'Non-SRH Medical - Consultation - General - Diabetes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3120020900202', '', 'Non-SRH Medical - Consultation - General - Hypertension' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3120020900203', '', 'Non-SRH Medical - Consultation - General - Hyperlipidemia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030000000', '', 'Non-SRH Medical - Management' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030101201', '', 'Non-SRH Medical - Management - Medical - Diabetes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030101202', '', 'Non-SRH Medical - Management - Medical - Hypertension' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030101203', '', 'Non-SRH Medical - Management - Medical - Hyperlipidemia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030101204', '', 'Non-SRH Medical - Management - Medical - COPD' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3130030101301', '', 'Non-SRH Medical - Management - Medical - Mental health' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3140040000000', '', 'Non-SRH Medical - Prevention' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3140040402201', '', 'Non-SRH Medical - Prevention - Screening - Diabetes' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3140040402202', '', 'Non-SRH Medical - Prevention - Screening - Hypertension' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3140040402203', '', 'Non-SRH Medical - Prevention - Screening - Hyperlipidemia' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3150050000000', '', 'Non-SRH Medical - Investigation' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '3150000000800', '', 'Non-SRH Medical - unable to categorise' ); + +# Update products and MA/REF services, adding IPPF2 related codes deduced from existing IPPF related codes. +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1000000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:110000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1000000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:110000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1100010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1100010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200118%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200118%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200218%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200218%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:141200999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111130999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1110010900000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111130999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1121000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1121000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111100999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1121120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111110999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1122120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1123020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112140000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112140000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112140999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112140999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124100000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124100000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124200000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124200000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1124220000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112150999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152010%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152010%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152011%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152011%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1125020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112160999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1126020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131020211000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131020211000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111120999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1131120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132020211000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132020211000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113170999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1132120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:120180000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:120180000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141080000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:120180999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141080000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:120180999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141100000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141100000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302107') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181213%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181213%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181413%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181413%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130302104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181313%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130302104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181313%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1141130000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1141130000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030302203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030302203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030302203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030302203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030302101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030302101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182112%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030302201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182213%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030302201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182213%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030302202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182313%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030302202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182313%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1142030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1142030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145210000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145210000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145211119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145211119%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145211999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145211999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212110%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212111%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212210%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212210%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212310%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212310%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212410%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212410%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145210999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1151020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145210999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:130190000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:130190000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:130190999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:130190999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191210%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191210%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191211%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191310%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191310%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191311%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191410%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191410%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191411%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191510%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191510%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191511%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191511%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191610%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191610%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191611%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191611%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:1210020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:131191999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2000000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:250000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2000000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:250000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2110000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252220000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2110000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252220000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010121000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010122000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010122000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2111010122000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2111010122000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020201101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020201101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252221329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020202101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020202101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252227229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252220999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252220999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113130301000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113130301000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113130301101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113130301101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113130301102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113130301102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113130301110') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113130301110') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113130301800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113130301800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252224999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302302') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302302') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302304') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302304') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302310') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302310') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252226999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2113230302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2113230302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252223999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2114030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2114030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2114030301101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225722%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2114030301101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225722%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2114030302303') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2114030302303') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2114030302304') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2114030302304') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2114030302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2114030302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252225999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2112020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:252222999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2120000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253230000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2120000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253230000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010111000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010111000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253234129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253234129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253234999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253234999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010124000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010124000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2121010000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2121010000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253235999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2122020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253230999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2122020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253230999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2123030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2123030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2123030301301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2123030301301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2123030301509') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2123030301509') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2123030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2123030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2123030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2123030000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2124040401101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2124040401101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253231322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503105') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503105') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503106') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503106') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503888') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503888') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253232999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2125050503888') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2125050503888') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:253233999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2130000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254240000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2130000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254240000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2131010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2131010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2131010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2131010112000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2131010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2131010123000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254241129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2131010000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254240999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2131010000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254240999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2132020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2132020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2132020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2132020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2132020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2132020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254242999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133130303000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133130303000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247622%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247622%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254246522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304104') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304105') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304105') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254247222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2133230304800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2133230304800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2134040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2134040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2134040401201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2134040401201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2134040401202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2134040401202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2134040401203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2134040401203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254245522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254243999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2135050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:254244999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2140000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255250000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2140000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255250000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010111101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010111101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010112101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010112101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010112101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258629%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010112101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258629%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010900102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010900102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2141010900999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255258999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2142020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2142020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2142020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255250999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2142020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255250999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130301201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130301201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130301202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130301202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143130301999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255256999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302402') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302402') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255257999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252523%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252523%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252623%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252623%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252723%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252723%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252823%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2143230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252823%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040402101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040402101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040402101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040402101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040402102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040402102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040402102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040402102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2144040402103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2144040402103') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255253221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050501102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050501102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255252123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050502101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050502101') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050502102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050502102') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050502999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050502999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255254999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255255999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2145050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:255251999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2150000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256260000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2150000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256260000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010131000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256263329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2151010132000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256269329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2152020221000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2152020221000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2152020222000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256268120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2152020222000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256268120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2152020222000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256268999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2152020222000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256268999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2152020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256260999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2152020000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256260999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2152088000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2152088000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2153130301401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2153130301401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2153130301402') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2153130301402') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2153230302501') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2153230302501') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2153230302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2153230302800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256267999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2154040401301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2154040401301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050501201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050501201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050501201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050501201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050502201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256262221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256264999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256261421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265821%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265821%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2155050503401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:256265999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2160000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257270000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2160000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257270000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2162020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257270999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2162020200000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257270999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2163230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2163230000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2163230302601') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2163230302601') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2163230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2163230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274323%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2163230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2163230302999') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2164040402201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2164040402201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257271999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257272121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257272121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257272999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257272999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050502000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050502000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257274123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2165050000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2165050000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:257273999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2170000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258280000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2170000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258280000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2171010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2171010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2171110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2171110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2171110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2171110000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258289999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2171110000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258280999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2171110000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258280999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2172020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2172020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2172120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2172120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2172120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2172120000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258288999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286122%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286222%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286422%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286522%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286622%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286622%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286722%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301403') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286722%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2173130301800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2173130301800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258286999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258282999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040501000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258283999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284121%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284321%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284421%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284521%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284621%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284721%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284821%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284821%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284921%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284921%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040503000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258284999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281123%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281223%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2174040504000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:258281999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2180000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:260290000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2180000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:260290000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291529%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291629%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291629%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291729%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291729%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181110141000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262293999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181210142000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:263297129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:263297129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262294329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2181310143000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295429%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184140100301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291829%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184140100301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:261291829%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184140100301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184140100301') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262292229%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295329%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262295999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:262296999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:263297999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:263297999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:260290999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2184100000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:260290999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2190000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2190000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2192020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2192020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2192020900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2192020900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641632%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641632%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641732%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641732%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641833%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2193030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641833%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2194040401401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641532%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2194040401401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641532%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2195050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2195050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2195050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2195050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2196000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2196000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373641999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2202020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2202020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2202020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2202020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298120%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2203030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2203030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298322%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2203030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2203030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298423%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:2205050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:2205050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:269298221%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:380911999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:380911999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912150%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912150%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912250%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912250%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912350%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381912350%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381913999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:381913999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382914450%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382914450%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382914450%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382914450%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382915999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:382915999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990190%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990190%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990290%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990290%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:491990999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:492992090%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:492992090%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:492992999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:4100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:492992999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:370000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3100000000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:370000000%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3110010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831539%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3110010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831539%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3110010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3110010000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361129%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3110010900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601729%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3110010900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601729%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3110010900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601829%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3110010900401') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601829%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374741130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374741130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361230%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361230%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501130%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373671999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3120020000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321533%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321533%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361432%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821333%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831332%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831433%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375821999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691140%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691140%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691241%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3130030000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691241%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101132%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101132%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101232%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:376101999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040402201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601431%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040402201') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601431%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040402202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040402202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040402202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040402202') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3140040402203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601631%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3140040402203') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601631%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374741231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374741231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811331%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321131%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601231%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601531%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150050000000') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601531%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371300999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371300999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371301999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371311999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371321999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371331999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371341999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371351999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371361999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371371999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371381999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371391999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371401999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371411999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371421999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371431999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:371441999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372500999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372500999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372501999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372511999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372521999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372531999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372541999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372551999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:372561999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373600999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373600999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373601999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373661999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373681999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374700999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374700999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374701999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374721999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374751999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374751999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374761999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:374781999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375800999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375800999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375801999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375811999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:375831999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373691999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621999%' AND related_code NOT LIKE '%IPPF2:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPF2:3150000000800') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:373621999%' AND related_code NOT LIKE '%IPPF2:%'; + +#EndIf + +#IfNotRow code_types ct_id 32 + +# Add the IPPFCM code set to represent contraceptive methods. This obsoletes the "ippfconmeth" list. +INSERT INTO code_types (ct_key,ct_id,ct_seq,ct_mod,ct_just,ct_fee,ct_rel,ct_nofs,ct_diag) VALUES ('IPPFCM',32,8,0,'',0,0,1,0); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4360','', 0.066667,'or' ,'Oral Contraceptives (combined)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4361','', 0.066667,'or' ,'Oral Contraceptives (progestin only)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4370','', 0.076923,'inj','Injectables (1 month)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4380','', 0.166667,'inj','Injectables (2 month)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4390','', 0.250000,'inj','Injectables (3 month)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4400','', 3.800000,'imp','Implants (5 year)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4410','', 3.200000,'imp','Implants (4 year)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4420','', 2.500000,'imp','Implants (3 year)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4430','', 0.066667,'pat','Patch'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4440','', 0.066667,'pat','Ring'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4450','', 0.008333,'con','Condoms (Male)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4460','', 0.008333,'con','Condoms (Female)'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4470','', 1.000000,'dia','Diapraghms'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4480','', 1.000000,'cap','Cervical Caps'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4490','', 0.133333,'sp' ,'Spermicides'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4540','', 3.300000,'iud','IUD Hormone 5 yr'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4550','', 4.600000,'iud','IUD Copper 10 yr'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4560','',10.000000,'vsc','Voluntary Surgical Contraception - Female'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4570','',10.000000,'vsc','Voluntary Surgical Contraception - Male'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4580','', 0.000000,'fab','Awareness-Based Methods - CMM'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4590','', 0.000000,'fab','Awareness-Based Methods - CBM'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4600','', 0.000000,'fab','Awareness-Based Methods - STM'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4610','', 0.000000,'fab','Awareness-Based Methods - SDM'); +INSERT INTO codes (code_type,code,modifier,cyp_factor,code_text_short,code_text) VALUES (32,'4620','', 0.050000,'ec' ,'Emergency Contraception (progestin only pills)'); + +# This transforms "newmethod" values in LBFccicon forms from IPPF codes to IPPFCM codes. +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4360' WHERE ld.field_value LIKE '111101%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4370' WHERE ld.field_value LIKE '111111%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4380' WHERE ld.field_value LIKE '111112%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4390' WHERE ld.field_value LIKE '111113%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4400' WHERE ld.field_value LIKE '111122%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4410' WHERE ld.field_value LIKE '111123%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4420' WHERE ld.field_value LIKE '111124%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4430' WHERE ld.field_value LIKE '111132%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4440' WHERE ld.field_value LIKE '111133%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4450' WHERE ld.field_value LIKE '112141%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4460' WHERE ld.field_value LIKE '112142%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4470' WHERE ld.field_value LIKE '112151%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4480' WHERE ld.field_value LIKE '112152%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4490' WHERE ld.field_value LIKE '112161%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4490' WHERE ld.field_value LIKE '112162%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4490' WHERE ld.field_value LIKE '112163%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4490' WHERE ld.field_value LIKE '112164%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4490' WHERE ld.field_value LIKE '112165%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4540' WHERE ld.field_value LIKE '113171%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4550' WHERE ld.field_value LIKE '113172%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4560' WHERE ld.field_value LIKE '121181%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4570' WHERE ld.field_value LIKE '122182%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; +UPDATE forms AS f, lbf_data AS ld SET ld.field_value = 'IPPFCM:4620' WHERE ld.field_value LIKE '145212%' AND f.formdir = 'LBFccicon' AND f.deleted = 0 AND ld.form_id = f.form_id AND ld.field_id = 'newmethod'; + +# This updates MA products and services, adding IPPFCM related codes deduced from legacy IPPF codes. +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4360') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111101%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4360') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111101%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4370') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111111%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4370') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111111%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4380') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111112%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4380') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111112%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4390') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111113%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4390') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111113%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4400') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111122%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4400') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111122%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4410') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111123%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4410') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111123%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4420') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111124%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4420') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111124%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4430') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111132%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4430') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111132%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4440') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:111133%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4440') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:111133%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4450') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112141%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4450') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112141%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4460') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112142%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4460') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112142%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4470') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112151%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4470') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112151%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4480') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112152%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4480') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112152%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112161%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112161%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112162%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112162%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112163%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112163%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112164%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112164%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112165%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4490') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:112165%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4540') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:113171%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4540') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113171%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4550') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:113172%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4550') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:113172%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4560') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:121181%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4560') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:121181%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4570') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:122182%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4570') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:122182%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE codes SET related_code = CONCAT(related_code, ';IPPFCM:4620') WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:145212%' AND related_code NOT LIKE '%IPPFCM:%'; +UPDATE drugs SET related_code = CONCAT(related_code, ';IPPFCM:4620') WHERE related_code IS NOT NULL AND related_code LIKE '%IPPF:145212%' AND related_code NOT LIKE '%IPPFCM:%'; + +# This updates MA services, setting "Initial Consult" indicators deduced from legacy IPPF codes. +UPDATE codes SET cyp_factor = 0 WHERE code_type = 12; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:11____110%'; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:112152010%'; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:121181_13%'; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:122182_13%'; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:131191_10%'; +UPDATE codes SET cyp_factor = 1 WHERE code_type = 12 AND related_code IS NOT NULL AND related_code LIKE '%IPPF:145212_10%'; + +# Modify LBFccicon form to use IPPFCM codes instead of the ippfconmeth list. +UPDATE layout_options SET data_type = 15, list_id = '', description = 'IPPFCM' WHERE form_id = 'LBFccicon' AND field_id = 'newmethod'; + +# Change New Acceptor Policy if it is set to the obsolete "New Users to IPPF/Association". +update globals SET gl_value = 3 WHERE gl_name = 'gbl_new_acceptor_policy' AND gl_value = 2; + +#EndIf + +# Modify LBFccicon form to make "Previous modern contraceptive use?" a required field. +UPDATE layout_options SET uor = 2 WHERE form_id = 'LBFccicon' AND field_id = 'pastmodern'; + +# Assign related codes to IPPFCM codes for statistical reporting purposes. +UPDATE codes SET related_code = 'IPPF:111101110;IPPF2:1121120000000' WHERE code_type = 32 AND code = '4360'; +UPDATE codes SET related_code = 'IPPF:111101110;IPPF2:1121120000000' WHERE code_type = 32 AND code = '4361'; +UPDATE codes SET related_code = 'IPPF:111111110;IPPF2:1122120000000' WHERE code_type = 32 AND code = '4370'; +UPDATE codes SET related_code = 'IPPF:111112110;IPPF2:1122120000000' WHERE code_type = 32 AND code = '4380'; +UPDATE codes SET related_code = 'IPPF:111113110;IPPF2:1122120000000' WHERE code_type = 32 AND code = '4390'; +UPDATE codes SET related_code = 'IPPF:111122110;IPPF2:1131120000000' WHERE code_type = 32 AND code = '4400'; +UPDATE codes SET related_code = 'IPPF:111123110;IPPF2:1131120000000' WHERE code_type = 32 AND code = '4410'; +UPDATE codes SET related_code = 'IPPF:111124110;IPPF2:1131120000000' WHERE code_type = 32 AND code = '4420'; +UPDATE codes SET related_code = 'IPPF:111132110;IPPF2:1123020000000' WHERE code_type = 32 AND code = '4430'; +UPDATE codes SET related_code = 'IPPF:111133110;IPPF2:1123020000000' WHERE code_type = 32 AND code = '4440'; +UPDATE codes SET related_code = 'IPPF:112141110;IPPF2:1124120000000' WHERE code_type = 32 AND code = '4450'; +UPDATE codes SET related_code = 'IPPF:112142110;IPPF2:1124220000000' WHERE code_type = 32 AND code = '4460'; +UPDATE codes SET related_code = 'IPPF:112151110;IPPF2:1125020000000' WHERE code_type = 32 AND code = '4470'; +UPDATE codes SET related_code = 'IPPF:112152010;IPPF2:1125020000000' WHERE code_type = 32 AND code = '4480'; +UPDATE codes SET related_code = 'IPPF:112160000;IPPF2:1126020000000' WHERE code_type = 32 AND code = '4490'; +UPDATE codes SET related_code = 'IPPF:113171110;IPPF2:1132120000000' WHERE code_type = 32 AND code = '4540'; +UPDATE codes SET related_code = 'IPPF:113172110;IPPF2:1132120000000' WHERE code_type = 32 AND code = '4550'; +UPDATE codes SET related_code = 'IPPF:121181000;IPPF2:1141130000800' WHERE code_type = 32 AND code = '4560'; +UPDATE codes SET related_code = 'IPPF:122182000;IPPF2:1142030000800' WHERE code_type = 32 AND code = '4570'; +UPDATE codes SET related_code = 'IPPF:145212000;IPPF2:1151020000000' WHERE code_type = 32 AND code = '4620'; + +#IfNotRow2D codes code_type 31 code 2135050505000 +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2135050505000', '', 'STI/RTI - Investigation - Lab test - Human Papilloma virus (HPV)' ); +INSERT INTO codes ( code_type, code, modifier, code_text ) VALUES ( 31, '2143230302501', '', 'Gynecology - Management - Surgical - cervical cancer related - Loop Electrosurgical Excision Procedure (LEEP)' ); +UPDATE codes SET code_text = 'Gynecology - Management - Surgical - Cervical Cancer Related - Cryosurgery' WHERE code_type = '31' AND code = '2143230302401'; +UPDATE codes SET code_text = 'Gynecology - Management - Surgical - Cervical Cancer Related - Cauterization' WHERE code_type = '31' AND code = '2143230302402'; +#EndIf + +#IfRow2D codes code_type 31 code 2150000000000 +DELETE FROM codes WHERE code_type = '31' AND code = '2150000000000'; +#EndIf + +#IfRow2D lang_definitions lang_id 1 definition Referrals +DELETE FROM lang_definitions WHERE lang_id = 1 AND definition LIKE 'Referrals%'; +#EndIf + +#IfMissingColumn forms issue_id +ALTER TABLE `forms` ADD COLUMN `issue_id` bigint(20) NOT NULL default 0 COMMENT 'references lists.id to identify a case'; +#EndIf + +#IfMissingColumn forms provider_id +ALTER TABLE `forms` ADD COLUMN `provider_id` bigint(20) NOT NULL default 0 COMMENT 'references users.id to identify a provider'; +#EndIf + +#IfMissingColumn list_options codes +ALTER TABLE `list_options` ADD COLUMN `codes` varchar(255) NOT NULL DEFAULT ''; +UPDATE list_options SET `codes`='SNOMED-CT:449868002' WHERE list_id='smoking_status' AND option_id='1' AND title='Current every day smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:428041000124106' WHERE list_id='smoking_status' AND option_id='2' AND title='Current some day smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:8517006' WHERE list_id='smoking_status' AND option_id='3' AND title='Former smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:266919005' WHERE list_id='smoking_status' AND option_id='4' AND title='Never smoker'; +UPDATE list_options SET `codes`='SNOMED-CT:77176002' WHERE list_id='smoking_status' AND option_id='5' AND title='Smoker, current status unknown'; +UPDATE list_options SET `codes`='SNOMED-CT:266927001' WHERE list_id='smoking_status' AND option_id='9' AND title='Unknown if ever smoked'; +#EndIf + +#IfMissingColumn layout_options fld_rows +ALTER TABLE `layout_options` ADD COLUMN `fld_rows` int(11) NOT NULL default '0'; +UPDATE `layout_options` SET `fld_rows`=max_length WHERE `data_type`='3'; +UPDATE `layout_options` SET `max_length`='0' WHERE `data_type`='3'; +UPDATE `layout_options` SET `max_length`='0' WHERE `data_type`='34'; +UPDATE `layout_options` SET `max_length`='20' WHERE `field_id`='financial_review' AND `form_id`='DEM'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_father' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_mother' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_siblings' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_spouse' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='history_offspring' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_cancer' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_tuberculosis' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_diabetes' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_high_blood_pressure' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_heart_problems' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_stroke' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_epilepsy' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_mental_illness' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='relatives_suicide' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='coffee' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='tobacco' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='alcohol' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='recreational_drugs' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='counseling' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='exercise_patterns' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='hazardous_activities' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='sleep_patterns' AND `form_id`='HIS'; +UPDATE `layout_options` SET `max_length`='0' WHERE `field_id`='seatbelt_use' AND `form_id`='HIS'; +#EndIf + +#IfMissingColumn layout_options source +ALTER TABLE `layout_options` ADD COLUMN `source` char(1) NOT NULL default 'F' + COMMENT 'F=Form, D=Demographics, H=History, E=Encounter'; +#EndIf + +#IfMissingColumn layout_options conditions +ALTER TABLE `layout_options` ADD COLUMN + `conditions` text NOT NULL DEFAULT '' COMMENT 'serialized array of skip conditions'; +#EndIf + +-- #IfNotRow2D list_options list_id lbfnames option_id LBFVitals +#IfNotRow layout_group_properties grp_form_id LBFVitals + +# This came from an export of the new LBF Vital Signs form and its dependent lists. +DELETE FROM list_options WHERE list_id = 'VIT_GenAppear'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_GenAppear'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_GenAppear','VIT_GenAppear',404,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','A&O','Alert and oriented',10,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Let','Lethargy',40,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Other','Other',100,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Sigj','Signs of jaundice',60,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Sigv','Signs/marks of physical violence',50,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','Wek','Weakness',30,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GenAppear','WoA','Without anxiety',20,0,0,'','',''); +DELETE FROM list_options WHERE list_id = 'VIT_GlucoseTestType'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_GlucoseTestType'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_GlucoseTestType','VIT_GlucoseTestType',430,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','2HR','2 Hour Blood Sugar',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','A1C','Hemoglobin A1C',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','FBS','Fasting Blood Sugar',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','NS','Not Specified',5,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','OGTT','Oral Glucose Tolerance',3,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','Other','Other',4,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_GlucoseTestType','RBS','Random Blood Sugar',1,0,0,'','',''); +DELETE FROM list_options WHERE list_id = 'VIT_TempLocation'; +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'VIT_TempLocation'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','VIT_TempLocation','VIT_TempLocation',419,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Axil','Axillary',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Oral','Oral',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Rectal','Rectal',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Temporal','Temporal Artery',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('VIT_TempLocation','Tympanic','Tympanic',0,0,0,'','',''); + +DELETE FROM layout_options WHERE form_id = 'LBFVitals'; + +-- DELETE FROM list_options WHERE list_id = 'lbfnames' AND option_id = 'LBFVitals'; +-- INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lbfnames','LBFVitals','Vital Signs',100,0,5,'Clinical','',''); + +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats) VALUES ('LBFVitals', 'Vital Signs', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFVitals', '1', 'Vitals', ''); + +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','DOB' ,'1','DOB',165,4,0,0,255,'',1,3,'','DNA0','',0,'D',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_AppearGen' ,'1','General Appearance',100,21,0,1,255,'VIT_GenAppear',1,3,'','','General Appearance',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BMI' ,'1','BMI',80,2,1,10,255,'',1,3,'','G','BMI',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BMI_status' ,'1','BMI Status',85,2,1,0,255,'',1,3,'','','BMI status',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BPDiast' ,'1','BP Diastolic',40,2,1,10,255,'',1,3,'','G','Blood pressure diastolic',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_BPSyst' ,'1','BP Systolic',30,2,1,10,255,'',1,3,'','G','Blood pressure systolic',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Glucose' ,'1','Glucose (mg/dl)',150,2,1,5,255,'',1,3,'','G','Glucose (mg/dl)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Glucose_TestType','1','Glucose Test Type',155,1,1,0,255,'VIT_GlucoseTestType',1,3,'','','Glucose Test Type',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Head_circum_cm' ,'1','Head Circumference (cm)',180,2,1,10,255,'',1,3,'','G','Head circumference (cms)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Head_circum_in' ,'1','Head Circumference (In)',170,2,1,10,255,'',1,3,'','G','Head circumference (ins))',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Height_cm' ,'1','Height (cm)',20,2,1,10,255,'',1,3,'','G','Height (cms)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Height_in' ,'1','Height (in)',25,2,1,10,255,'',1,3,'','G','Height (ins)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Hip_circum_cm' ,'1','Hip Circumference (cm)',220,2,0,0,10,'',1,3,'','G','Hip Circumference (cm)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Hip_circum_in' ,'1','Hip Circumference (in)',210,2,0,0,10,'',1,3,'','G','Hip Circumference (in)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_HR' ,'1','Heart Rate',60,2,0,10,255,'',1,3,'','G','Heart rate',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_O2_Satur' ,'1','Oxygen Saturation',75,2,1,10,255,'',1,3,'','G','Oxygen saturation',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Othernotes' ,'1','Notes',160,2,1,30,255,'',1,3,'','','Other general appearance',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Pulse' ,'1','Pulse (per min)',65,2,1,10,255,'',1,3,'','G','Pulse per min',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_RespRate' ,'1','Respiratory Rate',70,2,1,10,255,'',1,3,'','G','Respiratory rate',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempC' ,'1','Temperature (C)',45,2,1,10,255,'',1,3,'','G','Temperature (C)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempF' ,'1','Temperature (F)',50,2,1,10,255,'',1,3,'','G','Temperature (F)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_TempLoc' ,'1','Temperature Location',55,1,1,0,255,'VIT_TempLocation',1,3,'','','Temperature location',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Waist_circum_cm' ,'1','Waist Circumference (cm)',200,2,1,10,10,'',1,3,'','G','Waist Circumference (cm)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Waist_circum_in' ,'1','Waist Circumference (in)',190,2,1,10,255,'',1,3,'','G','Waist circumference (in)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Weight_kg' ,'1','Weight (kg)',15,2,1,10,255,'',1,3,'','G','Weight (kgs)',0,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFVitals','VIT_Weight_lb' ,'1','Weight (lb)',10,2,1,10,10,'',1,3,'','G','Weight (lbs)',0,'F',''); + +# Create new forms table entries cloned from those for the old vitals form. +INSERT INTO forms (date, encounter, form_name, form_id, pid, user, groupname, authorized, formdir, issue_id, provider_id) + SELECT date, encounter, 'Vital Signs', form_id, pid, user, groupname, authorized, '#LBFVitals#', issue_id, provider_id + FROM forms AS f WHERE formdir = 'vitals' AND deleted = 0; + +# Generate form_id values by creating one lbf_data entry per form. +INSERT INTO lbf_data (field_id, field_value) + SELECT '#LBFVitals#', id FROM forms WHERE formdir = '#LBFVitals#' AND deleted = 0; + +# Copy in data values. Note the old form_vitals table stores only US units of measurement. +# VIT_AppearGen omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BMI' , v.BMI FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.BMI != 0.0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BMI_status' , v.BMI_status FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.BMI_status IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BPDiast' , v.bpd FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.bpd IS NOT NULL AND v.bpd != 0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BPSyst' , v.bps FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.bps IS NOT NULL AND v.bps != 0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Glucose omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Head_circum_cm' , v.head_circ * 2.54 FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.head_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Head_circum_in' , v.head_circ FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.head_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Height_cm' , v.height * 2.54 FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.height != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Height_in' , v.height FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.height != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_HR omitted, might be removed. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_O2_Satur' , v.oxygen_saturation FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.oxygen_saturation != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Othernotes' , v.note FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.note IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Pulse' , v.pulse FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.pulse != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_RespRate' , v.respiration FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.respiration != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempF' , v.temperature FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.temperature != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempC', (v.temperature - 32) * 5 / 9 FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.temperature != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempLoc' , v.temp_method FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.temp_method IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Waist_circum_cm', v.waist_circ * 2.54 FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.waist_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Waist_circum_in', v.waist_circ FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.waist_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Waist_index omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Weight_kg' , v.weight * 0.45359237 FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.weight != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Weight_lb' , v.weight FROM forms AS f, form_vitals AS v, lbf_data AS d WHERE v.weight != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Hip_circum_cm omitted. +# VIT_Hip_circum_in omitted. + +# Replace the form_id values in the forms table with the new values. +UPDATE forms AS f, lbf_data AS d + SET f.form_id = d.form_id, f.formdir = 'LBFVitals' WHERE + d.field_id = '#LBFVitals#' AND d.field_value = f.id; + +# Remove the dummy lbf_data rows. +DELETE FROM lbf_data WHERE field_id = '#LBFVitals#'; + +# Mark the old vitals forms as deleted to avoid any confusion. This leaves enougn info to recover them if necessary. +UPDATE forms SET deleted = 1, form_name = CONCAT('DELETED ', form_name) WHERE formdir = 'vitals' and deleted = 0; + +# Disable the old vitals form so they dont continue to use it. +UPDATE registry SET state = 0 WHERE directory = 'vitals'; + +#EndIf + +#IfRow2D registry directory vitalsM state 1 + +# Create new forms table entries cloned from those for the old vitalsM form. +INSERT INTO forms (date, encounter, form_name, form_id, pid, user, groupname, authorized, formdir, issue_id, provider_id) + SELECT date, encounter, 'Vital Signs', form_id, pid, user, groupname, authorized, '#LBFVitals#', issue_id, provider_id + FROM forms AS f WHERE formdir = 'vitalsM' AND deleted = 0; + +# Generate form_id values by creating one lbf_data entry per form. +INSERT INTO lbf_data (field_id, field_value) + SELECT '#LBFVitals#', id FROM forms WHERE formdir = '#LBFVitals#' AND deleted = 0; + +# Copy in data values. Note the old form_vitalsM table stores only metric units of measurement. +# VIT_AppearGen omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BMI' , v.BMI FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.BMI != 0.0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BMI_status' , v.BMI_status FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.BMI_status IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BPDiast' , v.bpd FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.bpd IS NOT NULL AND v.bpd != 0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_BPSyst' , v.bps FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.bps IS NOT NULL AND v.bps != 0 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Glucose omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Head_circum_cm' , v.head_circ FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.head_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Head_circum_in' , v.head_circ / 2.54 FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.head_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Height_cm' , v.height FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.height != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Height_in' , v.height / 2.54 FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.height != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_HR omitted, might be removed. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_O2_Satur' , v.oxygen_saturation FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.oxygen_saturation != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Othernotes' , v.note FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.note IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Pulse' , v.pulse FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.pulse != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_RespRate' , v.respiration FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.respiration != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempF' , v.temperature * 9 / 5 + 32 FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.temperature != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempC' , v.temperature FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.temperature != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_TempLoc' , v.temp_method FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.temp_method IS NOT NULL AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Waist_circum_cm', v.waist_circ FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.waist_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Waist_circum_in', v.waist_circ / 2.54 FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.waist_circ != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Waist_index omitted. +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Weight_kg' , v.weight FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.weight != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +INSERT INTO lbf_data SELECT d.form_id, 'VIT_Weight_lb' , v.weight / 0.45359237 FROM forms AS f, form_vitalsM AS v, lbf_data AS d WHERE v.weight != 0.00 AND f.formdir = '#LBFVitals#' AND f.deleted = 0 AND v.id = f.form_id AND d.field_id = '#LBFVitals#' AND d.field_value = f.id; +# VIT_Hip_circum_cm omitted. +# VIT_Hip_circum_in omitted. + +# Replace the form_id values in the forms table with the new values. +UPDATE forms AS f, lbf_data AS d + SET f.form_id = d.form_id, f.formdir = 'LBFVitals' WHERE + d.field_id = '#LBFVitals#' AND d.field_value = f.id; + +# Remove the dummy lbf_data rows. +DELETE FROM lbf_data WHERE field_id = '#LBFVitals#'; + +# Mark the old vitalsM forms as deleted to avoid any confusion. This leaves enough info to recover them if necessary. +UPDATE forms SET deleted = 1, form_name = CONCAT('DELETED ', form_name) WHERE formdir = 'vitalsM' and deleted = 0; + +# Disable the old vitalsM form so they dont continue to use it. +UPDATE registry SET state = 0 WHERE directory = 'vitalsM'; + +#EndIf + +-- #IfNotRow2D list_options list_id lbfnames option_id LBFVNote +#IfNotRow layout_group_properties grp_form_id LBFVNote +-- INSERT INTO list_options (list_id,option_id,title,seq,option_value) VALUES ('lbfnames','LBFVNote','Visit Notes',1,5); +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats) VALUES ('LBFVNote', 'Visit Notes', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFVNote', '1', 'Visit Notes', ''); +DELETE FROM layout_options WHERE form_id = 'LBFVNote'; +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) + VALUES ('LBFVNote','Notes','1','Notes',20,3,1,50,255,'',1,3,'','','',10,'F',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) + VALUES ('LBFVNote','Provider','1','Provider',10,10,1,0,0,'',1,3,'','','',0,'F',''); +#EndIf + +#IfNotRow2D list_options list_id lists option_id Relation_to_Client +DELETE FROM list_options WHERE list_id = 'lists' AND option_id = 'Relation_to_Client'; +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('lists','Relation_to_Client','Relation to Client',298,1,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Aunt','Aunt',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Bfriend','Boyfriend',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','BfriendLive','Boyfriend- LiveIn',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','BIL','Brother in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Cousin','Cousin',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Daughter','Daughter',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Ex','Ex-Partner',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','FamFriend','Friend of Family',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Father','Father',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','FIL','Father in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Gfriend','Girlfriend',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','GfriendLive','Girlfriend - LiveIn',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Godfather','Godfather',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Godmother','Godmother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Grandfather','Grandfather',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Grandmother','Grandmother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Husband','Husband',0,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','MIL','Mother in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Mother','Mother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Nephew','Nephew',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Niece','Niece',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Other','Other',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','SIL','Sister in Law',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Son','Son',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Stepdaugh','Step-Daughter',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','StepFather','Step-Father',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','StepMother','Step-Mother',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Stepson','Step-Son',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Uncle','Uncle',1,0,0,'','',''); +INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`) VALUES ('Relation_to_Client','Wife','Wife',0,0,0,'','',''); +#EndIf + +-- #IfNotRow2D list_options list_id lbfnames option_id LBFGBV +-- INSERT INTO list_options (list_id,option_id,title,seq,option_value) VALUES ('lbfnames','LBFGBV','GBV Screening',1,5); +#IfNotRow layout_group_properties grp_form_id LBFGBV +INSERT INTO layout_group_properties (grp_form_id, grp_title, grp_mapping, grp_repeats ) VALUES ('LBFGBV', 'GBV Screening', 'Clinical', 5); +INSERT INTO layout_group_properties (grp_form_id, grp_group_id, grp_title, grp_mapping) VALUES ('LBFGBV', '1', 'GBV Screening', ''); +DELETE FROM layout_options WHERE form_id = 'LBFGBV'; +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child' ,'1','Were you ever touched inappropriately as a child?',40,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child_When' ,'1','___If so, when?',41,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Child_Who' ,'1','___By Whom?',42,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional' ,'1','Have you ever been emotionally/psychologically abused?',10,1,2,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional_When','1','___If so, when?',11,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Emotional_Who' ,'1','___By Whom?',12,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Fear' ,'1','Are you afraid of being harmed?',71,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Fear_Who' ,'1','___By Whom?',72,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical' ,'1','Have you ever been physically abused?',20,1,2,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical_When' ,'1','___If so, when?',21,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Physical_Who' ,'1','___By Whom?',22,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Pregnancy' ,'1','Have you been abused since you''ve been pregnant?',60,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Preg_When' ,'1','___If so, when?',61,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Preg_Who' ,'1','___By Whom?',62,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_SafeHome' ,'1','Will you be safe when you go home?',70,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual' ,'1','Have you ever been sexually abused?',30,1,1,0,0,'yesno',1,3,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual_When' ,'1','___If so, when?',31,2,1,20,0,'',0,0,'','','',0,'E',''); +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ('LBFGBV','GBV_Sexual_Who' ,'1','___By Whom?',32,1,1,0,0,'Relation_to_Client',0,0,'','','',0,'E',''); +#EndIf + +#IfNotRow2D layout_options form_id LBFVitals field_id VIT_GlucoseUnits +INSERT INTO `layout_options` (`form_id`, `field_id`, `group_id`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, + `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`, `fld_rows`, `source`, `conditions`) VALUES ( + 'LBFVitals', 'VIT_GlucoseUnits', '1', 'Glucose Units', 152, 1, 1, 0, 255, + 'LAB_BloodConcentration', 1, 3, '', '', 'Glucose Units', 0, 'F', ''); +#EndIf + +#IfNotRow2D list_options list_id lists option_id LAB_BloodConcentration +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('lists','LAB_BloodConcentration','LAB_BloodConcentration', 1,0); +DELETE FROM list_options WHERE list_id = 'LAB_BloodConcentration'; +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('LAB_BloodConcentration','mg_dl' ,'mg/dl' ,1,1); +INSERT INTO list_options (list_id, option_id, title, seq, is_default) VALUES ('LAB_BloodConcentration','mmol_l','mmol/L',2,0); +#EndIf + +UPDATE lang_definitions SET definition = 'DHIS2 Code' WHERE lang_id = 1 AND definition = 'SDP ID'; diff --git a/version.php b/version.php index 675662050..144e3f0e0 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ $v_realpatch = '0'; // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // -$v_database = 241; +$v_database = 242; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used -- 2.11.4.GIT
    {label_name}   + + - - + + + - +
    {label_clinic_id}{ref_pid}{label_client_id}{pt_pubpid} 
    {label_date}{ref_refer_date} {ref_refer_date} 
    + + - - + + + - +
    {label_clinic_id}{ref_pid}{label_client_id}{pt_pubpid} 
    {label_date}{ref_reply_date} {ref_reply_date}