Esempio n. 1
0
        ///<summary>Inserts one MapArea into the database.  Provides option to use the existing priKey.</summary>
        public static long Insert(MapArea mapArea, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                mapArea.MapAreaNum = ReplicationServers.GetKey("maparea", "MapAreaNum");
            }
            string command = "INSERT INTO maparea (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "MapAreaNum,";
            }
            command += "Extension,XPos,YPos,Width,Height,Description,ItemType,MapAreaContainerNum) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(mapArea.MapAreaNum) + ",";
            }
            command +=
                POut.Int(mapArea.Extension) + ","
                + "'" + POut.Double(mapArea.XPos) + "',"
                + "'" + POut.Double(mapArea.YPos) + "',"
                + "'" + POut.Double(mapArea.Width) + "',"
                + "'" + POut.Double(mapArea.Height) + "',"
                + "'" + POut.String(mapArea.Description) + "',"
                + POut.Int((int)mapArea.ItemType) + ","
                + POut.Long(mapArea.MapAreaContainerNum) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                mapArea.MapAreaNum = Db.NonQ(command, true, "MapAreaNum", "mapArea");
            }
            return(mapArea.MapAreaNum);
        }
Esempio n. 2
0
        ///<summary>Updates one Icd10 in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(Icd10 icd10, Icd10 oldIcd10)
        {
            string command = "";

            if (icd10.Icd10Code != oldIcd10.Icd10Code)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Icd10Code = '" + POut.String(icd10.Icd10Code) + "'";
            }
            if (icd10.Description != oldIcd10.Description)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Description = '" + POut.String(icd10.Description) + "'";
            }
            if (icd10.IsCode != oldIcd10.IsCode)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsCode = '" + POut.String(icd10.IsCode) + "'";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE icd10 SET " + command
                      + " WHERE Icd10Num = " + POut.Long(icd10.Icd10Num);
            Db.NonQ(command);
        }
Esempio n. 3
0
        ///<summary>Inserts one ToothGridCol into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(ToothGridCol toothGridCol, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO toothgridcol (";

            if (!useExistingPK && isRandomKeys)
            {
                toothGridCol.ToothGridColNum = ReplicationServers.GetKeyNoCache("toothgridcol", "ToothGridColNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ToothGridColNum,";
            }
            command += "SheetFieldNum,NameItem,CellType,ItemOrder,ColumnWidth,CodeNum,ProcStatus) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(toothGridCol.ToothGridColNum) + ",";
            }
            command +=
                POut.Long(toothGridCol.SheetFieldNum) + ","
                + "'" + POut.String(toothGridCol.NameItem) + "',"
                + POut.Int((int)toothGridCol.CellType) + ","
                + POut.Int(toothGridCol.ItemOrder) + ","
                + POut.Int(toothGridCol.ColumnWidth) + ","
                + POut.Long(toothGridCol.CodeNum) + ","
                + POut.Int((int)toothGridCol.ProcStatus) + ")";
            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                toothGridCol.ToothGridColNum = Db.NonQ(command, true, "ToothGridColNum", "toothGridCol");
            }
            return(toothGridCol.ToothGridColNum);
        }
Esempio n. 4
0
        ///<summary>Updates one SecurityLog in the database.</summary>
        public static void Update(SecurityLog securityLog)
        {
            string command = "UPDATE securitylog SET "
                             + "PermType      =  " + POut.Int((int)securityLog.PermType) + ", "
                             + "UserNum       =  " + POut.Long(securityLog.UserNum) + ", "
                             //LogDateTime not allowed to change
                             + "LogText       =  " + DbHelper.ParamChar + "paramLogText, "
                             + "PatNum        =  " + POut.Long(securityLog.PatNum) + ", "
                             + "CompName      = '" + POut.String(securityLog.CompName) + "', "
                             + "FKey          =  " + POut.Long(securityLog.FKey) + ", "
                             + "LogSource     =  " + POut.Int((int)securityLog.LogSource) + ", "
                             + "DefNum        =  " + POut.Long(securityLog.DefNum) + ", "
                             + "DefNumError   =  " + POut.Long(securityLog.DefNumError) + ", "
                             + "DateTPrevious =  " + POut.DateT(securityLog.DateTPrevious) + " "
                             + "WHERE SecurityLogNum = " + POut.Long(securityLog.SecurityLogNum);

            if (securityLog.LogText == null)
            {
                securityLog.LogText = "";
            }
            OdSqlParameter paramLogText = new OdSqlParameter("paramLogText", OdDbType.Text, POut.StringParam(securityLog.LogText));

            Db.NonQ(command, paramLogText);
        }
Esempio n. 5
0
        ///<summary>Inserts one ApptReminderSent into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(ApptReminderSent apptReminderSent, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO apptremindersent (";

            if (!useExistingPK && isRandomKeys)
            {
                apptReminderSent.ApptReminderSentNum = ReplicationServers.GetKeyNoCache("apptremindersent", "ApptReminderSentNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ApptReminderSentNum,";
            }
            command += "ApptNum,ApptDateTime,DateTimeSent,TSPrior,ApptReminderRuleNum,IsSmsSent,IsEmailSent) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(apptReminderSent.ApptReminderSentNum) + ",";
            }
            command +=
                POut.Long(apptReminderSent.ApptNum) + ","
                + POut.DateT(apptReminderSent.ApptDateTime) + ","
                + POut.DateT(apptReminderSent.DateTimeSent) + ","
                + "'" + POut.Long(apptReminderSent.TSPrior.Ticks) + "',"
                + POut.Long(apptReminderSent.ApptReminderRuleNum) + ","
                + POut.Bool(apptReminderSent.IsSmsSent) + ","
                + POut.Bool(apptReminderSent.IsEmailSent) + ")";
            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                apptReminderSent.ApptReminderSentNum = Db.NonQ(command, true, "ApptReminderSentNum", "apptReminderSent");
            }
            return(apptReminderSent.ApptReminderSentNum);
        }
Esempio n. 6
0
        ///<summary>Updates one RxNorm in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(RxNorm rxNorm, RxNorm oldRxNorm)
        {
            string command = "";

            if (rxNorm.RxCui != oldRxNorm.RxCui)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "RxCui = '" + POut.String(rxNorm.RxCui) + "'";
            }
            if (rxNorm.MmslCode != oldRxNorm.MmslCode)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MmslCode = '" + POut.String(rxNorm.MmslCode) + "'";
            }
            if (rxNorm.Description != oldRxNorm.Description)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Description = '" + POut.String(rxNorm.Description) + "'";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE rxnorm SET " + command
                      + " WHERE RxNormNum = " + POut.Long(rxNorm.RxNormNum);
            Db.NonQ(command);
        }
Esempio n. 7
0
        ///<summary>Updates one LanguageForeign in the database.</summary>
        public static void Update(LanguageForeign languageForeign)
        {
            string command = "UPDATE languageforeign SET "
                             + "ClassType         =  " + DbHelper.ParamChar + "paramClassType, "
                             + "English           =  " + DbHelper.ParamChar + "paramEnglish, "
                             + "Culture           = '" + POut.String(languageForeign.Culture) + "', "
                             + "Translation       =  " + DbHelper.ParamChar + "paramTranslation, "
                             + "Comments          =  " + DbHelper.ParamChar + "paramComments "
                             + "WHERE LanguageForeignNum = " + POut.Long(languageForeign.LanguageForeignNum);

            if (languageForeign.ClassType == null)
            {
                languageForeign.ClassType = "";
            }
            OdSqlParameter paramClassType = new OdSqlParameter("paramClassType", OdDbType.Text, POut.StringParam(languageForeign.ClassType));

            if (languageForeign.English == null)
            {
                languageForeign.English = "";
            }
            OdSqlParameter paramEnglish = new OdSqlParameter("paramEnglish", OdDbType.Text, POut.StringParam(languageForeign.English));

            if (languageForeign.Translation == null)
            {
                languageForeign.Translation = "";
            }
            OdSqlParameter paramTranslation = new OdSqlParameter("paramTranslation", OdDbType.Text, POut.StringParam(languageForeign.Translation));

            if (languageForeign.Comments == null)
            {
                languageForeign.Comments = "";
            }
            OdSqlParameter paramComments = new OdSqlParameter("paramComments", OdDbType.Text, POut.StringParam(languageForeign.Comments));

            Db.NonQ(command, paramClassType, paramEnglish, paramTranslation, paramComments);
        }
