Пример #1
0
        ///<summary>Refresh all operatories</summary>
        public static void Refresh()
        {
            string command = "SELECT * FROM operatory "
                             + "ORDER BY ItemOrder";
            DataTable table = General.GetTable(command);

            List = new Operatory[table.Rows.Count];
            ArrayList AL = new ArrayList();

            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new Operatory();
                List[i].OperatoryNum  = PIn.PInt(table.Rows[i][0].ToString());
                List[i].OpName        = PIn.PString(table.Rows[i][1].ToString());
                List[i].Abbrev        = PIn.PString(table.Rows[i][2].ToString());
                List[i].ItemOrder     = PIn.PInt(table.Rows[i][3].ToString());
                List[i].IsHidden      = PIn.PBool(table.Rows[i][4].ToString());
                List[i].ProvDentist   = PIn.PInt(table.Rows[i][5].ToString());
                List[i].ProvHygienist = PIn.PInt(table.Rows[i][6].ToString());
                List[i].IsHygiene     = PIn.PBool(table.Rows[i][7].ToString());
                List[i].ClinicNum     = PIn.PInt(table.Rows[i][8].ToString());
                if (!List[i].IsHidden)
                {
                    AL.Add(List[i]);
                }
            }
            ListShort = new Operatory[AL.Count];
            AL.CopyTo(ListShort);
        }
Пример #2
0
        ///<summary>Gets directly from the database.  Returns true if the last time clock entry for this employee was a clockin.</summary>
        public static bool IsClockedIn(int employeeNum)
        {
            string command = "SELECT ClockIn FROM clockevent WHERE EmployeeNum=" + POut.PInt(employeeNum)
                             + " ORDER BY TimeDisplayed DESC ";

            if (FormChooseDatabase.DBtype == DatabaseType.Oracle)
            {
                command = "SELECT * FROM (" + command + ") WHERE ROWNUM<=1";
            }
            else              //Assume MySQL
            {
                command += " LIMIT 1";
            }
            DataTable table = General.GetTable(command);

            if (table.Rows.Count == 0)         //if this employee has never clocked in or out.
            {
                return(false);
            }
            if (PIn.PBool(table.Rows[0][0].ToString()))            //if the last clockevent was a clockin
            {
                return(true);
            }
            return(false);
        }
Пример #3
0
        public static Employee[] ListShort;        //does not include hidden employees

        ///<summary></summary>
        public static void Refresh()
        {
            string    command = "SELECT * FROM employee ORDER BY IsHidden,FName,LName";
            DataTable table   = General.GetTable(command);

            ListLong = new Employee[table.Rows.Count];
            ArrayList tempList = new ArrayList();

            //Employee temp;
            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListLong[i]             = new Employee();
                ListLong[i].EmployeeNum = PIn.PInt(table.Rows[i][0].ToString());
                ListLong[i].LName       = PIn.PString(table.Rows[i][1].ToString());
                ListLong[i].FName       = PIn.PString(table.Rows[i][2].ToString());
                ListLong[i].MiddleI     = PIn.PString(table.Rows[i][3].ToString());
                ListLong[i].IsHidden    = PIn.PBool(table.Rows[i][4].ToString());
                ListLong[i].ClockStatus = PIn.PString(table.Rows[i][5].ToString());
                if (!ListLong[i].IsHidden)
                {
                    tempList.Add(ListLong[i]);
                }
            }
            ListShort = new Employee[tempList.Count];
            for (int i = 0; i < tempList.Count; i++)
            {
                ListShort[i] = (Employee)tempList[i];
            }
        }
Пример #4
0
        ///<summary></summary>
        public static void Refresh()
        {
            string command =
                "SELECT * from account "
                + " ORDER BY AcctType,Description";
            DataTable table = General.GetTable(command);

            listLong = new Account[table.Rows.Count];
            ArrayList AL = new ArrayList();

            for (int i = 0; i < listLong.Length; i++)
            {
                listLong[i]              = new Account();
                listLong[i].AccountNum   = PIn.PInt(table.Rows[i][0].ToString());
                listLong[i].Description  = PIn.PString(table.Rows[i][1].ToString());
                listLong[i].AcctType     = (AccountType)PIn.PInt(table.Rows[i][2].ToString());
                listLong[i].BankNumber   = PIn.PString(table.Rows[i][3].ToString());
                listLong[i].Inactive     = PIn.PBool(table.Rows[i][4].ToString());
                listLong[i].AccountColor = Color.FromArgb(PIn.PInt(table.Rows[i][5].ToString()));
                if (!listLong[i].Inactive)
                {
                    AL.Add(listLong[i].Copy());
                }
            }
            listShort = new Account[AL.Count];
            AL.CopyTo(listShort);
        }
Пример #5
0
        ///<summary>Carriers are not refreshed as local data, but are refreshed as needed. A full refresh is frequently triggered if a carrierNum cannot be found in the HList.  Important retrieval is done directly from the db.</summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            string    command = "SELECT * FROM carrier ORDER BY CarrierName";
            DataTable table   = General.GetTable(command);

            List = new Carrier[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]                    = new Carrier();
                List[i].CarrierNum         = PIn.PInt(table.Rows[i][0].ToString());
                List[i].CarrierName        = PIn.PString(table.Rows[i][1].ToString());
                List[i].Address            = PIn.PString(table.Rows[i][2].ToString());
                List[i].Address2           = PIn.PString(table.Rows[i][3].ToString());
                List[i].City               = PIn.PString(table.Rows[i][4].ToString());
                List[i].State              = PIn.PString(table.Rows[i][5].ToString());
                List[i].Zip                = PIn.PString(table.Rows[i][6].ToString());
                List[i].Phone              = PIn.PString(table.Rows[i][7].ToString());
                List[i].ElectID            = PIn.PString(table.Rows[i][8].ToString());
                List[i].NoSendElect        = PIn.PBool(table.Rows[i][9].ToString());
                List[i].IsCDA              = PIn.PBool(table.Rows[i][10].ToString());
                List[i].IsPMP              = PIn.PBool(table.Rows[i][11].ToString());
                List[i].CDAnetVersion      = PIn.PString(table.Rows[i][12].ToString());
                List[i].CanadianNetworkNum = PIn.PInt(table.Rows[i][13].ToString());
                HList.Add(List[i].CarrierNum, List[i]);
            }
        }
