Пример #1
0
        public static ImportBase GetProcessor(ProcessFileType fileType, int healthSystemID, ISystemDataProvider irmDbDataProvider)
        {
            ImportBase result = null;

            switch (fileType)
            {
                case ProcessFileType.CommunityDataFile:
                    
                    break;
                case ProcessFileType.DiagnosisFile:
                    result = new ProcessDiagnosisFile(irmDbDataProvider);
                    break;
                case ProcessFileType.EncounterFile:
                    result = new ProcessEncounterFile(irmDbDataProvider);
                    break;
                case ProcessFileType.HealthSystemHierarchy:
                    
                    break;
                case ProcessFileType.PayerTypeMappingFile:
                    
                    break;
                case ProcessFileType.PhysicianFile:
                    
                    break;
                case ProcessFileType.ProcedureFile:
                    result = new ProcessProcedureFile(irmDbDataProvider);
                    break;
                case ProcessFileType.ServiceLineMappingFile:
                    
                    break;
                case ProcessFileType.SpecialInterestList:
                    
                    break;
                case ProcessFileType.StarkDefinedServiceAreaFile:
                    
                    break;
                case ProcessFileType.StateDischargeData:
                    
                    break;
                case ProcessFileType.Unknown:
                    
                    break;
                case ProcessFileType.ZipcodeFile:
                    
                    break;
                case ProcessFileType.NationalMarketDataFile:
                    result = new ProcessNationalMarketUpdate(irmDbDataProvider);
                    break;
                default:
                    break;                

            }
            return result;
        }
Пример #2
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            lblStartTime.Text = DateTime.Now.ToLongTimeString();
            lblStartTime.Update();
            btnProcess.Enabled = false;
            try
            {                
                log.Debug("btnProcess_Click()");

                //Get file type
                ImportBase pdf;
                switch (clbFileType.CheckedIndices[0])
                {
                    case 0:
                        pdf = new ProcessCommunityUpdate(HealthSystemID);                        
                        break;
                    case 1:
                        pdf = new ProcessDiagnosisFile(HealthSystemID);
                        break;
                    case 2:
                        pdf = new ProcessEncounterFile(HealthSystemID);
                        break;
                    case 3:
                        pdf = new ProcessProcedureFile(HealthSystemID);
                        break;
                    case 4:
                        pdf = new ProcessProcedureFile(HealthSystemID);
                        break;
                    default:
                        throw new ApplicationException("No file type chosen");                        
                }

                int FileID = Convert.ToInt32(txtFileID.Text);
                pdf.UpdateProductionData = cbUpdateProduction.Checked;
                pdf.Execute(FileID);
            }
            finally
            {
                btnProcess.Enabled = true;
                this.Cursor = Cursors.Default;
                lblEndTime.Text = DateTime.Now.ToLongTimeString();
            }
        }