Esempio n. 8
0
        ///<summary>Updates one MedicationPat in the database.</summary>
        public static void Update(MedicationPat medicationPat)
        {
            string command = "UPDATE medicationpat SET "
                             + "PatNum          =  " + POut.Long(medicationPat.PatNum) + ", "
                             + "MedicationNum   =  " + POut.Long(medicationPat.MedicationNum) + ", "
                             + "PatNote         =  " + DbHelper.ParamChar + "paramPatNote, "
                             //DateTStamp can only be set by MySQL
                             + "DateStart       =  " + POut.Date(medicationPat.DateStart) + ", "
                             + "DateStop        =  " + POut.Date(medicationPat.DateStop) + ", "
                             + "ProvNum         =  " + POut.Long(medicationPat.ProvNum) + ", "
                             + "MedDescript     = '" + POut.String(medicationPat.MedDescript) + "', "
                             + "RxCui           =  " + POut.Long(medicationPat.RxCui) + ", "
                             + "ErxGuid         = '" + POut.String(medicationPat.ErxGuid) + "', "
                             + "IsCpoe          =  " + POut.Bool(medicationPat.IsCpoe) + " "
                             + "WHERE MedicationPatNum = " + POut.Long(medicationPat.MedicationPatNum);

            if (medicationPat.PatNote == null)
            {
                medicationPat.PatNote = "";
            }
            OdSqlParameter paramPatNote = new OdSqlParameter("paramPatNote", OdDbType.Text, POut.StringParam(medicationPat.PatNote));

            Db.NonQ(command, paramPatNote);
        }
Esempio n. 9
0
        ///<summary>Updates one InsFilingCode in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(InsFilingCode insFilingCode, InsFilingCode oldInsFilingCode)
        {
            string command = "";

            if (insFilingCode.Descript != oldInsFilingCode.Descript)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Descript = '" + POut.String(insFilingCode.Descript) + "'";
            }
            if (insFilingCode.EclaimCode != oldInsFilingCode.EclaimCode)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EclaimCode = '" + POut.String(insFilingCode.EclaimCode) + "'";
            }
            if (insFilingCode.ItemOrder != oldInsFilingCode.ItemOrder)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemOrder = " + POut.Int(insFilingCode.ItemOrder) + "";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE insfilingcode SET " + command
                      + " WHERE InsFilingCodeNum = " + POut.Long(insFilingCode.InsFilingCodeNum);
            Db.NonQ(command);
        }
Esempio n. 10
0
        ///<summary>Updates one VaccineDef in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(VaccineDef vaccineDef, VaccineDef oldVaccineDef)
        {
            string command = "";

            if (vaccineDef.CVXCode != oldVaccineDef.CVXCode)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "CVXCode = '" + POut.String(vaccineDef.CVXCode) + "'";
            }
            if (vaccineDef.VaccineName != oldVaccineDef.VaccineName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "VaccineName = '" + POut.String(vaccineDef.VaccineName) + "'";
            }
            if (vaccineDef.DrugManufacturerNum != oldVaccineDef.DrugManufacturerNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DrugManufacturerNum = " + POut.Long(vaccineDef.DrugManufacturerNum) + "";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE vaccinedef SET " + command
                      + " WHERE VaccineDefNum = " + POut.Long(vaccineDef.VaccineDefNum);
            Db.NonQ(command);
        }
        ///<summary>Updates one CentralConnection in the database.</summary>
        public static void Update(CentralConnection centralConnection)
        {
            string command = "UPDATE centralconnection SET "
                             + "ServerName          = '" + POut.String(centralConnection.ServerName) + "', "
                             + "DatabaseName        = '" + POut.String(centralConnection.DatabaseName) + "', "
                             + "MySqlUser           = '******', "
                             + "MySqlPassword       = '******', "
                             + "ServiceURI          = '" + POut.String(centralConnection.ServiceURI) + "', "
                             + "OdUser              = '******', "
                             + "OdPassword          = '******', "
                             + "Note                =  " + DbHelper.ParamChar + "paramNote, "
                             + "ItemOrder           =  " + POut.Int(centralConnection.ItemOrder) + ", "
                             + "WebServiceIsEcw     =  " + POut.Bool(centralConnection.WebServiceIsEcw) + ", "
                             + "ConnectionStatus    = '" + POut.String(centralConnection.ConnectionStatus) + "' "
                             + "WHERE CentralConnectionNum = " + POut.Long(centralConnection.CentralConnectionNum);

            if (centralConnection.Note == null)
            {
                centralConnection.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringParam(centralConnection.Note));

            Db.NonQ(command, paramNote);
        }
Esempio n. 12
0
        ///<summary>Updates one TerminalActive in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(TerminalActive terminalActive, TerminalActive oldTerminalActive)
        {
            string command = "";

            if (terminalActive.ComputerName != oldTerminalActive.ComputerName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ComputerName = '" + POut.String(terminalActive.ComputerName) + "'";
            }
            if (terminalActive.TerminalStatus != oldTerminalActive.TerminalStatus)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "TerminalStatus = " + POut.Int((int)terminalActive.TerminalStatus) + "";
            }
            if (terminalActive.PatNum != oldTerminalActive.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(terminalActive.PatNum) + "";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE terminalactive SET " + command
                      + " WHERE TerminalActiveNum = " + POut.Long(terminalActive.TerminalActiveNum);
            Db.NonQ(command);
        }
Esempio n. 13
0
        ///<summary>Updates one Phone in the database.</summary>
        public static void Update(Phone phone)
        {
            string command = "UPDATE phone SET "
                             + "Extension             =  " + POut.Int(phone.Extension) + ", "
                             + "EmployeeName          = '" + POut.String(phone.EmployeeName) + "', "
                             + "ClockStatus           = '" + POut.String(phone.ClockStatus.ToString()) + "', "
                             + "Description           = '" + POut.String(phone.Description) + "', "
                             + "ColorBar              =  " + POut.Int(phone.ColorBar.ToArgb()) + ", "
                             + "ColorText             =  " + POut.Int(phone.ColorText.ToArgb()) + ", "
                             + "EmployeeNum           =  " + POut.Long(phone.EmployeeNum) + ", "
                             + "CustomerNumber        = '" + POut.String(phone.CustomerNumber) + "', "
                             + "InOrOut               = '" + POut.String(phone.InOrOut) + "', "
                             + "PatNum                =  " + POut.Long(phone.PatNum) + ", "
                             + "DateTimeStart         =  " + POut.DateT(phone.DateTimeStart) + ", "
                             + "CustomerNumberRaw     = '" + POut.String(phone.CustomerNumberRaw) + "', "
                             + "LastCallTimeStart     =  " + POut.DateT(phone.LastCallTimeStart) + ", "
                             + "RingGroups            =  " + POut.Int((int)phone.RingGroups) + ", "
                             + "IsProximal            =  " + POut.Bool(phone.IsProximal) + ", "
                             + "DateTimeNeedsHelpStart=  " + POut.Date(phone.DateTimeNeedsHelpStart) + ", "
                             + "DateTProximal         =  " + POut.Date(phone.DateTProximal) + " "
                             + "WHERE PhoneNum = " + POut.Long(phone.PhoneNum);

            Db.NonQ(command);
        }