Пример #6
0
        ///<summary>Refreshes all referrals for all patients.  Need to rework at some point so less memory is consumed.  Also refreshes dynamically, so no need to invalidate local data.</summary>
        public static void Refresh()
        {
            string command =
                "SELECT * from referral "
                + "ORDER BY lname";
            DataTable table = General.GetTable(command);

            List  = new Referral[table.Rows.Count];
            HList = new Hashtable();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]             = new Referral();
                List[i].ReferralNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].LName       = PIn.PString(table.Rows[i][1].ToString());
                List[i].FName       = PIn.PString(table.Rows[i][2].ToString());
                List[i].MName       = PIn.PString(table.Rows[i][3].ToString());
                List[i].SSN         = PIn.PString(table.Rows[i][4].ToString());
                List[i].UsingTIN    = PIn.PBool(table.Rows[i][5].ToString());
                List[i].Specialty   = (DentalSpecialty)PIn.PInt(table.Rows[i][6].ToString());
                List[i].ST          = PIn.PString(table.Rows[i][7].ToString());
                List[i].Telephone   = PIn.PString(table.Rows[i][8].ToString());
                List[i].Address     = PIn.PString(table.Rows[i][9].ToString());
                List[i].Address2    = PIn.PString(table.Rows[i][10].ToString());
                List[i].City        = PIn.PString(table.Rows[i][11].ToString());
                List[i].Zip         = PIn.PString(table.Rows[i][12].ToString());
                List[i].Note        = PIn.PString(table.Rows[i][13].ToString());
                List[i].Phone2      = PIn.PString(table.Rows[i][14].ToString());
                List[i].IsHidden    = PIn.PBool(table.Rows[i][15].ToString());
                List[i].NotPerson   = PIn.PBool(table.Rows[i][16].ToString());
                List[i].Title       = PIn.PString(table.Rows[i][17].ToString());
                List[i].EMail       = PIn.PString(table.Rows[i][18].ToString());
                List[i].PatNum      = PIn.PInt(table.Rows[i][19].ToString());
                HList.Add(List[i].ReferralNum, List[i]);
            }
        }
Пример #7
0
        ///<summary>Fills ListShort and ListLong with all claimforms from the db. Also attaches corresponding claimformitems to each.</summary>
        public static void Refresh()
        {
            string command =
                "SELECT * FROM claimform";
            DataTable table = General.GetTable(command);

            ListLong = new ClaimForm[table.Rows.Count];
            ArrayList tempAL = new ArrayList();

            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListLong[i] = new ClaimForm();
                ListLong[i].ClaimFormNum = PIn.PInt(table.Rows[i][0].ToString());
                ListLong[i].Description  = PIn.PString(table.Rows[i][1].ToString());
                ListLong[i].IsHidden     = PIn.PBool(table.Rows[i][2].ToString());
                ListLong[i].FontName     = PIn.PString(table.Rows[i][3].ToString());
                ListLong[i].FontSize     = PIn.PFloat(table.Rows[i][4].ToString());
                ListLong[i].UniqueID     = PIn.PString(table.Rows[i][5].ToString());
                ListLong[i].PrintImages  = PIn.PBool(table.Rows[i][6].ToString());
                ListLong[i].OffsetX      = PIn.PInt(table.Rows[i][7].ToString());
                ListLong[i].OffsetY      = PIn.PInt(table.Rows[i][8].ToString());
                ListLong[i].Items        = ClaimFormItems.GetListForForm(ListLong[i].ClaimFormNum);
                if (!ListLong[i].IsHidden)
                {
                    tempAL.Add(ListLong[i]);
                }
            }
            ListShort = new ClaimForm[tempAL.Count];
            for (int i = 0; i < ListShort.Length; i++)
            {
                ListShort[i] = (ClaimForm)tempAL[i];
            }
        }
Пример #8
0
        ///<summary>Called from claimsend window.</summary>
        public static ClaimSendQueueItem[] GetQueueList()
        {
            string command =
                "SELECT claim.ClaimNum,carrier.NoSendElect"
                + ",CONCAT(CONCAT(CONCAT(concat(patient.LName,', '),patient.FName),' '),patient.MiddleI)"
                + ",claim.ClaimStatus,carrier.CarrierName,patient.PatNum,carrier.ElectID,insplan.IsMedical "
                + "FROM claim "
                + "Left join insplan on claim.PlanNum = insplan.PlanNum "
                + "Left join carrier on insplan.CarrierNum = carrier.CarrierNum "
                + "Left join patient on patient.PatNum = claim.PatNum "
                + "WHERE claim.ClaimStatus = 'W' OR claim.ClaimStatus = 'P' "
                + "ORDER BY insplan.IsMedical";               //this puts the medical claims at the end, helping with the looping in X12.
            //MessageBox.Show(string command);
            DataTable table = General.GetTable(command);

            ClaimSendQueueItem[] listQueue = new ClaimSendQueueItem[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                listQueue[i]                  = new ClaimSendQueueItem();
                listQueue[i].ClaimNum         = PIn.PInt(table.Rows[i][0].ToString());
                listQueue[i].NoSendElect      = PIn.PBool(table.Rows[i][1].ToString());
                listQueue[i].PatName          = PIn.PString(table.Rows[i][2].ToString());
                listQueue[i].ClaimStatus      = PIn.PString(table.Rows[i][3].ToString());
                listQueue[i].Carrier          = PIn.PString(table.Rows[i][4].ToString());
                listQueue[i].PatNum           = PIn.PInt(table.Rows[i][5].ToString());
                listQueue[i].ClearinghouseNum = Clearinghouses.GetNumForPayor(PIn.PString(table.Rows[i][6].ToString()));
                listQueue[i].IsMedical        = PIn.PBool(table.Rows[i][7].ToString());
            }
            return(listQueue);
        }
