Example #1
0
 // GET api/<controller>
 public IEnumerable<patient_disease> Get(string name)
 {
     //分组查询
     string error = string.Empty;
     patient_info_Bll infobll = new patient_info_Bll();
     var resultlist = infobll.SearchPatientDiseaseList(0, DoctorID, name, null, null,null, null, null,null, out error);
     return resultlist;
 }
        /// <summary>
        /// 查询单个诊断相关信息
        /// </summary>
        /// <param name="rcdid"></param>
        /// <returns></returns>
        public patient_medical_rcd Get(int rcdid)
        {
            Base_Bll bll = new Base_Bll();
            patient_medical_rcd info = bll.GetInfo<patient_medical_rcd>(rcdid);

            bll.GetFor(info, t => new { t.patient_name, t.gender, t.birth, t.hospital_name, t.doctor_name });
            if (info.birth.Year != Share.BaseTool.MiniDate.Year)
            {
                int age = DateTime.Now.Year - info.birth.Year;
                if (DateTime.Now < info.birth.AddYears(age)) age--;
                info.patient_age = age;
            }
            patient_address address = new patient_info_Bll().GetDefaultPatientAddressByPatientId(info.patient_id);
            info.address = address.contact_add;

            return info;
        }
        /// <summary>
        /// 查询处方详细信息及处方列表信息
        /// </summary>
        /// <param name="recipeId"></param>
        /// <returns></returns>
        public patient_recipelist Get(int recipeId)
        {
            Base_Bll bll = new Base_Bll();
            patient_recipelist info = bll.GetInfo<patient_recipelist>(recipeId);
            bll.GetFor(info, t => new { t.patient_name,t.gender,t.birth,t.alllergic_his });

            List<patient_recipelist_druguse> druguselist = new patient_recipelist_Bll().GetRecipeDrugListByReciptID(recipeId);
            bll.GetFor(druguselist, t => new { t.commonname, t.standard });

            info.druguselist = druguselist;

            if (info.birth.Year != Share.BaseTool.MiniDate.Year)
            {
                int age = DateTime.Now.Year - info.birth.Year;
                if (DateTime.Now < info.birth.AddYears(age)) age--;
                info.patient_age = age;
            }
            patient_address address = new patient_info_Bll().GetDefaultPatientAddressByPatientId(info.patient_id);
            info.address = address.contact_add;
            return info;
        }