Esempio n. 14
0
        ///<summary>Inserts one ReqStudent into the database.  Provides option to use the existing priKey.</summary>
        public static long Insert(ReqStudent reqStudent, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                reqStudent.ReqStudentNum = ReplicationServers.GetKey("reqstudent", "ReqStudentNum");
            }
            string command = "INSERT INTO reqstudent (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "ReqStudentNum,";
            }
            command += "ReqNeededNum,Descript,SchoolCourseNum,ProvNum,AptNum,PatNum,InstructorNum,DateCompleted) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(reqStudent.ReqStudentNum) + ",";
            }
            command +=
                POut.Long(reqStudent.ReqNeededNum) + ","
                + "'" + POut.String(reqStudent.Descript) + "',"
                + POut.Long(reqStudent.SchoolCourseNum) + ","
                + POut.Long(reqStudent.ProvNum) + ","
                + POut.Long(reqStudent.AptNum) + ","
                + POut.Long(reqStudent.PatNum) + ","
                + POut.Long(reqStudent.InstructorNum) + ","
                + POut.Date(reqStudent.DateCompleted) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                reqStudent.ReqStudentNum = Db.NonQ(command, true, "ReqStudentNum", "reqStudent");
            }
            return(reqStudent.ReqStudentNum);
        }
Esempio n. 15
0
        ///<summary>Inserts one ClaimForm into the database.  Provides option to use the existing priKey.</summary>
        internal static long Insert(ClaimForm claimForm, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                claimForm.ClaimFormNum = ReplicationServers.GetKey("claimform", "ClaimFormNum");
            }
            string command = "INSERT INTO claimform (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "ClaimFormNum,";
            }
            command += "Description,IsHidden,FontName,FontSize,UniqueID,PrintImages,OffsetX,OffsetY) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(claimForm.ClaimFormNum) + ",";
            }
            command +=
                "'" + POut.String(claimForm.Description) + "',"
                + POut.Bool(claimForm.IsHidden) + ","
                + "'" + POut.String(claimForm.FontName) + "',"
                + POut.Float(claimForm.FontSize) + ","
                + "'" + POut.String(claimForm.UniqueID) + "',"
                + POut.Bool(claimForm.PrintImages) + ","
                + POut.Int(claimForm.OffsetX) + ","
                + POut.Int(claimForm.OffsetY) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                claimForm.ClaimFormNum = Db.NonQ(command, true);
            }
            return(claimForm.ClaimFormNum);
        }
Esempio n. 16
0
		///<summary>Updates one MedLab in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
		public static bool Update(MedLab medLab,MedLab oldMedLab){
			string command="";
			if(medLab.ProvNum != oldMedLab.ProvNum) {
				if(command!=""){ command+=",";}
				command+="ProvNum = "+POut.Long(medLab.ProvNum)+"";
			}
			if(medLab.SendingApp != oldMedLab.SendingApp) {
				if(command!=""){ command+=",";}
				command+="SendingApp = '"+POut.String(medLab.SendingApp)+"'";
			}
			if(medLab.SendingFacility != oldMedLab.SendingFacility) {
				if(command!=""){ command+=",";}
				command+="SendingFacility = '"+POut.String(medLab.SendingFacility)+"'";
			}
			if(medLab.PatNum != oldMedLab.PatNum) {
				if(command!=""){ command+=",";}
				command+="PatNum = "+POut.Long(medLab.PatNum)+"";
			}
			if(medLab.PatIDLab != oldMedLab.PatIDLab) {
				if(command!=""){ command+=",";}
				command+="PatIDLab = '"+POut.String(medLab.PatIDLab)+"'";
			}
			if(medLab.PatIDAlt != oldMedLab.PatIDAlt) {
				if(command!=""){ command+=",";}
				command+="PatIDAlt = '"+POut.String(medLab.PatIDAlt)+"'";
			}
			if(medLab.PatAge != oldMedLab.PatAge) {
				if(command!=""){ command+=",";}
				command+="PatAge = '"+POut.String(medLab.PatAge)+"'";
			}
			if(medLab.PatAccountNum != oldMedLab.PatAccountNum) {
				if(command!=""){ command+=",";}
				command+="PatAccountNum = '"+POut.String(medLab.PatAccountNum)+"'";
			}
			if(medLab.PatFasting != oldMedLab.PatFasting) {
				if(command!=""){ command+=",";}
				command+="PatFasting = "+POut.Int   ((int)medLab.PatFasting)+"";
			}
			if(medLab.SpecimenID != oldMedLab.SpecimenID) {
				if(command!=""){ command+=",";}
				command+="SpecimenID = '"+POut.String(medLab.SpecimenID)+"'";
			}
			if(medLab.SpecimenIDFiller != oldMedLab.SpecimenIDFiller) {
				if(command!=""){ command+=",";}
				command+="SpecimenIDFiller = '"+POut.String(medLab.SpecimenIDFiller)+"'";
			}
			if(medLab.ObsTestID != oldMedLab.ObsTestID) {
				if(command!=""){ command+=",";}
				command+="ObsTestID = '"+POut.String(medLab.ObsTestID)+"'";
			}
			if(medLab.ObsTestDescript != oldMedLab.ObsTestDescript) {
				if(command!=""){ command+=",";}
				command+="ObsTestDescript = '"+POut.String(medLab.ObsTestDescript)+"'";
			}
			if(medLab.ObsTestLoinc != oldMedLab.ObsTestLoinc) {
				if(command!=""){ command+=",";}
				command+="ObsTestLoinc = '"+POut.String(medLab.ObsTestLoinc)+"'";
			}
			if(medLab.ObsTestLoincText != oldMedLab.ObsTestLoincText) {
				if(command!=""){ command+=",";}
				command+="ObsTestLoincText = '"+POut.String(medLab.ObsTestLoincText)+"'";
			}
			if(medLab.DateTimeCollected != oldMedLab.DateTimeCollected) {
				if(command!=""){ command+=",";}
				command+="DateTimeCollected = "+POut.DateT(medLab.DateTimeCollected)+"";
			}
			if(medLab.TotalVolume != oldMedLab.TotalVolume) {
				if(command!=""){ command+=",";}
				command+="TotalVolume = '"+POut.String(medLab.TotalVolume)+"'";
			}
			if(medLab.ActionCode != oldMedLab.ActionCode) {
				if(command!=""){ command+=",";}
				command+="ActionCode = '"+POut.String(medLab.ActionCode.ToString())+"'";
			}
			if(medLab.ClinicalInfo != oldMedLab.ClinicalInfo) {
				if(command!=""){ command+=",";}
				command+="ClinicalInfo = '"+POut.String(medLab.ClinicalInfo)+"'";
			}
			if(medLab.DateTimeEntered != oldMedLab.DateTimeEntered) {
				if(command!=""){ command+=",";}
				command+="DateTimeEntered = "+POut.DateT(medLab.DateTimeEntered)+"";
			}
			if(medLab.OrderingProvNPI != oldMedLab.OrderingProvNPI) {
				if(command!=""){ command+=",";}
				command+="OrderingProvNPI = '"+POut.String(medLab.OrderingProvNPI)+"'";
			}
			if(medLab.OrderingProvLocalID != oldMedLab.OrderingProvLocalID) {
				if(command!=""){ command+=",";}
				command+="OrderingProvLocalID = '"+POut.String(medLab.OrderingProvLocalID)+"'";
			}
			if(medLab.OrderingProvLName != oldMedLab.OrderingProvLName) {
				if(command!=""){ command+=",";}
				command+="OrderingProvLName = '"+POut.String(medLab.OrderingProvLName)+"'";
			}
			if(medLab.OrderingProvFName != oldMedLab.OrderingProvFName) {
				if(command!=""){ command+=",";}
				command+="OrderingProvFName = '"+POut.String(medLab.OrderingProvFName)+"'";
			}
			if(medLab.SpecimenIDAlt != oldMedLab.SpecimenIDAlt) {
				if(command!=""){ command+=",";}
				command+="SpecimenIDAlt = '"+POut.String(medLab.SpecimenIDAlt)+"'";
			}
			if(medLab.DateTimeReported != oldMedLab.DateTimeReported) {
				if(command!=""){ command+=",";}
				command+="DateTimeReported = "+POut.DateT(medLab.DateTimeReported)+"";
			}
			if(medLab.ResultStatus != oldMedLab.ResultStatus) {
				if(command!=""){ command+=",";}
				command+="ResultStatus = '"+POut.String(medLab.ResultStatus.ToString())+"'";
			}
			if(medLab.ParentObsID != oldMedLab.ParentObsID) {
				if(command!=""){ command+=",";}
				command+="ParentObsID = '"+POut.String(medLab.ParentObsID)+"'";
			}
			if(medLab.ParentObsTestID != oldMedLab.ParentObsTestID) {
				if(command!=""){ command+=",";}
				command+="ParentObsTestID = '"+POut.String(medLab.ParentObsTestID)+"'";
			}
			if(medLab.NotePat != oldMedLab.NotePat) {
				if(command!=""){ command+=",";}
				command+="NotePat = "+DbHelper.ParamChar+"paramNotePat";
			}
			if(medLab.NoteLab != oldMedLab.NoteLab) {
				if(command!=""){ command+=",";}
				command+="NoteLab = "+DbHelper.ParamChar+"paramNoteLab";
			}
			if(medLab.FileName != oldMedLab.FileName) {
				if(command!=""){ command+=",";}
				command+="FileName = '"+POut.String(medLab.FileName)+"'";
			}
			if(medLab.OriginalPIDSegment != oldMedLab.OriginalPIDSegment) {
				if(command!=""){ command+=",";}
				command+="OriginalPIDSegment = "+DbHelper.ParamChar+"paramOriginalPIDSegment";
			}
			if(command==""){
				return false;
			}
			if(medLab.NotePat==null) {
				medLab.NotePat="";
			}
			OdSqlParameter paramNotePat=new OdSqlParameter("paramNotePat",OdDbType.Text,POut.StringParam(medLab.NotePat));
			if(medLab.NoteLab==null) {
				medLab.NoteLab="";
			}
			OdSqlParameter paramNoteLab=new OdSqlParameter("paramNoteLab",OdDbType.Text,POut.StringParam(medLab.NoteLab));
			if(medLab.OriginalPIDSegment==null) {
				medLab.OriginalPIDSegment="";
			}
			OdSqlParameter paramOriginalPIDSegment=new OdSqlParameter("paramOriginalPIDSegment",OdDbType.Text,POut.StringParam(medLab.OriginalPIDSegment));
			command="UPDATE medlab SET "+command
				+" WHERE MedLabNum = "+POut.Long(medLab.MedLabNum);
			Db.NonQ(command,paramNotePat,paramNoteLab,paramOriginalPIDSegment);
			return true;
		}