Пример #9
0
        ///<summary></summary>
        public static void Refresh()
        {
            string    command = "SELECT * from autocode";
            DataTable table   = General.GetTable(command);

            HList = new Hashtable();
            List  = new AutoCode[table.Rows.Count];
            ArrayList ALshort = new ArrayList();          //int of indexes of short list

            for (int i = 0; i < List.Length; i++)
            {
                List[i]               = new AutoCode();
                List[i].AutoCodeNum   = PIn.PInt(table.Rows[i][0].ToString());
                List[i].Description   = PIn.PString(table.Rows[i][1].ToString());
                List[i].IsHidden      = PIn.PBool(table.Rows[i][2].ToString());
                List[i].LessIntrusive = PIn.PBool(table.Rows[i][3].ToString());
                HList.Add(List[i].AutoCodeNum, List[i]);
                if (!List[i].IsHidden)
                {
                    ALshort.Add(i);
                }
            }
            ListShort = new AutoCode[ALshort.Count];
            for (int i = 0; i < ALshort.Count; i++)
            {
                ListShort[i] = List[(int)ALshort[i]];
            }
        }
Пример #10
0
        /*
         * ///<summary></summary>
         * public static Document[] GetAllWithPat(int patNum) {
         *      string command="SELECT * FROM document WHERE WithPat="+POut.PInt(patNum);
         *      return RefreshAndFill(command);
         * }*/

        public static Document Fill(DataRow document)
        {
            if (document == null)
            {
                return(null);
            }
            Document doc = new Document();

            doc.DocNum         = PIn.PInt(document[0].ToString());
            doc.Description    = PIn.PString(document[1].ToString());
            doc.DateCreated    = PIn.PDate(document[2].ToString());
            doc.DocCategory    = PIn.PInt(document[3].ToString());
            doc.WithPat        = PIn.PInt(document[4].ToString());
            doc.FileName       = PIn.PString(document[5].ToString());
            doc.ImgType        = (ImageType)PIn.PInt(document[6].ToString());
            doc.IsFlipped      = PIn.PBool(document[7].ToString());
            doc.DegreesRotated = PIn.PInt(document[8].ToString());
            doc.ToothNumbers   = PIn.PString(document[9].ToString());
            doc.Note           = PIn.PString(document[10].ToString());
            doc.SigIsTopaz     = PIn.PBool(document[11].ToString());
            doc.Signature      = PIn.PString(document[12].ToString());
            doc.CropX          = PIn.PInt(document[13].ToString());
            doc.CropY          = PIn.PInt(document[14].ToString());
            doc.CropW          = PIn.PInt(document[15].ToString());
            doc.CropH          = PIn.PInt(document[16].ToString());
            doc.WindowingMin   = PIn.PInt(document[17].ToString());
            doc.WindowingMax   = PIn.PInt(document[18].ToString());
            return(doc);
        }
Пример #11
0
        ///<summary></summary>
        public static void Refresh()
        {
            //MessageBox.Show("refreshing");
            HList = new Hashtable();
            Program tempProgram = new Program();
            string  command     =
                "SELECT * from program ORDER BY ProgDesc";
            DataTable table = General.GetTable(command);

            List = new Program[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                tempProgram             = new Program();
                tempProgram.ProgramNum  = PIn.PInt(table.Rows[i][0].ToString());
                tempProgram.ProgName    = PIn.PString(table.Rows[i][1].ToString());
                tempProgram.ProgDesc    = PIn.PString(table.Rows[i][2].ToString());
                tempProgram.Enabled     = PIn.PBool(table.Rows[i][3].ToString());
                tempProgram.Path        = PIn.PString(table.Rows[i][4].ToString());
                tempProgram.CommandLine = PIn.PString(table.Rows[i][5].ToString());
                tempProgram.Note        = PIn.PString(table.Rows[i][6].ToString());
                List[i] = tempProgram;
                if (!HList.ContainsKey(tempProgram.ProgName))
                {
                    HList.Add(tempProgram.ProgName, tempProgram);
                }
            }
            //MessageBox.Show(HList.Count.ToString());
        }
Пример #12
0
        ///<summary>Gets all recalls for the supplied patients, usually a family or single pat.  Result might have a length of zero.</summary>
        public static Recall[] GetList(int[] patNums)
        {
            string wherePats = "";

            for (int i = 0; i < patNums.Length; i++)
            {
                if (i != 0)
                {
                    wherePats += " OR ";
                }
                wherePats += "PatNum=" + patNums[i].ToString();
            }
            string command =
                "SELECT * from recall "
                + "WHERE " + wherePats;
            DataTable table = General.GetTable(command);

            Recall[] List = new Recall[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i]                = new Recall();
                List[i].RecallNum      = PIn.PInt(table.Rows[i][0].ToString());
                List[i].PatNum         = PIn.PInt(table.Rows[i][1].ToString());
                List[i].DateDueCalc    = PIn.PDate(table.Rows[i][2].ToString());
                List[i].DateDue        = PIn.PDate(table.Rows[i][3].ToString());
                List[i].DatePrevious   = PIn.PDate(table.Rows[i][4].ToString());
                List[i].RecallInterval = new Interval(PIn.PInt(table.Rows[i][5].ToString()));
                List[i].RecallStatus   = PIn.PInt(table.Rows[i][6].ToString());
                List[i].Note           = PIn.PString(table.Rows[i][7].ToString());
                List[i].IsDisabled     = PIn.PBool(table.Rows[i][8].ToString());
            }
            return(List);
        }
