<?php
namespace app\model;

use think\Model;


class DiseaseCategoryProperties extends Model
{
    protected $table = "jm_disease_properties_category";

    public static function getValueByTag($tag = '', $type = '', $gh = '')
    {
        if ('zh' === $type && 'SickNess' === $tag) {
            $tag = 'zySickNess';
        }

        $xyLables = [
            'Disease' => '医疗疾病',
            'Ferri' => 'ferri疾病',
            'cases' => '病例',
            'SickNess' => '科普疾病',
            //'Symptom'               => '症状'   ,
            'MedicineProduction' => '药品',
            'MedicalInsuranceDrugEn' => '国家医保药品目录（西医）',
            'essentialDrugs' => '国家基本药物目录',
            'DrugOverdose' => '超用药说明书',
            'DrugAnswers' => '药品问答',
            'Inspection' => '检验检查', // 检查
            'ClinicalPathway' => '临床路径',
            //'Nursing'               => '护理'   ,
            'Operation' => '手术操作',
            'DiagnosisTreatment' => '诊疗指南',
            'GuideMap' => '指南脑图',
            'GuideStructure' => '指南结构化',
            'DrugTarget' => '药物靶点',
            'Antidiastole' => '误诊误治',
            'ClinicalTrial' => '临床试验',
            'Mission' => '宣教',
            'XyPrescription' => '常见处方',
            'Interact' => '药物相互作用',
            'Xyhl' => '护理',
            'Zztz' => '症状体征',
            'LawRegulations' => '法律法规',
            'MedicalCalculator' => '医疗计算器',
        ];

        $zyLables = [
            'zySickNess' => '疾病',
            'CnMedicinalCrop' => '中药',
            'CnPatentMedicine' => '中成药',
            'MedicalInsuranceDrugZh' => '国家医保药品目录（中成药）',
            'Prescription' => '方剂',
            'TonicDiet' => '药膳',
            'Constitution' => '体质',
            'ChannelCollateral' => '经络',
            'Acupoint' => '穴位',
            'zyxdya' => '中医现代医案',
            'zygdya' => '中医古代医案',
            'zyjbbz' => '疾病辩证',
            'zyfywlf' => '中医非药物疗法',
            'zhguide' => '中医诊疗指南',
            //'Disease'               => '医疗疾病'
            'ZhSymptom'               => '症状'
        ];

        // 工号列表，只返回国家医保药品目录（西医）
        $limitedGh1 = [
            '0603', '0488', '0318', '2434', '0737', '3496', '1569', '0425', '3024', '2453', '0799'
        ];

        // 新的工号列表，只返回国家基本药物目录
        $limitedGh2 = [
            '2105', '2104', '2213', '3360', '2009', '2919', '3711', '2430', '3361', '2330',
            '2004', '2265', '2028', '2008', '2017', '2455', '2041', '2039', '1800', '1799',
            '3597', '1061', '0553', '0930', '0718', '0986', '2262', '3440', '3598', '3421',
            '3387', '2560', '1714', '2052', '1677', '1922', '2089', '3774', '0931', '1175',
            '0647', '0216', '1591', '1625', '2048', '2559', '1941', '2385', '1653', '0830',
            '0831', '0426', '0887', '0412', '0358', '1702', '0117', '1962', '1048', '2040',
            '3710', '2876', '3709', '3823', '2954'
        ];

        if (in_array($gh, $limitedGh1)) {
            $xyLables = [
                'MedicalInsuranceDrugEn' => '国家医保药品目录（西医）'
            ];
            $zyLables = [];
        } elseif (in_array($gh, $limitedGh2)) {
            $xyLables = [
                'essentialDrugs' => '国家基本药物目录'
            ];
            $zyLables = [];
        }

        $labels = 'zh' === $type ? $zyLables : $xyLables;
        return $tag ? $labels[$tag] : $labels;
    }
}
