Example #1
0
 ///<summary>Inserts one EhrProvKey into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(EhrProvKey ehrProvKey,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         ehrProvKey.EhrProvKeyNum=ReplicationServers.GetKey("ehrprovkey","EhrProvKeyNum");
     }
     string command="INSERT INTO ehrprovkey (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="EhrProvKeyNum,";
     }
     command+="PatNum,LName,FName,ProvKey,FullTimeEquiv,Notes,HasReportAccess) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(ehrProvKey.EhrProvKeyNum)+",";
     }
     command+=
              POut.Long  (ehrProvKey.PatNum)+","
         +"'"+POut.String(ehrProvKey.LName)+"',"
         +"'"+POut.String(ehrProvKey.FName)+"',"
         +"'"+POut.String(ehrProvKey.ProvKey)+"',"
         +    POut.Float (ehrProvKey.FullTimeEquiv)+","
         +"'"+POut.String(ehrProvKey.Notes)+"',"
         +    POut.Bool  (ehrProvKey.HasReportAccess)+")";
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command);
     }
     else {
         ehrProvKey.EhrProvKeyNum=Db.NonQ(command,true);
     }
     return ehrProvKey.EhrProvKeyNum;
 }
Example #2
0
        ///<summary>Inserts one EhrProvKey into the database.  Provides option to use the existing priKey.</summary>
        public static long Insert(EhrProvKey ehrProvKey, bool useExistingPK)
        {
            if (!useExistingPK && PrefC.RandomKeys)
            {
                ehrProvKey.EhrProvKeyNum = ReplicationServers.GetKey("ehrprovkey", "EhrProvKeyNum");
            }
            string command = "INSERT INTO ehrprovkey (";

            if (useExistingPK || PrefC.RandomKeys)
            {
                command += "EhrProvKeyNum,";
            }
            command += "PatNum,LName,FName,ProvKey,FullTimeEquiv,Notes,HasReportAccess) VALUES(";
            if (useExistingPK || PrefC.RandomKeys)
            {
                command += POut.Long(ehrProvKey.EhrProvKeyNum) + ",";
            }
            command +=
                POut.Long(ehrProvKey.PatNum) + ","
                + "'" + POut.String(ehrProvKey.LName) + "',"
                + "'" + POut.String(ehrProvKey.FName) + "',"
                + "'" + POut.String(ehrProvKey.ProvKey) + "',"
                + POut.Float(ehrProvKey.FullTimeEquiv) + ","
                + "'" + POut.String(ehrProvKey.Notes) + "',"
                + POut.Bool(ehrProvKey.HasReportAccess) + ")";
            if (useExistingPK || PrefC.RandomKeys)
            {
                Db.NonQ(command);
            }
            else
            {
                ehrProvKey.EhrProvKeyNum = Db.NonQ(command, true);
            }
            return(ehrProvKey.EhrProvKeyNum);
        }
 ///<summary>Returns true if Update(EhrProvKey,EhrProvKey) would make changes to the database.
 ///Does not make any changes to the database and can be called before remoting role is checked.</summary>
 public static bool UpdateComparison(EhrProvKey ehrProvKey, EhrProvKey oldEhrProvKey)
 {
     if (ehrProvKey.PatNum != oldEhrProvKey.PatNum)
     {
         return(true);
     }
     if (ehrProvKey.LName != oldEhrProvKey.LName)
     {
         return(true);
     }
     if (ehrProvKey.FName != oldEhrProvKey.FName)
     {
         return(true);
     }
     if (ehrProvKey.ProvKey != oldEhrProvKey.ProvKey)
     {
         return(true);
     }
     if (ehrProvKey.FullTimeEquiv != oldEhrProvKey.FullTimeEquiv)
     {
         return(true);
     }
     if (ehrProvKey.Notes != oldEhrProvKey.Notes)
     {
         return(true);
     }
     if (ehrProvKey.YearValue != oldEhrProvKey.YearValue)
     {
         return(true);
     }
     return(false);
 }
