示例#1
0
 private bool IsNecessaryDataAvailable(PatientDashboardDataEventArgs data)
 {
     if (data.Pat == null || (data.ImageToothChart == null && data.ListTreatPlans == null && data.ListProcedures == null))
     {
         return(false);
     }
     return(true);
 }
示例#2
0
 private bool IsNecessaryDataAvailable(PatientDashboardDataEventArgs data)
 {
     if (data.Pat == null || data.ListDocuments == null || data.BitmapImagesModule == null)
     {
         return(false);               //Necessary data not found in PatientDashboardDataEventArgs.  Make no change.
     }
     return(true);
 }
示例#3
0
 public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
 {
     if (sheetField == null)
     {
         return;
     }
     _sheetField = sheetField;          //Only make a change if valid sheetField given.
 }
示例#4
0
 private void ExtractData(PatientDashboardDataEventArgs data)
 {
     _listInsPlans = data.ListInsPlans;
     _listInsSubs  = data.ListInsSubs;
     _listPatPlans = data.ListPatPlans;
     _listBenefits = data.ListBenefits;
     _pat          = data.Pat;
 }
 public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
 {
     if (!IsNecessaryDataAvailable(data))
     {
         return;
     }
     ExtractData(data);
 }
 private bool IsNecessaryDataAvailable(PatientDashboardDataEventArgs data)
 {
     if (data.Pat == null || data.ListInsPlans == null || data.ListInsSubs == null || data.ListPatPlans == null || data.ListBenefits == null)
     {
         return(false);
     }
     return(true);
 }
示例#7
0
 private bool IsNecessaryDataAvailable(PatientDashboardDataEventArgs data)
 {
     if (data.ListPlannedAppts == null || data.ListAppts == null || data.Pat == null)
     {
         return(false);               //Necessary data not found in PatientDashboardDataEventArgs.  Make no change.
     }
     return(true);
 }
示例#8
0
 ///<summary></summary>
 public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
 {
     if (sheetField == null)
     {
         return;
     }
     _sheetField = sheetField;
 }
 private void ExtractData(PatientDashboardDataEventArgs data)
 {
     _listInsPlans = data.ListInsPlans;
     _listInsSubs  = data.ListInsSubs;
     _listPatPlans = data.ListPatPlans;
     _listBenefits = data.ListBenefits;
     _histList     = data.HistList ?? ClaimProcs.GetHistList(_pat.PatNum, _listBenefits, _listPatPlans, _listInsPlans, DateTime.Today, _listInsSubs);
     _pat          = data.Pat;
 }
示例#10
0
        public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
        {
            if (!IsNecessaryDataAvailable(data))
            {
                return;
            }
            Image imgToothChart = ExtractToothChart(data);

            _imgToothChart?.Dispose();
            _imgToothChart = imgToothChart;
        }
示例#11
0
 private Image ExtractToothChart(PatientDashboardDataEventArgs data)
 {
     if (data.ImageToothChart != null)           //Check for this first, since it will be quicker than creating an image from the active treatment plan.
     {
         return((Image)data.ImageToothChart.Clone());
     }
     else if (data.ListTreatPlans != null && data.ListProcedures != null)
     {
         TreatPlan treatPlan = data.ListTreatPlans.FirstOrDefault(x => x.TPStatus == TreatPlanStatus.Active);
         return(GetToothChart(data.Pat.PatNum, treatPlan, data.ListProcedures));
     }
     return(null);
 }
示例#12
0
 public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
 {
     if (!IsNecessaryDataAvailable(data))
     {
         return;
     }
     _listApptOthers         = data.ListAppts.FindAll(x => x.PatNum == data.Pat.PatNum).Select(y => new ApptOther(y)).ToList();;
     _listPlannedAppts       = data.ListPlannedAppts;
     _listPlannedIncompletes = _listPlannedAppts.FindAll(x => !_listApptOthers.ToList()
                                                         .Exists(y => y.NextAptNum == x.AptNum && y.AptStatus == ApptStatus.Complete))
                               .OrderBy(x => x.ItemOrder).ToList();
     _listProgNoteColorDefs = Defs.GetDefsForCategory(DefCat.ProgNoteColors);          //cached
 }
示例#13
0
 public bool TrySetData(PatientDashboardDataEventArgs data)
 {
     if (_sheetDefWidget == null || data == null)         //Hasn't been through initialize, or unexpected data.
     {
         return(false);
     }
     if (data.StaticTextData != null)           //Only change static text fields if the required data is available.
     {
         SetStaticFields(data.Pat, data.Fam, data.StaticTextData);
     }
     SetOrRefreshData((ctr, sheetField) => ctr.SetData(data, sheetField));
     return(true);
 }
        private void SetData(ODEventArgs e)
        {
            PatientDashboardDataEventArgs data;

            if (e.Tag is PatientDashboardDataEventArgs)
            {
                data = (PatientDashboardDataEventArgs)e.Tag;
            }
            else
            {
                data = new PatientDashboardDataEventArgs(e.Tag);
            }
            StartRefreshThread((widget) => widget.TrySetData(data), SET_THREAD_NAME);
        }
示例#15
0
        public void SetData(PatientDashboardDataEventArgs data, SheetField sheetField)
        {
            if (!IsNecessaryDataAvailable(data))
            {
                return;
            }
            if (_docPatPicture == null)
            {
                return;
            }
            Document docForPat = data.ListDocuments.FirstOrDefault(x => x.DocNum == _docPatPicture.DocNum);

            if (sheetField != null && docForPat != null)
            {
                _docPatPicture = docForPat;
                using (Bitmap imageCopy = new Bitmap(data.BitmapImagesModule)) {
                    SwapPatPicture(() => {
                        using (Bitmap image = ImageHelper.ApplyDocumentSettingsToImage(_docPatPicture, imageCopy, ImageSettingFlags.ALL)) {
                            return(ImageHelper.GetThumbnail(image, Math.Min(sheetField.Width, sheetField.Height)));
                        }
                    });
                }
            }
        }