//<summary>
         //Initializes a new instance of the CaseOrganTissueViewModel class.
         //</summary>
		public ReportCodingViewModel()
		{
		    this.IsEditorReadOnly = true;
		    this.CurrentSiteType = ReadingSiteType.interpretation;

		    COT = new CaseOrganTissue();
		    CPTList = new PathologyCptCodesType();
		    this.SearchItems = new ObservableCollection<PathologyFieldValue>();
		    this.SearchLocationItems = new ObservableCollection<PathologyFieldValue>();

		    this.SearchSnomedItemCommand = new RelayCommand(SearchSnomedItem, () => this.CanSearchSnomedItem);
		    this.AddSnomedItemCommand = new RelayCommand(AddSnomedItem, () => this.CanAddSnomedItem);
		    this.RemoveSnomedItemCommand = new RelayCommand(RemoveSnomedItem, () => this.CanRemoveSnomedItem);

		    this.SearchLocationItemCommand = new RelayCommand(SearchLocationItem, () => this.CanSearchLocationItem);
		    this.AddCPTCommand = new RelayCommand(AddCPTItems, () => this.CanAddCPT);
		}
		public ReportCodingViewModel(IWorkListDataSource datasource, string caseURN, string siteNumber, bool isGlobalReadOnly = false, ReadingSiteType siteType = ReadingSiteType.interpretation)
		{
			this.IsEditorReadOnly = isGlobalReadOnly;
			this.CurrentSiteType = siteType;

			this.DataSource = datasource;
			this.CaseURN = caseURN;
			this.SiteStationNumber = siteNumber;

			COT = new CaseOrganTissue();
			CPTList = new PathologyCptCodesType();
			
			PathologySnomedCodesType snomedList = this.DataSource.GetSnomedCodeForCase(this.CaseURN);
			COT.InitializeList(snomedList);
			CPTList = this.DataSource.GetCptCodesForCase(this.CaseURN);
            
            this.SupportCPT = true;
            if (CPTList == null)
            {
                this.SupportCPT = false;
                MessageBox.Show("The current case does not support CPT coding.", "Information", MessageBoxButton.OK, MessageBoxImage.Information);
                CPTList = new PathologyCptCodesType();
            }

			this.SearchItems = new ObservableCollection<PathologyFieldValue>();
			this.SearchLocationItems = new ObservableCollection<PathologyFieldValue>();

			// enable adding new organ intially
			this.SelectedItemType = "Organ/Tissue";
			this.SelectedSearchItem = null;

			this.SearchSnomedItemCommand = new RelayCommand(SearchSnomedItem, () => this.CanSearchSnomedItem);
			this.AddSnomedItemCommand = new RelayCommand(AddSnomedItem, () => this.CanAddSnomedItem);
			this.RemoveSnomedItemCommand = new RelayCommand(RemoveSnomedItem, () => this.CanRemoveSnomedItem);

			this.SearchLocationItemCommand = new RelayCommand(SearchLocationItem, () => this.CanSearchLocationItem );
			this.AddCPTCommand = new RelayCommand(AddCPTItems, () => this.CanAddCPT );
		}