MedicalHistoryModel.php
30 lines
| 930 B
| text/x-php
|
PhpLexer
|
r0 | <?php | ||
class MedicalHistoryModel extends ModelBase{ | ||||
public $tableName = 'sis_medical_history'; | ||||
public $id = array('key'=>'idmed_history','value'=>''); | ||||
public function addItem($datos){ | ||||
$this->setFieldArray($datos); | ||||
list($resultado,$id,$mensaje) = $this->insert(); | ||||
return array ($resultado,$id,$mensaje); | ||||
} | ||||
public function DeleteItem(){ | ||||
list($resultado,$mensaje) = $this->delete(); | ||||
return array ($resultado,$mensaje); | ||||
} | ||||
public function UpdateItem($datos){ | ||||
$this->setFieldArray($datos); | ||||
list($resultado,$mensaje) = $this->update(); | ||||
return array ($resultado,$mensaje); | ||||
} | ||||
public function list_history($id){ | ||||
$this->setQuery("Select * | ||||
From sis_medical_history | ||||
Where idapplication =".$id); | ||||
$consulta = $this->loadObjectList(); | ||||
return $consulta; | ||||
} | ||||
} | ||||
?> | ||||