<commit_before><?php
namespace Controller\Backend;

use Library\CrudController;
use Model\Entity\Category;

class SintomaController extends CrudController {
    static $template = 'Layout/base.html.php';

    protected $entity = null;
    protected $module = 'sintoma';
    protected $route = [
        'index' => '/backend/sintoma',
        'edit' => '/backend/sintoma/edit',
    ];
    protected $vtitles = [
        'index'=>'Listado de Sintomas',
        'edit'=>'Editar Sintoma',
        'new'=>'Nuevo Sintoma',
    ];
    protected $fields = [
        'descripcion'=>['name'=>'Descripción','type'=>'textarea'],
        'primeros_auxilios'=>['name'=>'Primeros Auxilios','type'=>'textarea'],
        'ambulancia'=>['name'=>'Necesita Ambulancia?','type'=>'checkbox'],
        'category_id'=>['name'=>'Categoria','type'=>'select'],
    ];
    protected $messages = [
        'save'=>'Sintoma guardada con exito',
        'create'=>'Sintoma creada con exito',
    ];

    function __construct(){
        $this->entity = new \Model\Entity\Sintoma;
    }

    function indexAction(){
        $action = parent::indexAction();
        $entities = [];
        $category = new Category;
        foreach($action['entities'] as $entity){
            $entity['category_id'] = $category->select(['nombre'],"id=$entity[category_id]")->fetch()['nombre'];
            $entity['ambulancia'] = $entity['ambulancia']?'SI':'NO';<commit_msg>arreglue descripcion<commit_after><?php
namespace Controller\Backend;

use Library\CrudController;
use Model\Entity\Category;

class SintomaController extends CrudController {
    static $template = 'Layout/base.html.php';

    protected $entity = null;
    protected $module = 'sintoma';
    protected $route = [
        'index' => '/backend/sintoma',
        'edit' => '/backend/sintoma/edit',
    ];
    protected $vtitles = [
        'index'=>'Listado de Sintomas',
        'edit'=>'Editar Sintoma',
        'new'=>'Nuevo Sintoma',
    ];
    protected $fields = [
        'descripcion_sintomas'=>['name'=>'Descripción','type'=>'textarea'],
        'primeros_auxilios'=>['name'=>'Primeros Auxilios','type'=>'textarea'],
        'ambulancia'=>['name'=>'Necesita Ambulancia?','type'=>'checkbox'],
        'category_id'=>['name'=>'Categoria','type'=>'select'],
    ];
    protected $messages = [
        'save'=>'Sintoma guardada con exito',
        'create'=>'Sintoma creada con exito',
    ];

    function __construct(){
        $this->entity = new \Model\Entity\Sintoma;
    }

    function indexAction(){
        $action = parent::indexAction();
        $entities = [];
        $category = new Category;
        foreach($action['entities'] as $entity){
            $entity['category_id'] = $category->select(['nombre'],"id=$entity[category_id]")->fetch()['nombre'];
            $entity['ambulancia'] = $entity['ambulancia']?'SI':'NO';
{'fraction_non_alphanumeric': 0.18994413407821228, 'fraction_numerical': 0.0, 'mean_word_length': 3.340909090909091, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1546679', 'n_tokens_mistral': 872, 'n_tokens_neox': 889, 'n_words': 146}