Esempio n. 17
0
		///<summary>Inserts one MedLab into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
		public static long InsertNoCache(MedLab medLab,bool useExistingPK){
			bool isRandomKeys=Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
			string command="INSERT INTO medlab (";
			if(!useExistingPK && isRandomKeys) {
				medLab.MedLabNum=ReplicationServers.GetKeyNoCache("medlab","MedLabNum");
			}
			if(isRandomKeys || useExistingPK) {
				command+="MedLabNum,";
			}
			command+="ProvNum,SendingApp,SendingFacility,PatNum,PatIDLab,PatIDAlt,PatAge,PatAccountNum,PatFasting,SpecimenID,SpecimenIDFiller,ObsTestID,ObsTestDescript,ObsTestLoinc,ObsTestLoincText,DateTimeCollected,TotalVolume,ActionCode,ClinicalInfo,DateTimeEntered,OrderingProvNPI,OrderingProvLocalID,OrderingProvLName,OrderingProvFName,SpecimenIDAlt,DateTimeReported,ResultStatus,ParentObsID,ParentObsTestID,NotePat,NoteLab,FileName,OriginalPIDSegment) VALUES(";
			if(isRandomKeys || useExistingPK) {
				command+=POut.Long(medLab.MedLabNum)+",";
			}
			command+=
				     POut.Long  (medLab.ProvNum)+","
				+"'"+POut.String(medLab.SendingApp)+"',"
				+"'"+POut.String(medLab.SendingFacility)+"',"
				+    POut.Long  (medLab.PatNum)+","
				+"'"+POut.String(medLab.PatIDLab)+"',"
				+"'"+POut.String(medLab.PatIDAlt)+"',"
				+"'"+POut.String(medLab.PatAge)+"',"
				+"'"+POut.String(medLab.PatAccountNum)+"',"
				+    POut.Int   ((int)medLab.PatFasting)+","
				+"'"+POut.String(medLab.SpecimenID)+"',"
				+"'"+POut.String(medLab.SpecimenIDFiller)+"',"
				+"'"+POut.String(medLab.ObsTestID)+"',"
				+"'"+POut.String(medLab.ObsTestDescript)+"',"
				+"'"+POut.String(medLab.ObsTestLoinc)+"',"
				+"'"+POut.String(medLab.ObsTestLoincText)+"',"
				+    POut.DateT (medLab.DateTimeCollected)+","
				+"'"+POut.String(medLab.TotalVolume)+"',"
				+"'"+POut.String(medLab.ActionCode.ToString())+"',"
				+"'"+POut.String(medLab.ClinicalInfo)+"',"
				+    POut.DateT (medLab.DateTimeEntered)+","
				+"'"+POut.String(medLab.OrderingProvNPI)+"',"
				+"'"+POut.String(medLab.OrderingProvLocalID)+"',"
				+"'"+POut.String(medLab.OrderingProvLName)+"',"
				+"'"+POut.String(medLab.OrderingProvFName)+"',"
				+"'"+POut.String(medLab.SpecimenIDAlt)+"',"
				+    POut.DateT (medLab.DateTimeReported)+","
				+"'"+POut.String(medLab.ResultStatus.ToString())+"',"
				+"'"+POut.String(medLab.ParentObsID)+"',"
				+"'"+POut.String(medLab.ParentObsTestID)+"',"
				+    DbHelper.ParamChar+"paramNotePat,"
				+    DbHelper.ParamChar+"paramNoteLab,"
				+"'"+POut.String(medLab.FileName)+"',"
				+    DbHelper.ParamChar+"paramOriginalPIDSegment)";
			if(medLab.NotePat==null) {
				medLab.NotePat="";
			}
			OdSqlParameter paramNotePat=new OdSqlParameter("paramNotePat",OdDbType.Text,POut.StringParam(medLab.NotePat));
			if(medLab.NoteLab==null) {
				medLab.NoteLab="";
			}
			OdSqlParameter paramNoteLab=new OdSqlParameter("paramNoteLab",OdDbType.Text,POut.StringParam(medLab.NoteLab));
			if(medLab.OriginalPIDSegment==null) {
				medLab.OriginalPIDSegment="";
			}
			OdSqlParameter paramOriginalPIDSegment=new OdSqlParameter("paramOriginalPIDSegment",OdDbType.Text,POut.StringParam(medLab.OriginalPIDSegment));
			if(useExistingPK || isRandomKeys) {
				Db.NonQ(command,paramNotePat,paramNoteLab,paramOriginalPIDSegment);
			}
			else {
				medLab.MedLabNum=Db.NonQ(command,true,"MedLabNum","medLab",paramNotePat,paramNoteLab,paramOriginalPIDSegment);
			}
			return medLab.MedLabNum;
		}