Пример #13
0
        ///<summary>Fills the specified array of Appointments using the supplied SQL command.</summary>
        private static Appointment[] FillList(string command)
        {
            DataTable table = General.GetTable(command);

            Appointment[] list = new Appointment[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                list[i]                 = new Appointment();
                list[i].AptNum          = PIn.PInt(table.Rows[i][0].ToString());
                list[i].PatNum          = PIn.PInt(table.Rows[i][1].ToString());
                list[i].AptStatus       = (ApptStatus)PIn.PInt(table.Rows[i][2].ToString());
                list[i].Pattern         = PIn.PString(table.Rows[i][3].ToString());
                list[i].Confirmed       = PIn.PInt(table.Rows[i][4].ToString());
                list[i].AddTime         = PIn.PInt(table.Rows[i][5].ToString());
                list[i].Op              = PIn.PInt(table.Rows[i][6].ToString());
                list[i].Note            = PIn.PString(table.Rows[i][7].ToString());
                list[i].ProvNum         = PIn.PInt(table.Rows[i][8].ToString());
                list[i].ProvHyg         = PIn.PInt(table.Rows[i][9].ToString());
                list[i].AptDateTime     = PIn.PDateT(table.Rows[i][10].ToString());
                list[i].NextAptNum      = PIn.PInt(table.Rows[i][11].ToString());
                list[i].UnschedStatus   = PIn.PInt(table.Rows[i][12].ToString());
                list[i].Lab             = (LabCase)PIn.PInt(table.Rows[i][13].ToString());
                list[i].IsNewPatient    = PIn.PBool(table.Rows[i][14].ToString());
                list[i].ProcDescript    = PIn.PString(table.Rows[i][15].ToString());
                list[i].Assistant       = PIn.PInt(table.Rows[i][16].ToString());
                list[i].InstructorNum   = PIn.PInt(table.Rows[i][17].ToString());
                list[i].SchoolClassNum  = PIn.PInt(table.Rows[i][18].ToString());
                list[i].SchoolCourseNum = PIn.PInt(table.Rows[i][19].ToString());
                list[i].GradePoint      = PIn.PFloat(table.Rows[i][20].ToString());
                list[i].ClinicNum       = PIn.PInt(table.Rows[i][21].ToString());
                list[i].IsHygiene       = PIn.PBool(table.Rows[i][22].ToString());
            }
            return(list);
        }
Пример #14
0
        ///<summary>Refreshed automatically to always be kept current with all phrases, regardless of whether there are any entries in LanguageForeign table.</summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            if (CultureInfo.CurrentCulture.Name == "en-US")
            {
                return;
            }
            string    command = "SELECT * from language";
            DataTable table   = General.GetTable(command);

            List = new Language[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new Language();
                //List[i].EnglishCommentsOld= PIn.PString(table.Rows[i][0].ToString());
                List[i].ClassType  = PIn.PString(table.Rows[i][1].ToString());
                List[i].English    = PIn.PString(table.Rows[i][2].ToString());
                List[i].IsObsolete = PIn.PBool(table.Rows[i][3].ToString());
                if (!HList.ContainsKey(List[i].ClassType + List[i].English))
                {
                    HList.Add(List[i].ClassType + List[i].English, List[i]);
                }
            }
            //MessageBox.Show(List.Length.ToString());
        }
Пример #15
0
        ///<summary>Surround with try/catch.</summary>
        public static void Update(Carrier Cur)
        {
            string    command;
            DataTable table;

            if (CultureInfo.CurrentCulture.Name.Substring(3) == "CA")           //en-CA or fr-CA
            {
                if (Cur.IsCDA)
                {
                    if (Cur.ElectID == "")
                    {
                        throw new ApplicationException(Lan.g("Carriers", "EDI Code required."));
                    }
                    if (!Regex.IsMatch(Cur.ElectID, "^[0-9]{6}$"))
                    {
                        throw new ApplicationException(Lan.g("Carriers", "EDI Code must be exactly 6 numbers."));
                    }
                    command = "SELECT CarrierNum FROM carrier WHERE "
                              + "ElectID = '" + POut.PString(Cur.ElectID) + "' "
                              + "AND IsCDA=1 "
                              + "AND CarrierNum != " + POut.PInt(Cur.CarrierNum);
                    table = General.GetTable(command);
                    if (table.Rows.Count > 0)                   //if there already exists a Canadian carrier with that ElectID
                    {
                        throw new ApplicationException(Lan.g("Carriers", "EDI Code already in use."));
                    }
                }
                //so the edited carrier looks good, but now we need to make sure that the original was allowed to be changed.
                command = "SELECT ElectID,IsCDA FROM carrier WHERE CarrierNum = '" + POut.PInt(Cur.CarrierNum) + "'";
                table   = General.GetTable(command);
                if (PIn.PBool(table.Rows[0][1].ToString()) &&            //if original carrier IsCDA
                    PIn.PString(table.Rows[0][0].ToString()) != Cur.ElectID)                      //and the ElectID was changed
                {
                    command = "SELECT COUNT(*) FROM etrans WHERE CarrierNum= " + POut.PInt(Cur.CarrierNum)
                              + " OR CarrierNum2=" + POut.PInt(Cur.CarrierNum);
                    if (General.GetCount(command) != "0")
                    {
                        throw new ApplicationException(Lan.g("Carriers", "Not allowed to change EDI Code because it's in use in the claim history."));
                    }
                }
            }
            command = "UPDATE carrier SET "
                      + "CarrierName= '" + POut.PString(Cur.CarrierName) + "' "
                      + ",Address= '" + POut.PString(Cur.Address) + "' "
                      + ",Address2= '" + POut.PString(Cur.Address2) + "' "
                      + ",City= '" + POut.PString(Cur.City) + "' "
                      + ",State= '" + POut.PString(Cur.State) + "' "
                      + ",Zip= '" + POut.PString(Cur.Zip) + "' "
                      + ",Phone= '" + POut.PString(Cur.Phone) + "' "
                      + ",ElectID= '" + POut.PString(Cur.ElectID) + "' "
                      + ",NoSendElect= '" + POut.PBool(Cur.NoSendElect) + "' "
                      + ",IsCDA= '" + POut.PBool(Cur.IsCDA) + "' "
                      + ",IsPMP= '" + POut.PBool(Cur.IsPMP) + "' "
                      + ",CDAnetVersion= '" + POut.PString(Cur.CDAnetVersion) + "' "
                      + ",CanadianNetworkNum= '" + POut.PInt(Cur.CanadianNetworkNum) + "' "
                      + "WHERE CarrierNum = '" + POut.PInt(Cur.CarrierNum) + "'";
            //MessageBox.Show(string command);
            General.NonQ(command);
        }
