[eluser]Todlerone[/eluser]
Hello all and TY in advance. The $treat_MRI errors on me.
Code:
function add_treatment($ptID, $user, $trtnum){
$locate = $this->input->post('laterality')." ".$this->input->post('treat_location');
$treat_MRI = (!empty($this->input->post('treat_MRI'))) ? $this->input->post('treat_MRI') : 'NULL';
$data = array(
'demo_NumID' => $ptID,
'treat_num' => $trtnum+1,
'treat_unit' => $this->input->post('treat_unit'),
'treat_region' => $this->input->post('treat_region'),
'treat_location' => $locate,
'treat_dose' => $this->input->post('treat_dose'),
'treat_fractions' => $this->input->post('treat_fractions'),
'treat_MRI' => $treat_MRI,
'treat_CT' => $this->input->post('treat_CT'),
'treat_RFV' => $this->input->post('treat_RFV'),
'treat_VD' => $this->input->post('treat_VD'),
'treat_PD' => $this->input->post('treat_PD'),
'treat_DELI' => $this->input->post('treat_DELI'),
'treat_AUTH' => $this->input->post('treat_AUTH'),
'treat_START' => $this->input->post('treat_START'),
'treat_notes' => $this->input->post('treat_notes'),
'treat_created_on' => unix_to_human(now(), TRUE, 'us'),
'treat_created_by' => $user['username']);
$this->db->insert('treatments', $data);
}
TY