Esempio n. 18
0
		///<summary>Converts a list of MedLab into a DataTable.</summary>
		public static DataTable ListToTable(List<MedLab> listMedLabs,string tableName="") {
			if(string.IsNullOrEmpty(tableName)) {
				tableName="MedLab";
			}
			DataTable table=new DataTable(tableName);
			table.Columns.Add("MedLabNum");
			table.Columns.Add("ProvNum");
			table.Columns.Add("SendingApp");
			table.Columns.Add("SendingFacility");
			table.Columns.Add("PatNum");
			table.Columns.Add("PatIDLab");
			table.Columns.Add("PatIDAlt");
			table.Columns.Add("PatAge");
			table.Columns.Add("PatAccountNum");
			table.Columns.Add("PatFasting");
			table.Columns.Add("SpecimenID");
			table.Columns.Add("SpecimenIDFiller");
			table.Columns.Add("ObsTestID");
			table.Columns.Add("ObsTestDescript");
			table.Columns.Add("ObsTestLoinc");
			table.Columns.Add("ObsTestLoincText");
			table.Columns.Add("DateTimeCollected");
			table.Columns.Add("TotalVolume");
			table.Columns.Add("ActionCode");
			table.Columns.Add("ClinicalInfo");
			table.Columns.Add("DateTimeEntered");
			table.Columns.Add("OrderingProvNPI");
			table.Columns.Add("OrderingProvLocalID");
			table.Columns.Add("OrderingProvLName");
			table.Columns.Add("OrderingProvFName");
			table.Columns.Add("SpecimenIDAlt");
			table.Columns.Add("DateTimeReported");
			table.Columns.Add("ResultStatus");
			table.Columns.Add("ParentObsID");
			table.Columns.Add("ParentObsTestID");
			table.Columns.Add("NotePat");
			table.Columns.Add("NoteLab");
			table.Columns.Add("FileName");
			table.Columns.Add("OriginalPIDSegment");
			foreach(MedLab medLab in listMedLabs) {
				table.Rows.Add(new object[] {
					POut.Long  (medLab.MedLabNum),
					POut.Long  (medLab.ProvNum),
					            medLab.SendingApp,
					            medLab.SendingFacility,
					POut.Long  (medLab.PatNum),
					            medLab.PatIDLab,
					            medLab.PatIDAlt,
					            medLab.PatAge,
					            medLab.PatAccountNum,
					POut.Int   ((int)medLab.PatFasting),
					            medLab.SpecimenID,
					            medLab.SpecimenIDFiller,
					            medLab.ObsTestID,
					            medLab.ObsTestDescript,
					            medLab.ObsTestLoinc,
					            medLab.ObsTestLoincText,
					POut.DateT (medLab.DateTimeCollected,false),
					            medLab.TotalVolume,
					POut.Int   ((int)medLab.ActionCode),
					            medLab.ClinicalInfo,
					POut.DateT (medLab.DateTimeEntered,false),
					            medLab.OrderingProvNPI,
					            medLab.OrderingProvLocalID,
					            medLab.OrderingProvLName,
					            medLab.OrderingProvFName,
					            medLab.SpecimenIDAlt,
					POut.DateT (medLab.DateTimeReported,false),
					POut.Int   ((int)medLab.ResultStatus),
					            medLab.ParentObsID,
					            medLab.ParentObsTestID,
					            medLab.NotePat,
					            medLab.NoteLab,
					            medLab.FileName,
					            medLab.OriginalPIDSegment,
				});
			}
			return table;
		}
Esempio n. 19
0
        ///<summary>Updates one HL7DefMessage in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(HL7DefMessage hL7DefMessage, HL7DefMessage oldHL7DefMessage)
        {
            string command = "";

            if (hL7DefMessage.HL7DefNum != oldHL7DefMessage.HL7DefNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "HL7DefNum = " + POut.Long(hL7DefMessage.HL7DefNum) + "";
            }
            if (hL7DefMessage.MessageType != oldHL7DefMessage.MessageType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MessageType = '" + POut.String(hL7DefMessage.MessageType.ToString()) + "'";
            }
            if (hL7DefMessage.EventType != oldHL7DefMessage.EventType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EventType = '" + POut.String(hL7DefMessage.EventType.ToString()) + "'";
            }
            if (hL7DefMessage.InOrOut != oldHL7DefMessage.InOrOut)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "InOrOut = " + POut.Int((int)hL7DefMessage.InOrOut) + "";
            }
            if (hL7DefMessage.ItemOrder != oldHL7DefMessage.ItemOrder)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemOrder = " + POut.Int(hL7DefMessage.ItemOrder) + "";
            }
            if (hL7DefMessage.Note != oldHL7DefMessage.Note)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Note = " + DbHelper.ParamChar + "paramNote";
            }
            if (command == "")
            {
                return;
            }
            if (hL7DefMessage.Note == null)
            {
                hL7DefMessage.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, hL7DefMessage.Note);

            command = "UPDATE hl7defmessage SET " + command
                      + " WHERE HL7DefMessageNum = " + POut.Long(hL7DefMessage.HL7DefMessageNum);
            Db.NonQ(command, paramNote);
        }
Esempio n. 20
0
        ///<summary>Updates one InsVerify in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(InsVerify insVerify, InsVerify oldInsVerify)
        {
            string command = "";

            if (insVerify.DateLastVerified.Date != oldInsVerify.DateLastVerified.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DateLastVerified = " + POut.Date(insVerify.DateLastVerified) + "";
            }
            if (insVerify.UserNum != oldInsVerify.UserNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "UserNum = " + POut.Long(insVerify.UserNum) + "";
            }
            if (insVerify.VerifyType != oldInsVerify.VerifyType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "VerifyType = " + POut.Int((int)insVerify.VerifyType) + "";
            }
            if (insVerify.FKey != oldInsVerify.FKey)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FKey = " + POut.Long(insVerify.FKey) + "";
            }
            if (insVerify.DefNum != oldInsVerify.DefNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DefNum = " + POut.Long(insVerify.DefNum) + "";
            }
            if (insVerify.DateLastAssigned.Date != oldInsVerify.DateLastAssigned.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DateLastAssigned = " + POut.Date(insVerify.DateLastAssigned) + "";
            }
            if (insVerify.Note != oldInsVerify.Note)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Note = " + DbHelper.ParamChar + "paramNote";
            }
            //DateTimeEntry not allowed to change
            if (insVerify.HoursAvailableForVerification != oldInsVerify.HoursAvailableForVerification)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "HoursAvailableForVerification = '" + POut.Double(insVerify.HoursAvailableForVerification) + "'";
            }
            if (command == "")
            {
                return(false);
            }
            if (insVerify.Note == null)
            {
                insVerify.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringNote(insVerify.Note));

            command = "UPDATE insverify SET " + command
                      + " WHERE InsVerifyNum = " + POut.Long(insVerify.InsVerifyNum);
            Db.NonQ(command, paramNote);
            return(true);
        }