Пример #16
0
        ///<summary>Used to get a list of carriers to display in the FormCarriers window.  Only used for Canadian right now.</summary>
        public static DataTable Refresh(bool isCanadian)
        {
            DataTable tableRaw;
            DataTable tableReturn;
            string    command;

            if (isCanadian)
            {
                command = "SELECT CarrierNum, CarrierName, ElectID, IsPMP, canadiannetwork.Abbrev, CDAnetVersion FROM carrier "
                          + "LEFT JOIN canadiannetwork ON canadiannetwork.CanadianNetworkNum=carrier.CanadianNetworkNum "
                          + "WHERE IsCDA=1 ORDER BY CarrierName";
                tableRaw    = General.GetTable(command);
                tableReturn = new DataTable();
                tableReturn.Columns.Add("CarrierNum");
                tableReturn.Columns.Add("CarrierName");
                tableReturn.Columns.Add("ElectID");
                tableReturn.Columns.Add("PMP");
                tableReturn.Columns.Add("Network");
                tableReturn.Columns.Add("Version");
                tableReturn.Columns.Add("Trans02");
                tableReturn.Columns.Add("Trans03");
                tableReturn.Columns.Add("Trans04");
                tableReturn.Columns.Add("Trans05");
                tableReturn.Columns.Add("Trans06");
                tableReturn.Columns.Add("Trans07");
                tableReturn.Columns.Add("Trans08");
                DataRow row;
                for (int i = 0; i < tableRaw.Rows.Count; i++)
                {
                    row = tableReturn.NewRow();
                    row["CarrierNum"]  = tableRaw.Rows[i]["CarrierNum"].ToString();
                    row["CarrierName"] = tableRaw.Rows[i]["CarrierName"].ToString();
                    row["ElectID"]     = tableRaw.Rows[i]["ElectID"].ToString();
                    if (PIn.PBool(tableRaw.Rows[i]["IsPMP"].ToString()))
                    {
                        row["PMP"] = "X";
                    }
                    else
                    {
                        row["PMP"] = "";
                    }
                    row["Network"] = tableRaw.Rows[i]["Abbrev"].ToString();
                    row["Version"] = tableRaw.Rows[i]["CDAnetVersion"].ToString();
                    row["Trans02"] = "X";
                    row["Trans03"] = "X";
                    row["Trans04"] = "X";
                    row["Trans05"] = "X";
                    row["Trans06"] = "X";
                    row["Trans07"] = "X";
                    row["Trans08"] = "X";
                    tableReturn.Rows.Add(row);
                }
                return(tableReturn);
            }
            return(null);
        }
Пример #17
0
		///<summary>Fills List with all AppointmentRules.</summary>
		public static void Refresh() {
			string command="SELECT * FROM appointmentrule";
			DataTable table=General.GetTable(command);
			List=new AppointmentRule[table.Rows.Count];
			for(int i=0;i<table.Rows.Count;i++) {
				List[i]=new AppointmentRule();
				List[i].AppointmentRuleNum = PIn.PInt(table.Rows[i][0].ToString());
				List[i].RuleDesc           = PIn.PString(table.Rows[i][1].ToString());
				List[i].ADACodeStart       = PIn.PString(table.Rows[i][2].ToString());
				List[i].ADACodeEnd         = PIn.PString(table.Rows[i][3].ToString());
				List[i].IsEnabled          = PIn.PBool(table.Rows[i][4].ToString());
			}
		}
Пример #18
0
        ///<summary></summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            ProcedureCode tempCode = new ProcedureCode();
            string        command  = "SELECT * FROM procedurecode ORDER BY ProcCat,ProcCode";
            DataTable     table    = General.GetTable(command);

            tableStat = table.Copy();
            RecallAL  = new ArrayList();
            List      = new ProcedureCode[tableStat.Rows.Count];
            for (int i = 0; i < tableStat.Rows.Count; i++)
            {
                tempCode           = new ProcedureCode();
                tempCode.CodeNum   = PIn.PInt(tableStat.Rows[i][0].ToString());
                tempCode.ProcCode  = PIn.PString(tableStat.Rows[i][1].ToString());
                tempCode.Descript  = PIn.PString(tableStat.Rows[i][2].ToString());
                tempCode.AbbrDesc  = PIn.PString(tableStat.Rows[i][3].ToString());
                tempCode.ProcTime  = PIn.PString(tableStat.Rows[i][4].ToString());
                tempCode.ProcCat   = PIn.PInt(tableStat.Rows[i][5].ToString());
                tempCode.TreatArea = (TreatmentArea)PIn.PInt(tableStat.Rows[i][6].ToString());
                //tempCode.RemoveTooth   =PIn.PBool  (tableStat.Rows[i][7].ToString());
                tempCode.SetRecall        = PIn.PBool(tableStat.Rows[i][8].ToString());
                tempCode.NoBillIns        = PIn.PBool(tableStat.Rows[i][9].ToString());
                tempCode.IsProsth         = PIn.PBool(tableStat.Rows[i][10].ToString());
                tempCode.DefaultNote      = PIn.PString(tableStat.Rows[i][11].ToString());
                tempCode.IsHygiene        = PIn.PBool(tableStat.Rows[i][12].ToString());
                tempCode.GTypeNum         = PIn.PInt(tableStat.Rows[i][13].ToString());
                tempCode.AlternateCode1   = PIn.PString(tableStat.Rows[i][14].ToString());
                tempCode.MedicalCode      = PIn.PString(tableStat.Rows[i][15].ToString());
                tempCode.IsTaxed          = PIn.PBool(tableStat.Rows[i][16].ToString());
                tempCode.PaintType        = (ToothPaintingType)PIn.PInt(tableStat.Rows[i][17].ToString());
                tempCode.GraphicColor     = Color.FromArgb(PIn.PInt(tableStat.Rows[i][18].ToString()));
                tempCode.LaymanTerm       = PIn.PString(tableStat.Rows[i][19].ToString());
                tempCode.IsCanadianLab    = PIn.PBool(tableStat.Rows[i][20].ToString());
                tempCode.PreExisting      = PIn.PBool(tableStat.Rows[i][21].ToString());
                tempCode.BaseUnits        = PIn.PInt(tableStat.Rows[i][22].ToString());
                tempCode.SubstitutionCode = PIn.PString(tableStat.Rows[i][23].ToString());
                //tempCode.SubstOnlyIf   =(SubstitutionCondition)PIn.PInt(tableStat.Rows[i][24].ToString());
                try {
                    HList.Add(tempCode.ProcCode, tempCode.Copy());
                }
                catch {
                }
                List[i] = tempCode.Copy();
                if (tempCode.SetRecall)
                {
                    RecallAL.Add(tempCode);
                }
            }
        }
