<?php
class Xdo_model extends CI_Model{
	public function __construct(){
		parent::__construct();
	}

	public function listar($texto=''){
		$where 	= ($texto!='')?" WHERE CONCAT(diag_codigo,' ',diag_descripcion) LIKE '%$texto%'":"";
		$query 	= "SELECT * FROM diagnostico {$where}";
		return 	$this->db->query($query);
	}
}