Esempio n. 21
0
        ///<summary>Updates one Provider in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        internal static void Update(Provider provider, Provider oldProvider)
        {
            string command = "";

            if (provider.Abbr != oldProvider.Abbr)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Abbr = '" + POut.String(provider.Abbr) + "'";
            }
            if (provider.ItemOrder != oldProvider.ItemOrder)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemOrder = " + POut.Int(provider.ItemOrder) + "";
            }
            if (provider.LName != oldProvider.LName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "LName = '" + POut.String(provider.LName) + "'";
            }
            if (provider.FName != oldProvider.FName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FName = '" + POut.String(provider.FName) + "'";
            }
            if (provider.MI != oldProvider.MI)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MI = '" + POut.String(provider.MI) + "'";
            }
            if (provider.Suffix != oldProvider.Suffix)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Suffix = '" + POut.String(provider.Suffix) + "'";
            }
            if (provider.FeeSched != oldProvider.FeeSched)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FeeSched = " + POut.Long(provider.FeeSched) + "";
            }
            if (provider.Specialty != oldProvider.Specialty)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Specialty = " + POut.Int((int)provider.Specialty) + "";
            }
            if (provider.SSN != oldProvider.SSN)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SSN = '" + POut.String(provider.SSN) + "'";
            }
            if (provider.StateLicense != oldProvider.StateLicense)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "StateLicense = '" + POut.String(provider.StateLicense) + "'";
            }
            if (provider.DEANum != oldProvider.DEANum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DEANum = '" + POut.String(provider.DEANum) + "'";
            }
            if (provider.IsSecondary != oldProvider.IsSecondary)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsSecondary = " + POut.Bool(provider.IsSecondary) + "";
            }
            if (provider.ProvColor != oldProvider.ProvColor)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProvColor = " + POut.Int(provider.ProvColor.ToArgb()) + "";
            }
            if (provider.IsHidden != oldProvider.IsHidden)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsHidden = " + POut.Bool(provider.IsHidden) + "";
            }
            if (provider.UsingTIN != oldProvider.UsingTIN)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "UsingTIN = " + POut.Bool(provider.UsingTIN) + "";
            }
            if (provider.BlueCrossID != oldProvider.BlueCrossID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "BlueCrossID = '" + POut.String(provider.BlueCrossID) + "'";
            }
            if (provider.SigOnFile != oldProvider.SigOnFile)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SigOnFile = " + POut.Bool(provider.SigOnFile) + "";
            }
            if (provider.MedicaidID != oldProvider.MedicaidID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "MedicaidID = '" + POut.String(provider.MedicaidID) + "'";
            }
            if (provider.OutlineColor != oldProvider.OutlineColor)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "OutlineColor = " + POut.Int(provider.OutlineColor.ToArgb()) + "";
            }
            if (provider.SchoolClassNum != oldProvider.SchoolClassNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SchoolClassNum = " + POut.Long(provider.SchoolClassNum) + "";
            }
            if (provider.NationalProvID != oldProvider.NationalProvID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "NationalProvID = '" + POut.String(provider.NationalProvID) + "'";
            }
            if (provider.CanadianOfficeNum != oldProvider.CanadianOfficeNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "CanadianOfficeNum = '" + POut.String(provider.CanadianOfficeNum) + "'";
            }
            //DateTStamp can only be set by MySQL
            if (provider.AnesthProvType != oldProvider.AnesthProvType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "AnesthProvType = " + POut.Long(provider.AnesthProvType) + "";
            }
            if (provider.TaxonomyCodeOverride != oldProvider.TaxonomyCodeOverride)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "TaxonomyCodeOverride = '" + POut.String(provider.TaxonomyCodeOverride) + "'";
            }
            if (provider.IsCDAnet != oldProvider.IsCDAnet)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsCDAnet = " + POut.Bool(provider.IsCDAnet) + "";
            }
            if (provider.EcwID != oldProvider.EcwID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EcwID = '" + POut.String(provider.EcwID) + "'";
            }
            if (provider.EhrKey != oldProvider.EhrKey)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EhrKey = '" + POut.String(provider.EhrKey) + "'";
            }
            if (provider.StateRxID != oldProvider.StateRxID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "StateRxID = '" + POut.String(provider.StateRxID) + "'";
            }
            if (provider.EhrHasReportAccess != oldProvider.EhrHasReportAccess)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "EhrHasReportAccess = " + POut.Bool(provider.EhrHasReportAccess) + "";
            }
            if (provider.IsNotPerson != oldProvider.IsNotPerson)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsNotPerson = " + POut.Bool(provider.IsNotPerson) + "";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE provider SET " + command
                      + " WHERE ProvNum = " + POut.Long(provider.ProvNum);
            Db.NonQ(command);
        }
Esempio n. 22
0
        ///<summary>Updates one Adjustment in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(Adjustment adjustment, Adjustment oldAdjustment)
        {
            string command = "";

            if (adjustment.AdjDate.Date != oldAdjustment.AdjDate.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "AdjDate = " + POut.Date(adjustment.AdjDate) + "";
            }
            if (adjustment.AdjAmt != oldAdjustment.AdjAmt)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "AdjAmt = '" + POut.Double(adjustment.AdjAmt) + "'";
            }
            if (adjustment.PatNum != oldAdjustment.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(adjustment.PatNum) + "";
            }
            if (adjustment.AdjType != oldAdjustment.AdjType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "AdjType = " + POut.Long(adjustment.AdjType) + "";
            }
            if (adjustment.ProvNum != oldAdjustment.ProvNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProvNum = " + POut.Long(adjustment.ProvNum) + "";
            }
            if (adjustment.AdjNote != oldAdjustment.AdjNote)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "AdjNote = " + DbHelper.ParamChar + "paramAdjNote";
            }
            if (adjustment.ProcDate.Date != oldAdjustment.ProcDate.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProcDate = " + POut.Date(adjustment.ProcDate) + "";
            }
            if (adjustment.ProcNum != oldAdjustment.ProcNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProcNum = " + POut.Long(adjustment.ProcNum) + "";
            }
            //DateEntry not allowed to change
            if (adjustment.ClinicNum != oldAdjustment.ClinicNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ClinicNum = " + POut.Long(adjustment.ClinicNum) + "";
            }
            if (adjustment.StatementNum != oldAdjustment.StatementNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "StatementNum = " + POut.Long(adjustment.StatementNum) + "";
            }
            //SecUserNumEntry excluded from update
            //SecDateTEdit can only be set by MySQL
            if (command == "")
            {
                return(false);
            }
            if (adjustment.AdjNote == null)
            {
                adjustment.AdjNote = "";
            }
            OdSqlParameter paramAdjNote = new OdSqlParameter("paramAdjNote", OdDbType.Text, POut.StringNote(adjustment.AdjNote));

            command = "UPDATE adjustment SET " + command
                      + " WHERE AdjNum = " + POut.Long(adjustment.AdjNum);
            Db.NonQ(command, paramAdjNote);
            return(true);
        }
Esempio n. 23
0
        ///<summary>Updates one Def in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(Def def, Def oldDef)
        {
            string command = "";

            if (def.Category != oldDef.Category)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Category = " + POut.Int((int)def.Category) + "";
            }
            if (def.ItemOrder != oldDef.ItemOrder)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemOrder = " + POut.Int(def.ItemOrder) + "";
            }
            if (def.ItemName != oldDef.ItemName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemName = '" + POut.StringNote(def.ItemName, true) + "'";
            }
            if (def.ItemValue != oldDef.ItemValue)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemValue = '" + POut.String(def.ItemValue) + "'";
            }
            if (def.ItemColor != oldDef.ItemColor)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ItemColor = " + POut.Int(def.ItemColor.ToArgb()) + "";
            }
            if (def.IsHidden != oldDef.IsHidden)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsHidden = " + POut.Bool(def.IsHidden) + "";
            }
            if (command == "")
            {
                return(false);
            }
            command = "UPDATE definition SET " + command
                      + " WHERE DefNum = " + POut.Long(def.DefNum);
            Db.NonQ(command);
            return(true);
        }