Пример #19
0
        ///<summary>Returns the computer preferences for the computer which this instance of Open Dental is running on.</summary>
        public static ComputerPref GetForLocalComputer()
        {
            string       computerName = Dns.GetHostName();    //local computer name
            string       command      = "SELECT * FROM computerpref WHERE ComputerName='" + POut.PString(computerName) + "'";
            DataTable    table;
            ComputerPref computerPref = new ComputerPref();

            //OpenGL tooth chart not supported on Unix systems.
            if (Environment.OSVersion.Platform == PlatformID.Unix)
            {
                computerPref.GraphicsSimple = true;
            }
            //Default sensor values to start
            computerPref.SensorType     = "D";
            computerPref.SensorPort     = 0;
            computerPref.SensorExposure = 1;
            computerPref.SensorBinned   = false;
            try{
                table = General.GetTableEx(command);
            }catch {
                //In case of database error, just use default graphics settings so that it is possible for the program to start.
                return(computerPref);
            }
            if (table.Rows.Count == 0)          //Computer prefs do not exist yet.
            {
                computerPref.ComputerName = computerName;
                Insert(computerPref);                //Create default prefs for the specified computer. Also sets primary key in our computerPref object.
                return(computerPref);
            }
            if (table.Rows.Count > 1)
            {
                //Should never happen (would only happen if the primary key showed up more than once).
                Logger.openlog.LogMB("Corrupt computerpref table in database. The computer name '"
                                     + POut.PString(computerName) + "' is a primary key in multiple records. Please run the "
                                     + "database maintenance tool, then call us for help if you still get this message.",
                                     Logger.Severity.WARNING);
            }
            computerPref.ComputerPrefNum         = PIn.PInt(table.Rows[0][0].ToString());
            computerPref.ComputerName            = PIn.PString(table.Rows[0][1].ToString());
            computerPref.GraphicsUseHardware     = PIn.PBool(table.Rows[0][2].ToString());
            computerPref.GraphicsSimple          = PIn.PBool(table.Rows[0][3].ToString());
            computerPref.SensorType              = PIn.PString(table.Rows[0][4].ToString());
            computerPref.SensorBinned            = PIn.PBool(table.Rows[0][5].ToString());
            computerPref.SensorPort              = PIn.PInt(table.Rows[0][6].ToString());
            computerPref.SensorExposure          = PIn.PInt(table.Rows[0][7].ToString());
            computerPref.GraphicsDoubleBuffering = PIn.PBool(table.Rows[0][8].ToString());
            computerPref.PreferredPixelFormatNum = PIn.PInt(table.Rows[0][9].ToString());
            return(computerPref);
        }
Пример #20
0
        private static Printer[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTable(command);

            Printer[] pList = new Printer[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                pList[i]               = new Printer();
                pList[i].PrinterNum    = PIn.PInt(table.Rows[i][0].ToString());
                pList[i].ComputerNum   = PIn.PInt(table.Rows[i][1].ToString());
                pList[i].PrintSit      = (PrintSituation)PIn.PInt(table.Rows[i][2].ToString());
                pList[i].PrinterName   = PIn.PString(table.Rows[i][3].ToString());
                pList[i].DisplayPrompt = PIn.PBool(table.Rows[i][4].ToString());
            }
            return(pList);
        }
Пример #21
0
        private static Reconcile[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTable(command);

            Reconcile[] List = new Reconcile[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i] = new Reconcile();
                List[i].ReconcileNum  = PIn.PInt(table.Rows[i][0].ToString());
                List[i].AccountNum    = PIn.PInt(table.Rows[i][1].ToString());
                List[i].StartingBal   = PIn.PDouble(table.Rows[i][2].ToString());
                List[i].EndingBal     = PIn.PDouble(table.Rows[i][3].ToString());
                List[i].DateReconcile = PIn.PDate(table.Rows[i][4].ToString());
                List[i].IsLocked      = PIn.PBool(table.Rows[i][5].ToString());
            }
            return(List);
        }
Пример #22
0
        ///<summary>Only used in translation tool to get list for one category</summary>
        public static Language[] GetListForCat(string classType)
        {
            string command = "SELECT * FROM language "
                             + "WHERE ClassType = BINARY '" + POut.PString(classType) + "' ORDER BY English";
            DataTable table = General.GetTable(command);

            Language[] ListForCat = new Language[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListForCat[i] = new Language();
                //ListForCat[i].EnglishComments= PIn.PString(table.Rows[i][0].ToString());
                ListForCat[i].ClassType  = PIn.PString(table.Rows[i][1].ToString());
                ListForCat[i].English    = PIn.PString(table.Rows[i][2].ToString());
                ListForCat[i].IsObsolete = PIn.PBool(table.Rows[i][3].ToString());
            }
            return(ListForCat);
        }
Пример #23
0
        ///<summary>Since users not allowed to edit, this only gets run on startup.</summary>
        public static void Refresh()
        {
            string command = "SELECT * from electid "
                             + "ORDER BY CarrierName";
            DataTable table = General.GetTable(command);

            List = new ElectID[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]               = new ElectID();
                List[i].ElectIDNum    = PIn.PInt(table.Rows[i][0].ToString());
                List[i].PayorID       = PIn.PString(table.Rows[i][1].ToString());
                List[i].CarrierName   = PIn.PString(table.Rows[i][2].ToString());
                List[i].IsMedicaid    = PIn.PBool(table.Rows[i][3].ToString());
                List[i].ProviderTypes = PIn.PString(table.Rows[i][4].ToString());
                List[i].Comments      = PIn.PString(table.Rows[i][5].ToString());
            }
        }
