<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PreTbRecord extends Model
{
    use HasFactory;

    protected $fillable = [
        'cid',
        'clinic_name',
        'name',
        'age',
        'sex',
        'type_of_screening',
        'height',
        'weight',
        'bmi',
        'mode_of_entry',
        'date_of_screening',
        'dofnv',
        'phone',
        'main_presenting_complaint',
        'tb_symptoms',
        'fever_days',
        'cough_days',
        'hemoptysis_days',
        'weight_loss_days',
        'appetite_loss_days',
        'chest_pain_days',
        'night_sweats_days',
        'neck_glands_days',
        'fatigue_days',
        'fever_present',
        'cough_present',
        'hemoptysis_present',
        'weight_loss_present',
        'appetite_loss_present',
        'chest_pain_present',
        'night_sweats_present',
        'neck_glands_present',
        'fatigue_present',
        'smoking',
        'alcohol',
        'malnutrition',
        'PWID',
        'PWUD',
        'DM',
        'dm_tx_status',
        'hiv_status',
        'hiv_tx',
        'his_tb_self',
        'his_tb_family',
        'chest_xray',
        'chest_xray_date',
        'chest_xray_fac',
        'xray_image_path',
        'genexpert',
        'genexpert_date',
        'type_of_specimen_geneXpert',
        'genexpert_res',
        'truenat',
        'truenat_date',
        'type_of_specimen_truenat',
        'truenat_res',
        'hiv_det',
        'hiv_det_date',
        'hiv_det_res',
        'crp',
        'crp_date',
        'crp_result',
        'tb_treat_regimen',
        'md_diagnosis',
        'cad_score',
        'comment',
        'radio_request',
        'radio_request_date',
        'radiologist_result',
        'sputum_afb',
        'sputum_afb_date',
        'sputum_afb_res',
        'antibiotics',
        'antibiotic_date',
        'drug',
        'tb_treat',
        'tb_treat_date',
        'manage_oth',
        'tb_diagnosis',
        'treatment_status',
        'treatment_status_other',
        'remark',
        'md',
    ];

    protected $casts = [
        'date_of_screening' => 'date',
        'dofnv' => 'date',
        'height' => 'float',
        'weight' => 'float',
        'bmi' => 'float',
        'fever_days' => 'integer',
        'cough_days' => 'integer',
        'hemoptysis_days' => 'integer',
        'weight_loss_days' => 'integer',
        'appetite_loss_days' => 'integer',
        'chest_pain_days' => 'integer',
        'night_sweats_days' => 'integer',
        'neck_glands_days' => 'integer',
        'fatigue_days' => 'integer',
        'fever_present' => 'integer',
        'cough_present' => 'integer',
        'hemoptysis_present' => 'integer',
        'weight_loss_present' => 'integer',
        'appetite_loss_present' => 'integer',
        'chest_pain_present' => 'integer',
        'night_sweats_present' => 'integer',
        'neck_glands_present' => 'integer',
        'fatigue_present' => 'integer',
        'chest_xray_date' => 'date',
        'genexpert_date' => 'date',
        'truenat_date' => 'date',
        'hiv_det_date' => 'date',
        'crp_date' => 'date',
        'crp_result' => 'float',
        'radio_request_date' => 'date',
        'sputum_afb_date' => 'date',
        'antibiotic_date' => 'date',
        'tb_treat_date' => 'date',
        'cad_score' => 'float',
    ];
}
