public ReportViewModel(IWorkListDataSource dataSource, CaseListItem caseItem, bool isGlobalReadOnly = false, ReadingSiteType siteType = ReadingSiteType.interpretation)
        {
            DataSource = dataSource;

            // editor property
            this.IsEditorReadOnly = isGlobalReadOnly;
            this.CurrentSiteType = siteType;

            // case's properties
            this.CaseURN = caseItem.CaseURN;
            this.SiteAbbr = caseItem.SiteAbbr;
            this.SiteCode = caseItem.SiteCode;
            this.AccessionNumber = caseItem.AccessionNumber;
            ChangeList = new PathologyCaseReportFieldsType();

            // patient's info
            this.PatientName = caseItem.PatientName;
            this.PatientID = caseItem.PatientID;
            this.Patient = DataSource.GetPatient(caseItem.SiteCode, caseItem.PatientICN);

            // retrieve the Esignature status at the case's primary site
            GetESignatureStatus();

            // consultations
            this.ConsultationList = caseItem.ConsultationList;

            // CCOW set patient context
            IContextManager contextManager = ViewModelLocator.ContextManager;
            contextManager.SetCurrentPatient(this.Patient);
            this.CCOWContextState = contextManager.GetPatientContextState(this.Patient);

            // get notified of CCOW context state change events
            contextManager.PropertyChanged += new PropertyChangedEventHandler(contextManager_PropertyChanged);

            // retrieve report data
            report = dataSource.GetReport(caseItem);

            // retrieve supplementary reports
            DateTime srDisplayDateStart;
            if (!DateTime.TryParse(DateSpecReceived, out srDisplayDateStart))
            {
                srDisplayDateStart = DateTime.Today;
            }
            SRViewModel = new SupplementaryReportViewModel(DataSource, SiteCode, AccessionNumber, this.CaseURN, this.ConsultationList, this.IsEditorReadOnly, this.CurrentSiteType);
            SRViewModel.SRDateStart = srDisplayDateStart;
            SRViewModel.Practitioner = Practitioner;
            SRViewModel.EsigStatus = this.EsigStatus;
            //srViewModel.LocalEsigStatus = this.LocalEsigStatus;

            // initialized codeing tab
            ReportCodingVM = new ReportCodingViewModel(this.DataSource, this.CaseURN, this.SiteCode, this.IsEditorReadOnly, this.CurrentSiteType);

            LaunchCPRSReportCommand = new RelayCommand(LaunchCPRSReport, () => this.State == ReportState.Verified);
            SaveReportCommand = new RelayCommand(SaveMainReportToDatabase, () => CanSaveMainReport);
            CompleteReportCommand = new RelayCommand(CompleteReport, () => CanCompleteMainReport);
            VerifyReportCommand = new RelayCommand(VerifyReport, () => CanVerifyMainReport);
            SearchUserCommand = new RelayCommand<string>((s) => SearchUser(s), (s) => CanSearchUser);

            if ((this.report == null) || (this.report.FieldList == null) || (this.report.FieldList.Count <= 0))
            {
                Log.Error("Missing report template.");
                MessageBox.Show("Cannot retrieve data fields for the main report. Please contact system administrator.",
                                "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            // check the condition and set the GUI as read only or not
            SetMainReportReadOnly();
        }