Skip to content

Instantly share code, notes, and snippets.

@besabellacyrus
Last active April 28, 2017 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save besabellacyrus/18bed50e52833ce029cbe7d8525f6048 to your computer and use it in GitHub Desktop.
Save besabellacyrus/18bed50e52833ce029cbe7d8525f6048 to your computer and use it in GitHub Desktop.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once(FUEL_PATH.'models/Base_module_model.php');
class Doctor_entries_model extends Base_module_model
{
public $has_many = array(
'clinical_focus' => array('clinical_focus_entries_model'),
'specialties' => array('specialty_entries_model'),
'clinics' => array('clinic_entries_model'),
);
public function __construct()
{
parent::__construct('slmc_doctors');
}
function list_items($limit = NULL, $offset = NULL, $col = 'last_name', $order = 'asc', $just_count = false)
{
$this->db->select('id, first_name, last_name, active', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
$fields['schedules'] = array('type' => 'embedded_list', 'module' => 'schedule_entries_model', 'cols' => array('day', 'am', 'pm', 'availability'));
$fields['quali_exp']['name'] = 'Qualifications and Experience';
return $fields;
}
}
class Doctor_entry_model extends Base_module_record {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment