/// <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); } }
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; }
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); } } }
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); } } }
public void AddDICOMObject(DICOMObject d) { var id = d.FindFirst(TagHelper.StudyID.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.StudyDate.CompleteID) as Date; study.Date = dt.Data; Studies.Add(study); } } }
protected void AddStudy(Study study) { Studies.Add(study); }