public List <EMR.Controls.Entity.EmrCatalogue> GetCatalogueData()
        {
            string    strsql = @"SELECT * FROM Emr_Catalogue";
            DataTable dt     = oleDb.GetDataTable(strsql);

            return(ConvertDataExtend.ToList <EMR.Controls.Entity.EmrCatalogue>(dt));
        }
        public List <EMR.Controls.Entity.EmrTemplateTree> GetTemplateTreeData(string deptCode, string doctorCode, int levelCode)
        {
            string strsql = @"SELECT * FROM Emr_TemplateTree WHERE DeptCode='{0}' AND LevelCode={1} AND (UserCode='{2}' OR LevelCode<>2) And Deleteflag=0";

            strsql = string.Format(strsql, deptCode, levelCode, doctorCode);
            DataTable dt = oleDb.GetDataTable(strsql);

            return(ConvertDataExtend.ToList <EMR.Controls.Entity.EmrTemplateTree>(dt));
        }
        public List <EMR.Controls.Entity.EmrWriteRecord> GetWriteRecordData(int PatientId)
        {
            string strsql = @"SELECT ID ,
        RecordText ,
        CatalogueCode ,
        DeptCode ,
        DeptName ,
        UserCode ,
        UserName ,
        PatientId ,
        EmrDataId ,
        OrderNum ,
        FirstSignature ,
        FirstSignTime ,
        FirstDoctorLevel ,
        FirstDoctorLevelName,
        SecondSignature ,
        SecondSignTime ,
        SecondDoctorCode ,
        SecondDoctorName ,
        SecondDoctorLevel ,
        SecondDoctorLevelName,
        ThreeSignature ,
        ThreeSignTime ,
        ThreeDoctorCode ,
        ThreeDoctorName ,
        ThreeDoctorLevel ,
        ThreeDoctorLevelName,
        CreateTime ,
        PrintTime ,
        DeleteFlag ,
        HosptialId FROM Emr_WriteRecord WHERE PatientId={0}  And Deleteflag=0";

            strsql = string.Format(strsql, PatientId);
            DataTable dt = oleDb.GetDataTable(strsql);

            return(ConvertDataExtend.ToList <EMR.Controls.Entity.EmrWriteRecord>(dt));
        }