Пример #24
0
        ///<summary></summary>
        public static ClaimProc[] Refresh(int patNum)
        {
            string command =
                "SELECT * from claimproc "
                + "WHERE PatNum = '" + patNum.ToString() + "' ORDER BY LineNumber";
            DataTable table = General.GetTable(command);

            ClaimProc[] List = new ClaimProc[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i] = new ClaimProc();
                List[i].ClaimProcNum    = PIn.PInt(table.Rows[i][0].ToString());
                List[i].ProcNum         = PIn.PInt(table.Rows[i][1].ToString());
                List[i].ClaimNum        = PIn.PInt(table.Rows[i][2].ToString());
                List[i].PatNum          = PIn.PInt(table.Rows[i][3].ToString());
                List[i].ProvNum         = PIn.PInt(table.Rows[i][4].ToString());
                List[i].FeeBilled       = PIn.PDouble(table.Rows[i][5].ToString());
                List[i].InsPayEst       = PIn.PDouble(table.Rows[i][6].ToString());
                List[i].DedApplied      = PIn.PDouble(table.Rows[i][7].ToString());
                List[i].Status          = (ClaimProcStatus)PIn.PInt(table.Rows[i][8].ToString());
                List[i].InsPayAmt       = PIn.PDouble(table.Rows[i][9].ToString());
                List[i].Remarks         = PIn.PString(table.Rows[i][10].ToString());
                List[i].ClaimPaymentNum = PIn.PInt(table.Rows[i][11].ToString());
                List[i].PlanNum         = PIn.PInt(table.Rows[i][12].ToString());
                List[i].DateCP          = PIn.PDate(table.Rows[i][13].ToString());
                List[i].WriteOff        = PIn.PDouble(table.Rows[i][14].ToString());
                List[i].CodeSent        = PIn.PString(table.Rows[i][15].ToString());
                List[i].AllowedAmt      = PIn.PDouble(table.Rows[i][16].ToString());
                List[i].Percentage      = PIn.PInt(table.Rows[i][17].ToString());
                List[i].PercentOverride = PIn.PInt(table.Rows[i][18].ToString());
                List[i].CopayAmt        = PIn.PDouble(table.Rows[i][19].ToString());
                List[i].OverrideInsEst  = PIn.PDouble(table.Rows[i][20].ToString());
                List[i].NoBillIns       = PIn.PBool(table.Rows[i][21].ToString());
                List[i].DedBeforePerc   = PIn.PBool(table.Rows[i][22].ToString());
                List[i].OverAnnualMax   = PIn.PDouble(table.Rows[i][23].ToString());
                List[i].PaidOtherIns    = PIn.PDouble(table.Rows[i][24].ToString());
                List[i].BaseEst         = PIn.PDouble(table.Rows[i][25].ToString());
                List[i].CopayOverride   = PIn.PDouble(table.Rows[i][26].ToString());
                List[i].ProcDate        = PIn.PDate(table.Rows[i][27].ToString());
                List[i].DateEntry       = PIn.PDate(table.Rows[i][28].ToString());
                List[i].LineNumber      = PIn.PInt(table.Rows[i][29].ToString());
            }
            return(List);
        }
Пример #25
0
        ///<summary></summary>
        public static void Refresh()
        {
            string command =
                "SELECT * FROM clearinghouse";
            DataTable table = General.GetTable(command);

            list  = new Clearinghouse[table.Rows.Count];
            HList = new Hashtable();
            string[] payors;
            for (int i = 0; i < table.Rows.Count; i++)
            {
                list[i] = new Clearinghouse();
                list[i].ClearinghouseNum = PIn.PInt(table.Rows[i][0].ToString());
                list[i].Description      = PIn.PString(table.Rows[i][1].ToString());
                list[i].ExportPath       = PIn.PString(table.Rows[i][2].ToString());
                list[i].IsDefault        = PIn.PBool(table.Rows[i][3].ToString());
                list[i].Payors           = PIn.PString(table.Rows[i][4].ToString());
                list[i].Eformat          = (ElectronicClaimFormat)PIn.PInt(table.Rows[i][5].ToString());
                list[i].ISA05            = PIn.PString(table.Rows[i][6].ToString());
                list[i].SenderTIN        = PIn.PString(table.Rows[i][7].ToString());
                list[i].ISA07            = PIn.PString(table.Rows[i][8].ToString());
                list[i].ISA08            = PIn.PString(table.Rows[i][9].ToString());
                list[i].ISA15            = PIn.PString(table.Rows[i][10].ToString());
                list[i].Password         = PIn.PString(table.Rows[i][11].ToString());
                list[i].ResponsePath     = PIn.PString(table.Rows[i][12].ToString());
                list[i].CommBridge       = (EclaimsCommBridge)PIn.PInt(table.Rows[i][13].ToString());
                list[i].ClientProgram    = PIn.PString(table.Rows[i][14].ToString());
                //15: LastBatchNumber
                list[i].ModemPort       = PIn.PInt(table.Rows[i][16].ToString());
                list[i].LoginID         = PIn.PString(table.Rows[i][17].ToString());
                list[i].SenderName      = PIn.PString(table.Rows[i][18].ToString());
                list[i].SenderTelephone = PIn.PString(table.Rows[i][19].ToString());
                list[i].GS03            = PIn.PString(table.Rows[i][20].ToString());
                payors = list[i].Payors.Split(',');
                for (int j = 0; j < payors.Length; j++)
                {
                    if (!HList.ContainsKey(payors[j]))
                    {
                        HList.Add(payors[j], list[i].ClearinghouseNum);
                    }
                }
            }
        }
Пример #26
0
        private static Commlog[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTable(command);

            Commlog[] List = new Commlog[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i]                 = new Commlog();
                List[i].CommlogNum      = PIn.PInt(table.Rows[i][0].ToString());
                List[i].PatNum          = PIn.PInt(table.Rows[i][1].ToString());
                List[i].CommDateTime    = PIn.PDate(table.Rows[i][2].ToString());
                List[i].CommType        = PIn.PInt(table.Rows[i][3].ToString());
                List[i].Note            = PIn.PString(table.Rows[i][4].ToString());
                List[i].Mode_           = (CommItemMode)PIn.PInt(table.Rows[i][5].ToString());
                List[i].SentOrReceived  = (CommSentOrReceived)PIn.PInt(table.Rows[i][6].ToString());
                List[i].IsStatementSent = PIn.PBool(table.Rows[i][7].ToString());
            }
            return(List);
        }
