<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Question</LimeSurveyDocType>
 <DBVersion>499</DBVersion>
 <languages>
  <language>en</language>
 </languages>
 <questions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[14418]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[M]]></type>
    <title><![CDATA[Q2]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[Y]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[3]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[multiplechoice]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
  </rows>
 </questions>
 <subquestions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>same_script</fieldname>
   <fieldname>id</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>script</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[14447]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ1]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[0]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37116]]></id>
    <question><![CDATA[Dermatology]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14450]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ11]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37119]]></id>
    <question><![CDATA[Derma 1]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14451]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ12]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[2]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37120]]></id>
    <question><![CDATA[Derma 2]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14452]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ13]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[3]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37121]]></id>
    <question><![CDATA[Derma 3]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14448]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ2]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[4]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37117]]></id>
    <question><![CDATA[Orthology]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14453]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ21]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[5]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37122]]></id>
    <question><![CDATA[Ortho 1]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14454]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ22]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[6]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37123]]></id>
    <question><![CDATA[Ortho 2]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14455]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ23]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[7]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37124]]></id>
    <question><![CDATA[Ortho 3]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14449]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ3]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[8]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37118]]></id>
    <question><![CDATA[Urology]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14456]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ31]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[9]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37125]]></id>
    <question><![CDATA[Uro 1]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14457]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ32]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[10]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37126]]></id>
    <question><![CDATA[Uro 2]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14458]]></qid>
    <parent_qid><![CDATA[14418]]></parent_qid>
    <sid><![CDATA[446819]]></sid>
    <gid><![CDATA[186]]></gid>
    <type><![CDATA[T]]></type>
    <title><![CDATA[SQ33]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[N]]></mandatory>
    <encrypted><![CDATA[N]]></encrypted>
    <question_order><![CDATA[11]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <question_theme_name><![CDATA[longfreetext]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
    <id><![CDATA[37127]]></id>
    <question><![CDATA[Uro 3]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </subquestions>
 <question_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>script</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[37115]]></id>
    <qid><![CDATA[14418]]></qid>
    <question><![CDATA[Which indication(s) do you treat?
<script type="text/javascript" charset="utf-8">

  // A function to handle "child" checkboxes
  function dependantCheckboxes(qID, primaryCodes, secondaryCodes, tertiaryCodes) {
    // Identify the elements annd assign classes/attributes
    var thisQuestion = $('#question'+qID);
    thisQuestion.addClass('with-dependants');
    $.each(primaryCodes, function(i, val) {
      var thisItem = $('li[id$="X'+qID+val+'"]');
      $(thisItem).addClass('level-1 parent-item').attr('data-code', val).attr('data-level', '1');
    });
    $.each(secondaryCodes, function(i, val) {
      var thisItem = $('li[id$="X'+qID+val+'"]');
      var thisParent1 = $(thisItem).prevAll('li[data-level="1"]:eq(0)');
      $(thisItem).addClass('level-2 parent-item child-item').attr('data-code', val).attr('data-level', '2').attr('data-parent-1', $(thisParent1).attr('data-code'));
    });
    $.each(tertiaryCodes, function(i, val) {
      var thisItem = $('li[id$="X'+qID+val+'"]');
      var thisParent1 = $(thisItem).prevAll('li[data-level="1"]:eq(0)');
      var thisParent2 = $(thisItem).prevAll('li[data-level="2"]:eq(0)');
      $(thisItem).addClass('level-3 child-item').attr('data-code', val).attr('data-level', '3').attr('data-parent-1', $(thisParent1).attr('data-code')).attr('data-parent-2', $(thisParent2).attr('data-code'));
    });

    // A function to handle the states of child items
    function handleChildren(el) {
      var thisitem = $(el).closest('li');
      var thisCode = $(thisitem).attr('data-code');
      var thisLevel = $(thisitem).attr('data-level');
      var thisChildren = $('li[data-level="'+(Number(thisLevel)+1)+'"][data-parent-'+thisLevel+'="'+thisCode+'"]', thisQuestion);

      // Hide/show the secondary answers accordingly
      if (!$(el).is(':checked')) {
        $(thisChildren).fadeOut(300, function(e) {
          $('input:checkbox', thisChildren).prop('checked', false).trigger('change');
        });
      }
      else {
        $(thisChildren).fadeIn(300);
      }
    }

    // Initial states of the secondary answers
    $('.parent-item input:checkbox', thisQuestion).each(function(i) {
      handleChildren($(this));
    });

    // A listener on the primary answer to show or hide secondary answers
    $('.parent-item input:checkbox', thisQuestion).on('change', function(e) {
      handleChildren($(this));
    });
  }


  $(document).on('ready pjax:scriptcomplete',function(){
    dependantCheckboxes(
      {QID},
      // First-level sub-question codes
      ['SQ1', 'SQ2', 'SQ3'],
      
      // Second-level sub-question codes
      ['SQ11', 'SQ12', 'SQ13', 'SQ21', 'SQ22', 'SQ23', 'SQ31', 'SQ32', 'SQ33'], 
      
      // Third-level sub-question codes
      [] 
    );
    });
</script>
<style type="text/css">.with-dependants .child-item {
            display: none;
        }

        .with-dependants li.level-2 {
            margin-left: 2.5em;
        }

        .with-dependants li.level-3 {
            margin-left: 5em;
        }
</style>]]></question>
    <help/>
    <script/>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </question_l10ns>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[array_filter]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[array_filter_exclude]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[array_filter_style]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[assessment_value]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[clear_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[display_columns]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[em_validation_q]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[em_validation_q_tip]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[exclude_all_others]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[exclude_all_others_auto]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[max_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[min_answers]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[other_numbers_only]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[other_position]]></attribute>
    <value><![CDATA[end]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[other_position_code]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[other_replace_text]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[printable_help]]></attribute>
    <value/>
    <language><![CDATA[en]]></language>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[public_statistics]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[random_order]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[scale_export]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[14418]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
  </rows>
 </question_attributes>
</document>