Example #4
0
 ///<summary>Inserts one EhrProvKey into the database.  Returns the new priKey.</summary>
 internal static long Insert(EhrProvKey ehrProvKey)
 {
     if(DataConnection.DBtype==DatabaseType.Oracle) {
         ehrProvKey.EhrProvKeyNum=DbHelper.GetNextOracleKey("ehrprovkey","EhrProvKeyNum");
         int loopcount=0;
         while(loopcount<100){
             try {
                 return Insert(ehrProvKey,true);
             }
             catch(Oracle.DataAccess.Client.OracleException ex){
                 if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
                     ehrProvKey.EhrProvKeyNum++;
                     loopcount++;
                 }
                 else{
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else {
         return Insert(ehrProvKey,false);
     }
 }
Example #5
0
 ///<summary>Inserts one EhrProvKey into the database.  Returns the new priKey.</summary>
 public static long Insert(EhrProvKey ehrProvKey)
 {
     if (DataConnection.DBtype == DatabaseType.Oracle)
     {
         ehrProvKey.EhrProvKeyNum = DbHelper.GetNextOracleKey("ehrprovkey", "EhrProvKeyNum");
         int loopcount = 0;
         while (loopcount < 100)
         {
             try {
                 return(Insert(ehrProvKey, true));
             }
             catch (Oracle.DataAccess.Client.OracleException ex) {
                 if (ex.Number == 1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated"))
                 {
                     ehrProvKey.EhrProvKeyNum++;
                     loopcount++;
                 }
                 else
                 {
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else
     {
         return(Insert(ehrProvKey, false));
     }
 }
        private void butAdd_Click(object sender, EventArgs e)
        {
            EhrProvKey keycur = new EhrProvKey();

            keycur.IsNew = true;
            FormEhrProviderKeyEdit formE = new FormEhrProviderKeyEdit(keycur);

            formE.ShowDialog();
            FillGrid();
        }
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            EhrProvKey keycur = _listKeys[e.Row];

            keycur.IsNew = false;
            FormEhrProviderKeyEdit formE = new FormEhrProviderKeyEdit(keycur);

            formE.ShowDialog();
            FillGrid();
        }
Example #8
0
        ///<summary>Updates one EhrProvKey in the database.</summary>
        public static void Update(EhrProvKey ehrProvKey)
        {
            string command = "UPDATE ehrprovkey SET "
                             + "PatNum         =  " + POut.Long(ehrProvKey.PatNum) + ", "
                             + "LName          = '" + POut.String(ehrProvKey.LName) + "', "
                             + "FName          = '" + POut.String(ehrProvKey.FName) + "', "
                             + "ProvKey        = '" + POut.String(ehrProvKey.ProvKey) + "', "
                             + "FullTimeEquiv  =  " + POut.Float(ehrProvKey.FullTimeEquiv) + ", "
                             + "Notes          = '" + POut.String(ehrProvKey.Notes) + "', "
                             + "HasReportAccess=  " + POut.Bool(ehrProvKey.HasReportAccess) + " "
                             + "WHERE EhrProvKeyNum = " + POut.Long(ehrProvKey.EhrProvKeyNum);

            Db.NonQ(command);
        }
Example #9
0
 ///<summary>Inserts one EhrProvKey into the database.  Returns the new priKey.  Doesn't use the cache.</summary>
 public static long InsertNoCache(EhrProvKey ehrProvKey)
 {
     if (DataConnection.DBtype == DatabaseType.MySql)
     {
         return(InsertNoCache(ehrProvKey, false));
     }
     else
     {
         if (DataConnection.DBtype == DatabaseType.Oracle)
         {
             ehrProvKey.EhrProvKeyNum = DbHelper.GetNextOracleKey("ehrprovkey", "EhrProvKeyNum");                  //Cacheless method
         }
         return(InsertNoCache(ehrProvKey, true));
     }
 }
Example #10
0
		///<summary>Converts a DataTable to a list of objects.</summary>
		public static List<EhrProvKey> TableToList(DataTable table){
			List<EhrProvKey> retVal=new List<EhrProvKey>();
			EhrProvKey ehrProvKey;
			for(int i=0;i<table.Rows.Count;i++) {
				ehrProvKey=new EhrProvKey();
				ehrProvKey.EhrProvKeyNum= PIn.Long  (table.Rows[i]["EhrProvKeyNum"].ToString());
				ehrProvKey.PatNum       = PIn.Long  (table.Rows[i]["PatNum"].ToString());
				ehrProvKey.LName        = PIn.String(table.Rows[i]["LName"].ToString());
				ehrProvKey.FName        = PIn.String(table.Rows[i]["FName"].ToString());
				ehrProvKey.ProvKey      = PIn.String(table.Rows[i]["ProvKey"].ToString());
				ehrProvKey.FullTimeEquiv= PIn.Float (table.Rows[i]["FullTimeEquiv"].ToString());
				ehrProvKey.Notes        = PIn.String(table.Rows[i]["Notes"].ToString());
				ehrProvKey.YearValue    = PIn.Int   (table.Rows[i]["YearValue"].ToString());
				retVal.Add(ehrProvKey);
			}
			return retVal;
		}
Example #11
0
        ///<summary>Inserts one EhrProvKey into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(EhrProvKey ehrProvKey, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO ehrprovkey (";

            if (!useExistingPK && isRandomKeys)
            {
                ehrProvKey.EhrProvKeyNum = ReplicationServers.GetKeyNoCache("ehrprovkey", "EhrProvKeyNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "EhrProvKeyNum,";
            }
            command += "PatNum,LName,FName,ProvKey,FullTimeEquiv,Notes,YearValue) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(ehrProvKey.EhrProvKeyNum) + ",";
            }
            command +=
                POut.Long(ehrProvKey.PatNum) + ","
                + "'" + POut.String(ehrProvKey.LName) + "',"
                + "'" + POut.String(ehrProvKey.FName) + "',"
                + "'" + POut.String(ehrProvKey.ProvKey) + "',"
                + POut.Float(ehrProvKey.FullTimeEquiv) + ","
                + DbHelper.ParamChar + "paramNotes,"
                + POut.Int(ehrProvKey.YearValue) + ")";
            if (ehrProvKey.Notes == null)
            {
                ehrProvKey.Notes = "";
            }
            OdSqlParameter paramNotes = new OdSqlParameter("paramNotes", OdDbType.Text, POut.StringParam(ehrProvKey.Notes));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramNotes);
            }
            else
            {
                ehrProvKey.EhrProvKeyNum = Db.NonQ(command, true, "EhrProvKeyNum", "ehrProvKey", paramNotes);
            }
            return(ehrProvKey.EhrProvKeyNum);
        }
Example #12
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <EhrProvKey> TableToList(DataTable table)
        {
            List <EhrProvKey> retVal = new List <EhrProvKey>();
            EhrProvKey        ehrProvKey;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                ehrProvKey = new EhrProvKey();
                ehrProvKey.EhrProvKeyNum   = PIn.Long(table.Rows[i]["EhrProvKeyNum"].ToString());
                ehrProvKey.PatNum          = PIn.Long(table.Rows[i]["PatNum"].ToString());
                ehrProvKey.LName           = PIn.String(table.Rows[i]["LName"].ToString());
                ehrProvKey.FName           = PIn.String(table.Rows[i]["FName"].ToString());
                ehrProvKey.ProvKey         = PIn.String(table.Rows[i]["ProvKey"].ToString());
                ehrProvKey.FullTimeEquiv   = PIn.Float(table.Rows[i]["FullTimeEquiv"].ToString());
                ehrProvKey.Notes           = PIn.String(table.Rows[i]["Notes"].ToString());
                ehrProvKey.HasReportAccess = PIn.Bool(table.Rows[i]["HasReportAccess"].ToString());
                retVal.Add(ehrProvKey);
            }
            return(retVal);
        }
Example #13
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <EhrProvKey> TableToList(DataTable table)
        {
            List <EhrProvKey> retVal = new List <EhrProvKey>();
            EhrProvKey        ehrProvKey;

            foreach (DataRow row in table.Rows)
            {
                ehrProvKey = new EhrProvKey();
                ehrProvKey.EhrProvKeyNum = PIn.Long(row["EhrProvKeyNum"].ToString());
                ehrProvKey.PatNum        = PIn.Long(row["PatNum"].ToString());
                ehrProvKey.LName         = PIn.String(row["LName"].ToString());
                ehrProvKey.FName         = PIn.String(row["FName"].ToString());
                ehrProvKey.ProvKey       = PIn.String(row["ProvKey"].ToString());
                ehrProvKey.FullTimeEquiv = PIn.Float(row["FullTimeEquiv"].ToString());
                ehrProvKey.Notes         = PIn.String(row["Notes"].ToString());
                ehrProvKey.YearValue     = PIn.Int(row["YearValue"].ToString());
                retVal.Add(ehrProvKey);
            }
            return(retVal);
        }
Example #14
0
        ///<summary>Updates one EhrProvKey in the database.</summary>
        public static void Update(EhrProvKey ehrProvKey)
        {
            string command = "UPDATE ehrprovkey SET "
                             + "PatNum       =  " + POut.Long(ehrProvKey.PatNum) + ", "
                             + "LName        = '" + POut.String(ehrProvKey.LName) + "', "
                             + "FName        = '" + POut.String(ehrProvKey.FName) + "', "
                             + "ProvKey      = '" + POut.String(ehrProvKey.ProvKey) + "', "
                             + "FullTimeEquiv=  " + POut.Float(ehrProvKey.FullTimeEquiv) + ", "
                             + "Notes        =  " + DbHelper.ParamChar + "paramNotes, "
                             + "YearValue    =  " + POut.Int(ehrProvKey.YearValue) + " "
                             + "WHERE EhrProvKeyNum = " + POut.Long(ehrProvKey.EhrProvKeyNum);

            if (ehrProvKey.Notes == null)
            {
                ehrProvKey.Notes = "";
            }
            OdSqlParameter paramNotes = new OdSqlParameter("paramNotes", OdDbType.Text, POut.StringParam(ehrProvKey.Notes));

            Db.NonQ(command, paramNotes);
        }
Example #15
0
 ///<summary>Only used from FormEhrProviderKeys.  keyCur can be a blank new key.  keyCur cannot be null.</summary>
 public FormEhrProviderKeyEdit(EhrProvKey keyCur)
 {
     InitializeComponent();
     Lan.F(this);
     _keyCur = keyCur;
 }
Example #16
0
		///<summary>Updates one EhrProvKey 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(EhrProvKey ehrProvKey,EhrProvKey oldEhrProvKey){
			string command="";
			if(ehrProvKey.PatNum != oldEhrProvKey.PatNum) {
				if(command!=""){ command+=",";}
				command+="PatNum = "+POut.Long(ehrProvKey.PatNum)+"";
			}
			if(ehrProvKey.LName != oldEhrProvKey.LName) {
				if(command!=""){ command+=",";}
				command+="LName = '"+POut.String(ehrProvKey.LName)+"'";
			}
			if(ehrProvKey.FName != oldEhrProvKey.FName) {
				if(command!=""){ command+=",";}
				command+="FName = '"+POut.String(ehrProvKey.FName)+"'";
			}
			if(ehrProvKey.ProvKey != oldEhrProvKey.ProvKey) {
				if(command!=""){ command+=",";}
				command+="ProvKey = '"+POut.String(ehrProvKey.ProvKey)+"'";
			}
			if(ehrProvKey.FullTimeEquiv != oldEhrProvKey.FullTimeEquiv) {
				if(command!=""){ command+=",";}
				command+="FullTimeEquiv = "+POut.Float(ehrProvKey.FullTimeEquiv)+"";
			}
			if(ehrProvKey.Notes != oldEhrProvKey.Notes) {
				if(command!=""){ command+=",";}
				command+="Notes = '"+POut.String(ehrProvKey.Notes)+"'";
			}
			if(ehrProvKey.YearValue != oldEhrProvKey.YearValue) {
				if(command!=""){ command+=",";}
				command+="YearValue = "+POut.Int(ehrProvKey.YearValue)+"";
			}
			if(command==""){
				return false;
			}
			command="UPDATE ehrprovkey SET "+command
				+" WHERE EhrProvKeyNum = "+POut.Long(ehrProvKey.EhrProvKeyNum);
			Db.NonQ(command);
			return true;
		}
Example #17
0
        ///<summary>Updates one EhrProvKey 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(EhrProvKey ehrProvKey, EhrProvKey oldEhrProvKey)
        {
            string command = "";

            if (ehrProvKey.PatNum != oldEhrProvKey.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(ehrProvKey.PatNum) + "";
            }
            if (ehrProvKey.LName != oldEhrProvKey.LName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "LName = '" + POut.String(ehrProvKey.LName) + "'";
            }
            if (ehrProvKey.FName != oldEhrProvKey.FName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FName = '" + POut.String(ehrProvKey.FName) + "'";
            }
            if (ehrProvKey.ProvKey != oldEhrProvKey.ProvKey)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProvKey = '" + POut.String(ehrProvKey.ProvKey) + "'";
            }
            if (ehrProvKey.FullTimeEquiv != oldEhrProvKey.FullTimeEquiv)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FullTimeEquiv = " + POut.Float(ehrProvKey.FullTimeEquiv) + "";
            }
            if (ehrProvKey.Notes != oldEhrProvKey.Notes)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Notes = " + DbHelper.ParamChar + "paramNotes";
            }
            if (ehrProvKey.YearValue != oldEhrProvKey.YearValue)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "YearValue = " + POut.Int(ehrProvKey.YearValue) + "";
            }
            if (command == "")
            {
                return(false);
            }
            if (ehrProvKey.Notes == null)
            {
                ehrProvKey.Notes = "";
            }
            OdSqlParameter paramNotes = new OdSqlParameter("paramNotes", OdDbType.Text, POut.StringParam(ehrProvKey.Notes));

            command = "UPDATE ehrprovkey SET " + command
                      + " WHERE EhrProvKeyNum = " + POut.Long(ehrProvKey.EhrProvKeyNum);
            Db.NonQ(command, paramNotes);
            return(true);
        }