Esempio n. 24
0
        ///<summary>Updates one TreatPlan in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(TreatPlan treatPlan, TreatPlan oldTreatPlan)
        {
            string command = "";

            if (treatPlan.PatNum != oldTreatPlan.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(treatPlan.PatNum) + "";
            }
            if (treatPlan.DateTP.Date != oldTreatPlan.DateTP.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DateTP = " + POut.Date(treatPlan.DateTP) + "";
            }
            if (treatPlan.Heading != oldTreatPlan.Heading)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Heading = '" + POut.String(treatPlan.Heading) + "'";
            }
            if (treatPlan.Note != oldTreatPlan.Note)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Note = " + DbHelper.ParamChar + "paramNote";
            }
            if (treatPlan.Signature != oldTreatPlan.Signature)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Signature = " + DbHelper.ParamChar + "paramSignature";
            }
            if (treatPlan.SigIsTopaz != oldTreatPlan.SigIsTopaz)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SigIsTopaz = " + POut.Bool(treatPlan.SigIsTopaz) + "";
            }
            if (treatPlan.ResponsParty != oldTreatPlan.ResponsParty)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ResponsParty = " + POut.Long(treatPlan.ResponsParty) + "";
            }
            if (treatPlan.DocNum != oldTreatPlan.DocNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "DocNum = " + POut.Long(treatPlan.DocNum) + "";
            }
            if (treatPlan.TPStatus != oldTreatPlan.TPStatus)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "TPStatus = " + POut.Int((int)treatPlan.TPStatus) + "";
            }
            //SecUserNumEntry excluded from update
            //SecDateEntry not allowed to change
            //SecDateTEdit can only be set by MySQL
            if (treatPlan.UserNumPresenter != oldTreatPlan.UserNumPresenter)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "UserNumPresenter = " + POut.Long(treatPlan.UserNumPresenter) + "";
            }
            if (treatPlan.TPType != oldTreatPlan.TPType)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "TPType = " + POut.Int((int)treatPlan.TPType) + "";
            }
            if (command == "")
            {
                return(false);
            }
            if (treatPlan.Note == null)
            {
                treatPlan.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringParam(treatPlan.Note));

            if (treatPlan.Signature == null)
            {
                treatPlan.Signature = "";
            }
            OdSqlParameter paramSignature = new OdSqlParameter("paramSignature", OdDbType.Text, POut.StringParam(treatPlan.Signature));

            command = "UPDATE treatplan SET " + command
                      + " WHERE TreatPlanNum = " + POut.Long(treatPlan.TreatPlanNum);
            Db.NonQ(command, paramNote, paramSignature);
            return(true);
        }
Esempio n. 25
0
		///<summary>Deletes one EhrLabResultsCopyTo from the database.</summary>
		public static void Delete(long ehrLabResultsCopyToNum) {
			string command="DELETE FROM ehrlabresultscopyto "
				+"WHERE EhrLabResultsCopyToNum = "+POut.Long(ehrLabResultsCopyToNum);
			Db.NonQ(command);
		}
Esempio n. 26
0
        ///<summary>Updates one Supplier in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
        public static void Update(Supplier supplier, Supplier oldSupplier)
        {
            string command = "";

            if (supplier.Name != oldSupplier.Name)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Name = '" + POut.String(supplier.Name) + "'";
            }
            if (supplier.Phone != oldSupplier.Phone)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Phone = '" + POut.String(supplier.Phone) + "'";
            }
            if (supplier.CustomerId != oldSupplier.CustomerId)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "CustomerId = '" + POut.String(supplier.CustomerId) + "'";
            }
            if (supplier.Website != oldSupplier.Website)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Website = '" + POut.String(supplier.Website) + "'";
            }
            if (supplier.UserName != oldSupplier.UserName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "UserName = '******'";
            }
            if (supplier.Password != oldSupplier.Password)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Password = '******'";
            }
            if (supplier.Note != oldSupplier.Note)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Note = '" + POut.String(supplier.Note) + "'";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE supplier SET " + command
                      + " WHERE SupplierNum = " + POut.Long(supplier.SupplierNum);
            Db.NonQ(command);
        }
Esempio n. 27
0
        ///<summary>Converts a list of Clearinghouse into a DataTable.</summary>
        public static DataTable ListToTable(List <Clearinghouse> listClearinghouses, string tableName = "")
        {
            if (string.IsNullOrEmpty(tableName))
            {
                tableName = "Clearinghouse";
            }
            DataTable table = new DataTable(tableName);

            table.Columns.Add("ClearinghouseNum");
            table.Columns.Add("Description");
            table.Columns.Add("ExportPath");
            table.Columns.Add("Payors");
            table.Columns.Add("Eformat");
            table.Columns.Add("ISA05");
            table.Columns.Add("SenderTIN");
            table.Columns.Add("ISA07");
            table.Columns.Add("ISA08");
            table.Columns.Add("ISA15");
            table.Columns.Add("Password");
            table.Columns.Add("ResponsePath");
            table.Columns.Add("CommBridge");
            table.Columns.Add("ClientProgram");
            table.Columns.Add("LastBatchNumber");
            table.Columns.Add("ModemPort");
            table.Columns.Add("LoginID");
            table.Columns.Add("SenderName");
            table.Columns.Add("SenderTelephone");
            table.Columns.Add("GS03");
            table.Columns.Add("ISA02");
            table.Columns.Add("ISA04");
            table.Columns.Add("ISA16");
            table.Columns.Add("SeparatorData");
            table.Columns.Add("SeparatorSegment");
            table.Columns.Add("ClinicNum");
            table.Columns.Add("HqClearinghouseNum");
            table.Columns.Add("IsEraDownloadAllowed");
            table.Columns.Add("IsClaimExportAllowed");
            table.Columns.Add("IsAttachmentSendAllowed");
            foreach (Clearinghouse clearinghouse in listClearinghouses)
            {
                table.Rows.Add(new object[] {
                    POut.Long(clearinghouse.ClearinghouseNum),
                    clearinghouse.Description,
                    clearinghouse.ExportPath,
                    clearinghouse.Payors,
                    POut.Int((int)clearinghouse.Eformat),
                    clearinghouse.ISA05,
                    clearinghouse.SenderTIN,
                    clearinghouse.ISA07,
                    clearinghouse.ISA08,
                    clearinghouse.ISA15,
                    clearinghouse.Password,
                    clearinghouse.ResponsePath,
                    POut.Int((int)clearinghouse.CommBridge),
                    clearinghouse.ClientProgram,
                    POut.Int(clearinghouse.LastBatchNumber),
                    POut.Byte(clearinghouse.ModemPort),
                    clearinghouse.LoginID,
                    clearinghouse.SenderName,
                    clearinghouse.SenderTelephone,
                    clearinghouse.GS03,
                    clearinghouse.ISA02,
                    clearinghouse.ISA04,
                    clearinghouse.ISA16,
                    clearinghouse.SeparatorData,
                    clearinghouse.SeparatorSegment,
                    POut.Long(clearinghouse.ClinicNum),
                    POut.Long(clearinghouse.HqClearinghouseNum),
                    POut.Int((int)clearinghouse.IsEraDownloadAllowed),
                    POut.Bool(clearinghouse.IsClaimExportAllowed),
                    POut.Bool(clearinghouse.IsAttachmentSendAllowed),
                });
            }
            return(table);
        }
Esempio n. 28
0
		///<summary>Deletes one MedLab from the database.</summary>
		public static void Delete(long medLabNum){
			string command="DELETE FROM medlab "
				+"WHERE MedLabNum = "+POut.Long(medLabNum);
			Db.NonQ(command);
		}
