示例#1
0
        /// <summary>
        /// Load all user datas from the firebase db.
        /// </summary>
        /// <returns></returns>
        private async Task GetUserDataAsync()
        {
            try
            {
                var documents = await CrossCloudFirestore.Current
                                .Instance
                                .GetCollection(QStudy.CollectionPath)
                                .GetDocumentsAsync();

                IEnumerable <StudiesToParticipate> myModel = documents.ToObjects <StudiesToParticipate>();

                foreach (var study in myModel)
                {
                    if (!study.Team.Equals("System") && (!(study.EndDate < DateTime.Now) | (study.EndDate == DateTime.MinValue)))
                    {
                        if (CurrentUser.Instance.User.ActiveStudies.Contains(study.Id))
                        {
                            study.Paricipate = true;
                        }
                        Studies.Add(study);
                    }
                }
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }
示例#2
0
        private void AddStudy()
        {
            Study s = new Study();

            s.Practice = DesktopApplication.CurrentPratice;
            ((Patient)Item).Studies.Add(s);
            StudyViewModel vm = new StudyViewModel(s);

            Studies.Add(vm);
            SelectedStudy = vm;
        }
示例#3
0
        public override void NonUIThreadInitialize()
        {
            base.NonUIThreadInitialize();

            if (((Patient)Item).Studies == null)
            {
                DesktopApplication.ShowDialog("Error", "Studies are null??");
            }
            else
            {
                foreach (Study s in ((Patient)Item).Studies)
                {
                    StudyViewModel svm = new StudyViewModel(s);
                    Studies.Add(svm);
                }
            }
        }
示例#4
0
        public void AddDICOMObject(DICOMObject d)
        {
            IDICOMElement id = d.FindFirst(TagHelper.STUDY_ID.CompleteID);

            if (id != null)
            {
                string        studyID = (id as ShortString).Data;
                DICOMFileType type    = GetFileType(d);
                if (!Studies.Exists(s => s.ID == studyID))
                {
                    DICOMStudy study = new DICOMStudy();
                    study.ID   = studyID;
                    study.Type = type;
                    Date dt = d.FindFirst(TagHelper.STUDY_DATE.CompleteID) as Date;
                    study.Date = dt.Data;
                    Studies.Add(study);
                }
            }
        }
示例#5
0
        public void AddDICOMObject(DICOMObject d)
        {
            var id = d.FindFirst(TagHelper.Study​ID.CompleteID);

            if (id != null)
            {
                var studyID = (id as ShortString).Data;
                var type    = GetFileType(d);
                if (!Studies.Exists(s => s.ID == studyID))
                {
                    var study = new DICOMStudy();
                    study.ID   = studyID;
                    study.Type = type;
                    var dt = d.FindFirst(TagHelper.Study​Date.CompleteID) as Date;
                    study.Date = dt.Data;
                    Studies.Add(study);
                }
            }
        }
示例#6
0
 protected void AddStudy(Study study)
 {
     Studies.Add(study);
 }