Example #18
0
        ///<summary>Updates one EhrProvKey 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(EhrProvKey ehrProvKey, EhrProvKey oldEhrProvKey)
        {
            string command = "";

            if (ehrProvKey.PatNum != oldEhrProvKey.PatNum)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "PatNum = " + POut.Long(ehrProvKey.PatNum) + "";
            }
            if (ehrProvKey.LName != oldEhrProvKey.LName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "LName = '" + POut.String(ehrProvKey.LName) + "'";
            }
            if (ehrProvKey.FName != oldEhrProvKey.FName)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FName = '" + POut.String(ehrProvKey.FName) + "'";
            }
            if (ehrProvKey.ProvKey != oldEhrProvKey.ProvKey)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "ProvKey = '" + POut.String(ehrProvKey.ProvKey) + "'";
            }
            if (ehrProvKey.FullTimeEquiv != oldEhrProvKey.FullTimeEquiv)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "FullTimeEquiv = " + POut.Float(ehrProvKey.FullTimeEquiv) + "";
            }
            if (ehrProvKey.Notes != oldEhrProvKey.Notes)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "Notes = '" + POut.String(ehrProvKey.Notes) + "'";
            }
            if (ehrProvKey.HasReportAccess != oldEhrProvKey.HasReportAccess)
            {
                if (command != "")
                {
                    command += ",";
                }
                command += "HasReportAccess = " + POut.Bool(ehrProvKey.HasReportAccess) + "";
            }
            if (command == "")
            {
                return;
            }
            command = "UPDATE ehrprovkey SET " + command
                      + " WHERE EhrProvKeyNum = " + POut.Long(ehrProvKey.EhrProvKeyNum);
            Db.NonQ(command);
        }