Esempio n. 29
0
        ///<summary>Updates one PatPlan in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(PatPlan patPlan, PatPlan oldPatPlan)
        {
            string command = "";

            if (patPlan.PatNum != oldPatPlan.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(patPlan.PatNum) + "";
            }
            if (patPlan.Ordinal != oldPatPlan.Ordinal)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Ordinal = " + POut.Byte(patPlan.Ordinal) + "";
            }
            if (patPlan.IsPending != oldPatPlan.IsPending)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsPending = " + POut.Bool(patPlan.IsPending) + "";
            }
            if (patPlan.Relationship != oldPatPlan.Relationship)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Relationship = " + POut.Int((int)patPlan.Relationship) + "";
            }
            if (patPlan.PatID != oldPatPlan.PatID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatID = '" + POut.String(patPlan.PatID) + "'";
            }
            if (patPlan.InsSubNum != oldPatPlan.InsSubNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "InsSubNum = " + POut.Long(patPlan.InsSubNum) + "";
            }
            if (patPlan.OrthoAutoFeeBilledOverride != oldPatPlan.OrthoAutoFeeBilledOverride)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "OrthoAutoFeeBilledOverride = '" + POut.Double(patPlan.OrthoAutoFeeBilledOverride) + "'";
            }
            if (patPlan.OrthoAutoNextClaimDate.Date != oldPatPlan.OrthoAutoNextClaimDate.Date)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "OrthoAutoNextClaimDate = " + POut.Date(patPlan.OrthoAutoNextClaimDate) + "";
            }
            if (command == "")
            {
                return(false);
            }
            command = "UPDATE patplan SET " + command
                      + " WHERE PatPlanNum = " + POut.Long(patPlan.PatPlanNum);
            Db.NonQ(command);
            return(true);
        }
Esempio n. 30
0
        ///<summary>Updates one Clearinghouse in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
        public static bool Update(Clearinghouse clearinghouse, Clearinghouse oldClearinghouse)
        {
            string command = "";

            if (clearinghouse.Description != oldClearinghouse.Description)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Description = '" + POut.String(clearinghouse.Description) + "'";
            }
            if (clearinghouse.ExportPath != oldClearinghouse.ExportPath)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ExportPath = " + DbHelper.ParamChar + "paramExportPath";
            }
            if (clearinghouse.Payors != oldClearinghouse.Payors)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Payors = " + DbHelper.ParamChar + "paramPayors";
            }
            if (clearinghouse.Eformat != oldClearinghouse.Eformat)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Eformat = " + POut.Int((int)clearinghouse.Eformat) + "";
            }
            if (clearinghouse.ISA05 != oldClearinghouse.ISA05)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA05 = '" + POut.String(clearinghouse.ISA05) + "'";
            }
            if (clearinghouse.SenderTIN != oldClearinghouse.SenderTIN)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SenderTIN = '" + POut.String(clearinghouse.SenderTIN) + "'";
            }
            if (clearinghouse.ISA07 != oldClearinghouse.ISA07)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA07 = '" + POut.String(clearinghouse.ISA07) + "'";
            }
            if (clearinghouse.ISA08 != oldClearinghouse.ISA08)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA08 = '" + POut.String(clearinghouse.ISA08) + "'";
            }
            if (clearinghouse.ISA15 != oldClearinghouse.ISA15)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA15 = '" + POut.String(clearinghouse.ISA15) + "'";
            }
            if (clearinghouse.Password != oldClearinghouse.Password)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Password = '******'";
            }
            if (clearinghouse.ResponsePath != oldClearinghouse.ResponsePath)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ResponsePath = '" + POut.String(clearinghouse.ResponsePath) + "'";
            }
            if (clearinghouse.CommBridge != oldClearinghouse.CommBridge)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "CommBridge = " + POut.Int((int)clearinghouse.CommBridge) + "";
            }
            if (clearinghouse.ClientProgram != oldClearinghouse.ClientProgram)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ClientProgram = '" + POut.String(clearinghouse.ClientProgram) + "'";
            }
            //LastBatchNumber excluded from update
            if (clearinghouse.ModemPort != oldClearinghouse.ModemPort)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ModemPort = " + POut.Byte(clearinghouse.ModemPort) + "";
            }
            if (clearinghouse.LoginID != oldClearinghouse.LoginID)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "LoginID = '" + POut.String(clearinghouse.LoginID) + "'";
            }
            if (clearinghouse.SenderName != oldClearinghouse.SenderName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SenderName = '" + POut.String(clearinghouse.SenderName) + "'";
            }
            if (clearinghouse.SenderTelephone != oldClearinghouse.SenderTelephone)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SenderTelephone = '" + POut.String(clearinghouse.SenderTelephone) + "'";
            }
            if (clearinghouse.GS03 != oldClearinghouse.GS03)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "GS03 = '" + POut.String(clearinghouse.GS03) + "'";
            }
            if (clearinghouse.ISA02 != oldClearinghouse.ISA02)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA02 = '" + POut.String(clearinghouse.ISA02) + "'";
            }
            if (clearinghouse.ISA04 != oldClearinghouse.ISA04)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA04 = '" + POut.String(clearinghouse.ISA04) + "'";
            }
            if (clearinghouse.ISA16 != oldClearinghouse.ISA16)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ISA16 = '" + POut.String(clearinghouse.ISA16) + "'";
            }
            if (clearinghouse.SeparatorData != oldClearinghouse.SeparatorData)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SeparatorData = '" + POut.String(clearinghouse.SeparatorData) + "'";
            }
            if (clearinghouse.SeparatorSegment != oldClearinghouse.SeparatorSegment)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "SeparatorSegment = '" + POut.String(clearinghouse.SeparatorSegment) + "'";
            }
            if (clearinghouse.ClinicNum != oldClearinghouse.ClinicNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ClinicNum = " + POut.Long(clearinghouse.ClinicNum) + "";
            }
            if (clearinghouse.HqClearinghouseNum != oldClearinghouse.HqClearinghouseNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "HqClearinghouseNum = " + POut.Long(clearinghouse.HqClearinghouseNum) + "";
            }
            if (clearinghouse.IsEraDownloadAllowed != oldClearinghouse.IsEraDownloadAllowed)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsEraDownloadAllowed = " + POut.Int((int)clearinghouse.IsEraDownloadAllowed) + "";
            }
            if (clearinghouse.IsClaimExportAllowed != oldClearinghouse.IsClaimExportAllowed)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsClaimExportAllowed = " + POut.Bool(clearinghouse.IsClaimExportAllowed) + "";
            }
            if (clearinghouse.IsAttachmentSendAllowed != oldClearinghouse.IsAttachmentSendAllowed)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "IsAttachmentSendAllowed = " + POut.Bool(clearinghouse.IsAttachmentSendAllowed) + "";
            }
            if (command == "")
            {
                return(false);
            }
            if (clearinghouse.ExportPath == null)
            {
                clearinghouse.ExportPath = "";
            }
            OdSqlParameter paramExportPath = new OdSqlParameter("paramExportPath", OdDbType.Text, POut.StringParam(clearinghouse.ExportPath));

            if (clearinghouse.Payors == null)
            {
                clearinghouse.Payors = "";
            }
            OdSqlParameter paramPayors = new OdSqlParameter("paramPayors", OdDbType.Text, POut.StringParam(clearinghouse.Payors));

            command = "UPDATE clearinghouse SET " + command
                      + " WHERE ClearinghouseNum = " + POut.Long(clearinghouse.ClearinghouseNum);
            Db.NonQ(command, paramExportPath, paramPayors);
            return(true);
        }