Пример #1
0
        ///<summary>Resets the descriptions for all ADA codes to the official wording.  Required by the license.</summary>
        public static int ResetADAdescriptions(List <ProcedureCode> codeList)
        {
            //No need to check RemotingRole; no call to db.
            ProcedureCode code;
            int           count = 0;

            for (int i = 0; i < codeList.Count; i++)
            {
                if (!ProcedureCodes.IsValidCode(codeList[i].ProcCode))                 //If this code is not in this database
                {
                    continue;
                }
                code = ProcedureCodes.GetProcCode(codeList[i].ProcCode);
                if (code.Descript == codeList[i].Descript)
                {
                    continue;
                }
                string   oldDescript  = code.Descript;
                DateTime datePrevious = code.DateTStamp;
                code.Descript = codeList[i].Descript;
                ProcedureCodes.Update(code);
                SecurityLogs.MakeLogEntry(Permissions.ProcCodeEdit, 0, "Code " + code.ProcCode + " changed from '" + oldDescript + "' to '" + code.Descript + "' by D-Codes Tool."
                                          , code.CodeNum, datePrevious);
                count++;
            }
            return(count);
            //don't forget to refresh procedurecodes.
        }
Пример #2
0
        ///<summary>Resets the descriptions for all ADA codes to the official wording.  Required by the license.</summary>
        public static int ResetADAdescriptions(List <ProcedureCode> codeList)
        {
            //No need to check RemotingRole; no call to db.
            ProcedureCode code;
            int           count = 0;

            for (int i = 0; i < codeList.Count; i++)
            {
                if (!ProcedureCodes.IsValidCode(codeList[i].ProcCode))                 //If this code is not in this database
                {
                    continue;
                }
                code = ProcedureCodes.GetProcCode(codeList[i].ProcCode);
                if (code.Descript == codeList[i].Descript)
                {
                    continue;
                }
                code.Descript = codeList[i].Descript;
                ProcedureCodes.Update(code);
                count++;
            }
            return(count);
            //don't forget to refresh procedurecodes.
        }