Example #19
0
 ///<summary>Inserts one EhrProvKey into the database.  Returns the new priKey.  Doesn't use the cache.</summary>
 public static long InsertNoCache(EhrProvKey ehrProvKey)
 {
     return(InsertNoCache(ehrProvKey, false));
 }
Example #20
0
		///<summary>Updates one EhrProvKey in the database.</summary>
		public static void Update(EhrProvKey ehrProvKey){
			string command="UPDATE ehrprovkey SET "
				+"PatNum       =  "+POut.Long  (ehrProvKey.PatNum)+", "
				+"LName        = '"+POut.String(ehrProvKey.LName)+"', "
				+"FName        = '"+POut.String(ehrProvKey.FName)+"', "
				+"ProvKey      = '"+POut.String(ehrProvKey.ProvKey)+"', "
				+"FullTimeEquiv=  "+POut.Float (ehrProvKey.FullTimeEquiv)+", "
				+"Notes        = '"+POut.String(ehrProvKey.Notes)+"', "
				+"YearValue    =  "+POut.Int   (ehrProvKey.YearValue)+" "
				+"WHERE EhrProvKeyNum = "+POut.Long(ehrProvKey.EhrProvKeyNum);
			Db.NonQ(command);
		}
Example #21
0
 ///<summary>Updates one EhrProvKey in the database.</summary>
 internal static void Update(EhrProvKey ehrProvKey)
 {
     string command="UPDATE ehrprovkey SET "
         +"PatNum         =  "+POut.Long  (ehrProvKey.PatNum)+", "
         +"LName          = '"+POut.String(ehrProvKey.LName)+"', "
         +"FName          = '"+POut.String(ehrProvKey.FName)+"', "
         +"ProvKey        = '"+POut.String(ehrProvKey.ProvKey)+"', "
         +"FullTimeEquiv  =  "+POut.Float (ehrProvKey.FullTimeEquiv)+", "
         +"Notes          = '"+POut.String(ehrProvKey.Notes)+"', "
         +"HasReportAccess=  "+POut.Bool  (ehrProvKey.HasReportAccess)+" "
         +"WHERE EhrProvKeyNum = "+POut.Long(ehrProvKey.EhrProvKeyNum);
     Db.NonQ(command);
 }
