Ajax callback on select box change event not working on second time
You are using wrong notation for form elements, instead of field_suffix you should use "suffix" tag, as drupal is not able to track your closing tag, for a form element.

function demo_pane_form($form, &amp;$form_state) {

 $options= array(1=&gt;1, 2=&gt;2, 3=&gt;3, 4=&gt;4, 5=&gt;5);

 $form['user_data_form']['reference_number_ajax'] = array(   
  '#type' =&gt;'select', 
  '#title' =&gt; 'Select a Patient',
  '#ajax' =&gt; array(
     'callback' =&gt; 'demo_pane_dropdown_callback',
     'wrapper' =&gt; 'ref_number_list',
     'event' =&gt; 'change',
     'method' =&gt; 'replace',
     'effect' =&gt; 'fade',
   ),   
   '#attributes' =&gt; array(
     'class'=&gt;array('dynamic-select')
   ),  
   '#default_value' =&gt; 1,  
   '#options' =&gt; $options,   
   '#prefix'=&gt;'&lt;div class="col-md-12"&gt;',  
   '#suffix'=&gt;'&lt;/div&gt;' 
 );

 $form['user_data_form']['patient_name'] = array(   
  '#type' =&gt; 'textfield',
  '#title' =&gt; 'Patient Name', 
  '#value' =&gt; 1,  
  '#prefix'=&gt;'&lt;div id="ref_number_list"&gt;&lt;div class="col-md-12"&gt;',  
  '#suffix'=&gt;'&lt;/div&gt;&lt;/div&gt;',
 );

 return $form;

 }

 function demo_pane_dropdown_callback($form, $form_state) {

   $form['user_data_form']['patient_name']['#value'] =
   $form_state['values']['reference_number_ajax'];  
   $form['user_data_form']['age']['#value']          =
   $form_state['values']['reference_number_ajax'];      
   $elements =  array(
     $form['user_data_form']['patient_name'],
     $form['user_data_form']['age'],
   );

  return $elements; 
 }