Пример #27
0
        /*
         * ///<summary></summary>
         * public static Document[] GetAllWithPat(int patNum) {
         *      string command="SELECT * FROM document WHERE WithPat="+POut.PInt(patNum);
         *      return RefreshAndFill(command);
         * }*/

        private static Document[] RefreshAndFill(string command)
        {
            DataSet ds = null;

            try {
                if (RemotingClient.OpenDentBusinessIsLocal)
                {
                    ds = GeneralB.GetTable(command);
                }
                else
                {
                    DtoGeneralGetTable dto = new DtoGeneralGetTable();
                    dto.Command = command;
                    ds          = RemotingClient.ProcessQuery(dto);
                }
            }
            catch (Exception e) {
                MessageBox.Show(e.Message);
            }
            DataTable table = ds.Tables[0];

            Document[] List = new Document[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]                = new Document();
                List[i].DocNum         = PIn.PInt(table.Rows[i][0].ToString());
                List[i].Description    = PIn.PString(table.Rows[i][1].ToString());
                List[i].DateCreated    = PIn.PDate(table.Rows[i][2].ToString());
                List[i].DocCategory    = PIn.PInt(table.Rows[i][3].ToString());
                List[i].WithPat        = PIn.PInt(table.Rows[i][4].ToString());
                List[i].FileName       = PIn.PString(table.Rows[i][5].ToString());
                List[i].ImgType        = (ImageType)PIn.PInt(table.Rows[i][6].ToString());
                List[i].IsFlipped      = PIn.PBool(table.Rows[i][7].ToString());
                List[i].DegreesRotated = PIn.PInt(table.Rows[i][8].ToString());
                List[i].ToothNumbers   = PIn.PString(table.Rows[i][9].ToString());
                List[i].Note           = PIn.PString(table.Rows[i][10].ToString());
                List[i].SigIsTopaz     = PIn.PBool(table.Rows[i][11].ToString());
                List[i].Signature      = PIn.PString(table.Rows[i][12].ToString());
            }
            return(List);
        }
Пример #28
0
        //<summary>This should be eliminated when time.  It's just used in FormProviderSelect to keep track of which provider is highlighted.</summary>
        //public static int Selected;

        ///<summary>Refreshes List with all providers.</summary>
        public static void Refresh()
        {
            ArrayList AL      = new ArrayList();
            string    command = "SELECT * FROM provider ORDER BY ItemOrder";
            DataTable table   = General.GetTable(command);

            ListLong = new Provider[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListLong[i]              = new Provider();
                ListLong[i].ProvNum      = PIn.PInt(table.Rows[i][0].ToString());
                ListLong[i].Abbr         = PIn.PString(table.Rows[i][1].ToString());
                ListLong[i].ItemOrder    = PIn.PInt(table.Rows[i][2].ToString());
                ListLong[i].LName        = PIn.PString(table.Rows[i][3].ToString());
                ListLong[i].FName        = PIn.PString(table.Rows[i][4].ToString());
                ListLong[i].MI           = PIn.PString(table.Rows[i][5].ToString());
                ListLong[i].Suffix       = PIn.PString(table.Rows[i][6].ToString());
                ListLong[i].FeeSched     = PIn.PInt(table.Rows[i][7].ToString());
                ListLong[i].Specialty    = (DentalSpecialty)PIn.PInt(table.Rows[i][8].ToString());
                ListLong[i].SSN          = PIn.PString(table.Rows[i][9].ToString());
                ListLong[i].StateLicense = PIn.PString(table.Rows[i][10].ToString());
                ListLong[i].DEANum       = PIn.PString(table.Rows[i][11].ToString());
                ListLong[i].IsSecondary  = PIn.PBool(table.Rows[i][12].ToString());
                ListLong[i].ProvColor    = Color.FromArgb(PIn.PInt(table.Rows[i][13].ToString()));
                ListLong[i].IsHidden     = PIn.PBool(table.Rows[i][14].ToString());
                ListLong[i].UsingTIN     = PIn.PBool(table.Rows[i][15].ToString());
                //ListLong[i].BlueCrossID = PIn.PString(table.Rows[i][16].ToString());
                ListLong[i].SigOnFile         = PIn.PBool(table.Rows[i][17].ToString());
                ListLong[i].MedicaidID        = PIn.PString(table.Rows[i][18].ToString());
                ListLong[i].OutlineColor      = Color.FromArgb(PIn.PInt(table.Rows[i][19].ToString()));
                ListLong[i].SchoolClassNum    = PIn.PInt(table.Rows[i][20].ToString());
                ListLong[i].NationalProvID    = PIn.PString(table.Rows[i][21].ToString());
                ListLong[i].CanadianOfficeNum = PIn.PString(table.Rows[i][22].ToString());
                if (!ListLong[i].IsHidden)
                {
                    AL.Add(ListLong[i]);
                }
            }
            List = new Provider[AL.Count];
            AL.CopyTo(List);
        }
Пример #29
0
        ///<summary>Gets a list of all MountDefs when program first opens.  Also refreshes MountItemDefs and attaches all items to the appropriate mounts.</summary>
        public static void Refresh()
        {
            MountItemDefs.Refresh();
            string    command = "SELECT * FROM mountdef ORDER BY ItemOrder";
            DataTable table   = General.GetTable(command);

            Listt = new List <MountDef>();
            MountDef mount;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mount              = new MountDef();
                mount.MountDefNum  = PIn.PInt(table.Rows[i][0].ToString());
                mount.Description  = PIn.PString(table.Rows[i][1].ToString());
                mount.ItemOrder    = PIn.PInt(table.Rows[i][2].ToString());
                mount.IsRadiograph = PIn.PBool(table.Rows[i][3].ToString());
                mount.Width        = PIn.PInt(table.Rows[i][4].ToString());
                mount.Height       = PIn.PInt(table.Rows[i][5].ToString());
                Listt.Add(mount);
            }
        }
Пример #30
0
        ///<summary>For one patient</summary>
        public static RefAttach[] Refresh(int patNum)
        {
            string command =
                "SELECT * FROM refattach"
                + " WHERE patnum = " + patNum.ToString()
                + " ORDER BY itemorder";
            DataTable table = General.GetTable(command);

            RefAttach[] List = new RefAttach[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new RefAttach();
                List[i].RefAttachNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].ReferralNum  = PIn.PInt(table.Rows[i][1].ToString());
                List[i].PatNum       = PIn.PInt(table.Rows[i][2].ToString());
                List[i].ItemOrder    = PIn.PInt(table.Rows[i][3].ToString());
                List[i].RefDate      = PIn.PDate(table.Rows[i][4].ToString());
                List[i].IsFrom       = PIn.PBool(table.Rows[i][5].ToString());
            }
            return(List);
        }