Example #22
0
 ///<summary>Updates one EhrProvKey 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(EhrProvKey ehrProvKey,EhrProvKey oldEhrProvKey)
 {
     string command="";
     if(ehrProvKey.PatNum != oldEhrProvKey.PatNum) {
         if(command!=""){ command+=",";}
         command+="PatNum = "+POut.Long(ehrProvKey.PatNum)+"";
     }
     if(ehrProvKey.LName != oldEhrProvKey.LName) {
         if(command!=""){ command+=",";}
         command+="LName = '"+POut.String(ehrProvKey.LName)+"'";
     }
     if(ehrProvKey.FName != oldEhrProvKey.FName) {
         if(command!=""){ command+=",";}
         command+="FName = '"+POut.String(ehrProvKey.FName)+"'";
     }
     if(ehrProvKey.ProvKey != oldEhrProvKey.ProvKey) {
         if(command!=""){ command+=",";}
         command+="ProvKey = '"+POut.String(ehrProvKey.ProvKey)+"'";
     }
     if(ehrProvKey.FullTimeEquiv != oldEhrProvKey.FullTimeEquiv) {
         if(command!=""){ command+=",";}
         command+="FullTimeEquiv = "+POut.Float(ehrProvKey.FullTimeEquiv)+"";
     }
     if(ehrProvKey.Notes != oldEhrProvKey.Notes) {
         if(command!=""){ command+=",";}
         command+="Notes = '"+POut.String(ehrProvKey.Notes)+"'";
     }
     if(ehrProvKey.HasReportAccess != oldEhrProvKey.HasReportAccess) {
         if(command!=""){ command+=",";}
         command+="HasReportAccess = "+POut.Bool(ehrProvKey.HasReportAccess)+"";
     }
     if(command==""){
         return;
     }
     command="UPDATE ehrprovkey SET "+command
         +" WHERE EhrProvKeyNum = "+POut.Long(ehrProvKey.EhrProvKeyNum);
     Db.NonQ(command);
 }