public void Initialize(Case caseObj)
 {
     this.Kind = CaseListItemKind.Case;
     this.CaseURN = caseObj.CaseURN;
     this.StudyDateTime = caseObj.AccessionDateTime;
     this.HasNotes = caseObj.HasNotes;
     this.IsNoteAttached = caseObj.IsNoteAttached ? "Yes" : "No";
     this.ReportStatus = caseObj.ReportStatus;
     this.Priority = caseObj.Priority;
     this.PatientName = caseObj.PatientName;
     this.PatientID = caseObj.PatientShortID;
     this.PatientICN = caseObj.PatientICN;
     this.PatientSensitive = caseObj.PatientSensitive;
     this.SpecimenCount = caseObj.SpecimenCount;
     this.AcquisitionSite = caseObj.SiteAbbr;
     this.AccessionNumber = caseObj.AccessionNumber;
     this.SiteAbbr = caseObj.SiteAbbr;
     this.SiteCode = caseObj.SiteID;
     this.ReserveState = caseObj.ReservedState;
     this.ReservedBy = caseObj.ReservedBy;
     this.ConsultationStatus = caseObj.ConsultationStatus;
     this.ConsultationList = caseObj.ConsultationList;
     HasPriority = true;
     this.SnapshotCount = caseObj.SnapshotCount;
     this.HasMethod = true;
     this.Method = caseObj.Method;
     this.SlidesAvailable = Boolean.Parse(caseObj.SlidesAvailable) ? "Yes" : "No";
 }
Esempio n. 2
0
 public void CopyFrom(Case caseObj)
 {
     this.Method = caseObj.Method;
     this.Priority = caseObj.Priority;
     this.ReservedState = caseObj.ReservedState;
     this.Reserver = caseObj.Reserver;
     this.ReportStatus = caseObj.ReportStatus;
     this.SlidesAvailable = caseObj.SlidesAvailable;
     this.SnapshotCount = caseObj.SnapshotCount;
     this.SpecimenCount = caseObj.SpecimenCount;
     this.HasNotes = caseObj.HasNotes;
     this.IsNoteAttached = caseObj.IsNoteAttached;
     this.ConsultationList.ConsultationList.Clear();
     foreach (CaseConsultation item in caseObj.ConsultationList.ConsultationList)
     {
         this.ConsultationList.ConsultationList.Add(item);
     }
     this.ConsultationStatus = this.ConsultStatus;
 }
        public WorkListFilterParameter.FilterMatchType MatchCase(Case caseObj)
        {
            if (!this.IsValid)
            {
                return WorkListFilterParameter.FilterMatchType.NotApplicable;
            }

            WorkListFilterParameter.FilterMatchType matchType = WorkListFilterParameter.FilterMatchType.NotApplicable;

            foreach (WorkListFilterParameter item in this.Parameters)
            {
                matchType = item.MatchCase(caseObj.GetField(item.Field));
                if (matchType == WorkListFilterParameter.FilterMatchType.NotMatch)
                {
                    // no need to check further
                    break;
                }
            }

            return matchType;
        }
        private bool CanDisplayCase(Case caseObj)
        {
            // can display if retrieved from current site
            if (caseObj.SiteID == UserContext.LocalSite.PrimarySiteStationNUmber)
            {
                return true;
            }

            switch (this.Type)
            {
                case ExamListViewType.Unread:
                    {
                        foreach (CaseConsultation caseConsult in caseObj.ConsultationList.ConsultationList)
                        {
                            if ((caseConsult.SiteID == UserContext.LocalSite.PrimarySiteStationNUmber) &&
                                (caseConsult.Type == "CONSULTATION") && (caseConsult.Status == "PENDING"))
                            {
                                return true;
                            }
                        }

                        return false;
                    }

                case ExamListViewType.Read:
                    {
                        foreach (CaseConsultation caseConsult in caseObj.ConsultationList.ConsultationList)
                        {
                            if ((caseConsult.SiteID == UserContext.LocalSite.PrimarySiteStationNUmber) &&
                                (caseConsult.Type == "CONSULTATION") && (caseConsult.Status == "COMPLETED"))
                            {
                                return true;
                            }
                        }

                        return false;
                    }

                default: return true;
            }
        }
 public CaseListItem(Case caseObj)
 {
     this.Initialize(caseObj);
 }